ReVeR Posted March 21, 2006 Share Posted March 21, 2006 Hello.I have a textbox, and i was wondering how i could fill it with default data?What parameter do i need to set?Thx Quote Link to comment https://forums.phpfreaks.com/topic/5385-php-and-html-edit/ Share on other sites More sharing options...
azuka Posted March 21, 2006 Share Posted March 21, 2006 [!--quoteo(post=356829:date=Mar 21 2006, 03:22 AM:name=ReVeR)--][div class=\'quotetop\']QUOTE(ReVeR @ Mar 21 2006, 03:22 AM) [snapback]356829[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hello.I have a textbox, and i was wondering how i could fill it with default data?What parameter do i need to set?Thx[/quote]Depends on how you plan to set it. I think this code works well serverside assuming your textbox is called 'textbox':[code]<?php$default_content = "Your default content";if (isset($_POST['textbox'])) $default_content = trim($_POST['textbox']);?>[/code]for your texbox you only need[code]<input type="text" name="textbox" id="textbox" value="<?php echo $default_content;?>" />[/code] Quote Link to comment https://forums.phpfreaks.com/topic/5385-php-and-html-edit/#findComment-19209 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.