just want to ask a simple question how can i put this code: <select name="name" id="name" style="width:32%;"> <option value="" seleted="selected">Select client name</option> <?php $sql = mysql_query("SELECT * FROM client ORDER BY Client_name"); while ($row = mysql_fetch_assoc($sql)) { echo '<option value='.$row['value'].'>'.$row['Client_name']; } ?> </select> Code (markup): inside of this echo: echo "<CENTER><table width='32%' border='1' align='center' bordercolor='#000000'><tr><td height='93'><div align='left'><FORM name='cris' ACTION='$PHP_SELF' METHOD=post enctype=\"multipart/form-data\"><p><INPUT TYPE='file' name='filename'><BR><font color='#000000' size='2' face='Tahoma'><strong>Type the client name</strong></font><br><input type=\"hidden\" name=\"action\" value=\"uploadProg\"><INPUT TYPE='hidden' name='action' value='upload'><br><INPUT name='submit' TYPE='submit' value='Upload File'></p></FORM></div></td></tr></table>"; Code (markup): just i downloaded this code i want to modify thanks in advance..
try this: <?php echo"first part of your form"; ?> <select name="name" id="name" style="width:32%;"> <option value="" seleted="selected">Select client name</option> <?php $sql = mysql_query("SELECT * FROM client ORDER BY Client_name"); while ($row = mysql_fetch_assoc($sql)) { echo '<option value='.$row['value'].'>'.$row['Client_name']; } ?> </select> <?php echo"second part of your form"; ?> Code (markup):
thanks for the reply.. one more questions... well, i'm just trying to copy the selected item on my select box going to my input box even if the select box not in focus? is that posible anyway.. anyone have an idea? plss help. using this code: <center><select name="names" id="names" style="width:32%;"><option selected="selected">Select client name</option> <?php $sql = mysql_query("SELECT * FROM client ORDER BY Client_name"); while ($row = mysql_fetch_assoc($sql)) { echo '<option value='.$row['value'].'>'.$row['Client_name']; } ?> </select> </center> <? $destination=$name."/documents"; echo "<CENTER><table width='32%' border='1' align='center' bordercolor='#000000'><tr><td height='93'><div align='left'><FORM name='cris' ACTION='$PHP_SELF' METHOD=post enctype=\"multipart/form-data\"><p><INPUT TYPE='file' name='filename'><BR><input type='text' name='name'><font color='#000000' size='2' face='Tahoma'><strong>Type the client name</strong></font><br><input type=\"hidden\" name=\"action\" value=\"uploadProg\"><INPUT TYPE='hidden' name='action' value='upload'><br><INPUT name='submit' TYPE='submit' value='Upload File'></p></FORM></div></td></tr></table>"; PHP: i would like to copy the value of select box "names" going to input box "name"