Jump to content


Photo

Edit a file


  • Please log in to reply
2 replies to this topic

#1 MarkS

MarkS
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 30 August 2006 - 12:48 PM

Hello there, I'm very new to php and have been reading some decent tutorials etc in my aim to become a good php programmer

I'm trying to edit a file's text depending on the text entered on another page

For example, the page to be edited is going to display an offline message when the site is turned off

I want this to be able to be edited (the offline message) via the admin panel on the site

I have created the text box and the code looks a bit like:
$ITEMS4[] = build("<b>Site Title:</b>",input('site_title'));
$ITEMS4[] = build("<b>Meta Keywords for search engines:</b>",phpfox_textarea('meta_keywords'));
$ITEMS4[] = build("<b>Meta Description for search engines:</b>",phpfox_textarea('meta_description'));
$ITEMS4[] = build("<b>Allow HTML on your site?</b>",select_option('allow_html'));
$ITEMS4[] = build("<b>Turn off all ads on the site?</b>",select_option('turn_on_adds'));
$ITEMS4[] = build("<b>Max time online before the session ends for a user:</b> <br /> (Minutes)",input('max_time_online'));
$ITEMS4[] = build("<b>Shut down the site?</b>",select_option('turn_site_offline'));
$ITEMS4[] = build("<b>Site Offline Message</b> <br> (The Message your users will see when your site is Offline)",phpfox_textarea('NEED SOMETHING HERE'));

the one in bold is the one i added to existing options

i need something where it says "need something here" but not sure the best steps to go about what i want to do

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 30 August 2006 - 01:03 PM

I'm a little confused, but are you saying you need to edit the file to change the part where it says "NEED SOMETHING HERE"??

I don't really understand your code either.  What is the "build()" function?  what are the other functions?  They're not standard PHP.  If you're using some kind of 3rd party script, you need to identify it and post in the third party scripts board or ask me or one of the mods to move this thread there.

Info: PHP Manual


#3 MarkS

MarkS
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 30 August 2006 - 01:18 PM

im using phpfox

yes, move this if you wish




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users