Jump to content

Php Important Help Needed - Help Please


coolme52

Recommended Posts

If I read your post correctly, what you are asking for can be already done from the admin panel (you wrote?) so why not use the same code to let the user change it - although the concept of any user messing with a configuration variable sounds dangerous.

If I've misinterpreted your post, explain the problem in more detail.

Edit:
[quote]can u post a code example to do it[/quote]

No, that wouldn't be a helpful exercise since [b]you[/b] have all the relevant information anyone would use to 'post a code example'.  The online manual has many examples of how to read a file and write to a file.  Why don't you try, and if you're unsuccessful then post your code here for help.
Ill Explain My Question

For Eg

i have a file name settings.php

in that i put a code

$sitename = "My Site Name"

now if the script user wants to change the site name he has to open config.php and edit it

but wat i want is an option in admin panel where it says

Enter Your Site Name :

And wat ever u enter there is saved in the config

i hope u got me now

[quote author=coolme52 link=topic=104955.msg418918#msg418918 date=1156088384]
do u mean i should rewrite the settings.php everytime settings are changed ???
[/quote]

How else would the right values be read?

In the manual, look at the file open, file read, file write commands.

Archived

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

×
×
  • Create New...

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.