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

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

Link to comment
Share on other sites

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.