hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Help Please
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Help Please

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-19-2002, 05:39 PM
J. Williams J. Williams is offline
New Member
 
Join Date: Sep 2002
Posts: 2
*

Help Please


okay i am in desperate need of some type of php script that you can use to update a page, I have created one that writes data to a file but i need it to work so that when you update it all you have to fill in is the feilds you want to change

Please Help!

Reply With Quote


Sponsored Links
  #2  
Old 09-19-2002, 06:17 PM
EricP EricP is offline
Disabled
 
Join Date: Sep 2002
Posts: 127
Well, PHP is not my strong point, but what you could do is this:

Make the 1st page a form that posts to the 2nd page.

The 2nd page uses the Request Object where you want the new info to appear. Then the 2nd page updates the data.

Is there some type of syntax help you need? Im sure some of the PHP Gurus here would love to help you out if you posted some more details about what you are trying to do.

Reply With Quote
  #3  
Old 09-20-2002, 02:53 AM
turnball turnball is offline
Newbie
 
Join Date: May 2002
Posts: 6
add comment tags such as

<!--Content Begins-->

to the html file. Then within the script that does the work you will open the html doc, str_replace('<!--Content Begins-->','<!--Content Begins-->\n$CONTENT',$file_buffer);

then all you have to do is write the file back to itself and you get your data. You could see how by treating the fopen file buffer and reading out line by line, you could eventually build an entire page builder application using a series of comment tags and replace statements.

Sloopy and rather a pain to write out completely, but if you are choosing html files versus useing data driven content, there isnt much of a choice. You could get a little fancy with the code and maybe complete it in under 20 lines for a full blown application sitebuilder type app but it would still be a little more trouble then it is worth IMO.

Reply With Quote
Sponsored Links
  #4  
Old 09-20-2002, 04:22 PM
J. Williams J. Williams is offline
New Member
 
Join Date: Sep 2002
Posts: 2
is it possible to make it so the varibles are saved in a file?

Reply With Quote
  #5  
Old 09-20-2002, 06:26 PM
Xandra Xandra is offline
Junior Guru Wannabe
 
Join Date: Sep 2002
Posts: 96
Do you want to code one yourself or want to download one? Because there's a downloadable one at http://cafelog.com that you can use to update your website. It has categories and everything. It would be easier hacking something rather than coding your own from scratch

As for variables... if you have a lot of them, I'd recommend a database.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?