Hi Folks,
Suppose I have a text field on an HTML page and for simplicity let the ID = "text_field". I am wondering if I could set the value of that text field using PHP. I know how to GET the data but setting it still eludes me.
Thanks!
Setting values of HTML objects
Moderator: General Moderators
-
canadiancoder
- Forum Newbie
- Posts: 6
- Joined: Tue Aug 07, 2007 8:35 am
?
Code: Select all
echo '<input type="text" name="Textfld_name" id="Textfld_id" />';-
canadiancoder
- Forum Newbie
- Posts: 6
- Joined: Tue Aug 07, 2007 8:35 am
Thanks for the tip but it's a little more complex than that. You see I have a number of dynamic forms that are generated using JavaScript. In essence the user can select an option from a drop down menu and that would generate the associated form. I would like to set the values in such a way that when it is generated by my JS function the proper data will populate the form.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm