PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Currently I am working on a site wherre I am making a php script that will allow me to change the text on pages without having to open code files. But I am stuck somewhere.
I am making a form that will allow the client to select the page and then change the text. This what I have right now
what I want the text area to do is as soon as a page is choosed in the menu it would what currently exist in the record for text for that php in the database.
Make sure in the <option> tag you use the value attribute. Place the records index in the value attribute and in the next page do a query that finds the record using the posted forms information. Here's an example:
If you're not wanting to submit before the text is displayed then use JavaScript.
An example would be if someone selected something from a drop down box and you wanted a textarea to automatically be populated without posting to another page or using a postback then you'd want to use JavaScript to dynamically fill the textarea. I don't know JavaScript well enough to tell you off the top of my head. I have to look through my gigantic JavaScript book everytime I want to do something simple so I'm not help with actually writing the code.