Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Updating Php File Through A Web Form
demonlord
post Mar 5 2008, 02:12 AM
Post #1


Member [Level 3]
******

Group: Members
Posts: 92
Joined: 1-January 08
Member No.: 55,554



Hello,
i'm not sure if this can be done with php or not but what i need is a way to make an php file that have an html form on it and it will take the info you put in to that form and write it to an existing php file, for example: if i have the file news.php and the file news_update.php. if you went to news_update.php you would get an form with a text area for you to write a new addition for the news.php file and when you hit submit it will add what you typed in the form to the file news.php. If this is going to be a big code or a hard one to make but some one thinks they can make it let me know either via post or pm and i can give some credits for the code. if some one knows of such a pre-exsting code that is free please post it.

Thanks
Go to the top of the page
 
+Quote Post
jlhaslip
post Mar 5 2008, 03:03 AM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,846
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



Do you want all of the News stories placed into the same file? or one file per story?

Looks like you might be able to use a Content management system that lets the members update the site? like a wiki?
Go to the top of the page
 
+Quote Post
darran
post Mar 5 2008, 03:33 AM
Post #3


Privileged Member
*********

Group: Members
Posts: 660
Joined: 31-August 06
From: Singapore
Member No.: 29,189



I agree, I believe what you are trying to emulate are examples of blog posts except that the data will not be stored in a sql table but rather a file. Am I right? There are several alternatives out there like WordPress, CuteNews ... etc
Go to the top of the page
 
+Quote Post
galexcd
post Mar 5 2008, 04:07 AM
Post #4


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
*********

Group: [HOSTED]
Posts: 963
Joined: 25-September 05
From: The dungeon deep below the foundation of trap17
Member No.: 12,251



You could use fwrite for this, but I would not suggest writing directly to the php file. Instead write to a text file that the php file includes. That way if anybody finds your updater they won't be able to seriously damage your website.
Go to the top of the page
 
+Quote Post
demonlord
post Mar 5 2008, 10:10 PM
Post #5


Member [Level 3]
******

Group: Members
Posts: 92
Joined: 1-January 08
Member No.: 55,554



QUOTE(alex7h3pr0gr4m3r @ Mar 5 2008, 04:07 AM) *
You could use fwrite for this, but I would not suggest writing directly to the php file. Instead write to a text file that the php file includes. That way if anybody finds your updater they won't be able to seriously damage your website.


how would i do that, as for the content managment softwares i'm trying to avoid thoses because for some reason they confusise the pastor of my church and it's going to be him updating the news section for the page while i take care of everything else.
Go to the top of the page
 
+Quote Post
jlhaslip
post Mar 6 2008, 02:08 AM
Post #6


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,846
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



I would say to check-out Cutenews (be sure to use the recent patch) and My Little CMS.
Both of them use flat-files and have a page for inserting the News Item (article). Quite easy to use.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Getting List Of Directories And Files Using Php(6)
  2. Script: Php Jukebox(4)
  3. Alternative To File()?(4)
  4. I Need Help With File Edit In Php(6)
  5. Image Upload And File Size(2)
  6. Reading 16 Bit Wav File(0)
  7. Include File.php?id=something(13)
  8. Php File Problem(5)
  9. Logging Dowload Files From Your Server Onto A Html File(1)
  10. File String Delete?(2)
  11. Php Writes Into Txt File(8)
  12. File In Database(1)
  13. File Format Unknown! (wap)(6)
  14. Display Random File In A Directory(9)
  15. Updating Website From Another -- Website(7)
  1. Help Needed With Directory/file Listing Code Infinite Loop(5)
  2. Help Php: How To Load String From Text File (solved)(9)
  3. Php Help Needed Including File In A Page.(2)
  4. Edit .txt File In Ftp Via Webpage(2)
  5. [php]simple Flat File Text Manipulator(3)
  6. <?php ?> Unique Visitors Script(2)
  7. File Upload(1)
  8. No File Extension(3)
  9. Php And Flash Image Gallery(5)
  10. Real Time Updating With Ajax(5)
  11. File Checker-how To Check File Whith Html Through Html?(2)
  12. Need Some Help In File Browser(8)
  13. Php Configuration File(16)


 



- Lo-Fi Version Time is now: 5th July 2008 - 04:21 AM