burge124 Posted February 20, 2008 Share Posted February 20, 2008 hi, ive got a XML document uploading to this page, want the user to check the contents before submitting to database, example questions title ... case 'questiontitle' echo 'question title:' ... $question = 'questiontitle' ... <label> <input name = 'questiontitle' type='text' id = 'questiontitle' value = ??????? /> <label> ... not sure on the structure to call the variable in the value of the text field. thanks ian Link to comment https://forums.phpfreaks.com/topic/92077-passing-a-variable-to-appear-in-a-text-feild/ Share on other sites More sharing options...
PHP Monkeh Posted February 20, 2008 Share Posted February 20, 2008 It depends on your submit method. If in your form you have method="post" you can use: $_POST['field_name'] or if you're using method="get" you'd use: $_GET['field_name'] Link to comment https://forums.phpfreaks.com/topic/92077-passing-a-variable-to-appear-in-a-text-feild/#findComment-471526 Share on other sites More sharing options...
thebadbad Posted February 20, 2008 Share Posted February 20, 2008 I think you're looking for <input name="questiontitle" type="text" id="questiontitle" value="<?php echo $question; ?>" /> ? Link to comment https://forums.phpfreaks.com/topic/92077-passing-a-variable-to-appear-in-a-text-feild/#findComment-471585 Share on other sites More sharing options...
burge124 Posted February 21, 2008 Author Share Posted February 21, 2008 yeah thanks for your help! Link to comment https://forums.phpfreaks.com/topic/92077-passing-a-variable-to-appear-in-a-text-feild/#findComment-473224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.