Jump to content

Archived

This topic is now archived and is closed to further replies.

MarkS

Edit a file

Recommended Posts

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'));
[b]$ITEMS4[] = build("<b>Site Offline Message</b> <br> (The Message your users will see when your site is Offline)",phpfox_textarea('NEED SOMETHING HERE'));[/b]

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.