View Full Version : forms and PHP
Surrix
Wed 31st Dec '03, 11:33am
How do I set variables in PHP so when I have forms on a page they already show up with those values?
For instance when we edit your post in vB your title show back up in the title form and you message in the message box.
Also most of the time when you have a box where you put in a webpage it shows up with the http:// for you.
How is that done?
CeleronXT
Wed 31st Dec '03, 2:08pm
How do I set variables in PHP so when I have forms on a page they already show up with those values?
For instance when we edit your post in vB your title show back up in the title form and you message in the message box.
Also most of the time when you have a box where you put in a webpage it shows up with the http:// for you.
How is that done?With a value="" attribute. I would need to see some code to be able to show you exactly what to do, but..echo '<input type="text" name="something" value="'.$_somevar.'" />';Or for a webpageecho '<input type="text" name="url" value="http://'.$_urlvar.'" />';
Surrix
Wed 31st Dec '03, 2:39pm
Do I need the underscore and will this same method apply to vBulletin 3 template system?
Surrix
Wed 31st Dec '03, 2:55pm
Sorry about the double post but thanks for all your help I figuared it out on my own. :D
CeleronXT
Wed 31st Dec '03, 3:11pm
Even though you figured it out... -- just for the record, no underscore is needed.
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.