Mortgage - Internet Advertising - Apply for Credit Card - Debt Consolidation - Birthday Gifts

PDA

View Full Version : need help pls..


cris02
Mar 9th 2006, 2:11 am
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>


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=\&quot;action\&quot; value=\"uploadProg\"><INPUT TYPE='hidden' name='action' value='upload'><br><INPUT name='submit' TYPE='submit' value='Upload File'></p></FORM></div></td></tr></table>";

just i downloaded this code i want to modify thanks in advance..

mad4
Mar 9th 2006, 3:25 am
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";
?>

cris02
Mar 9th 2006, 9:04 pm
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=\&quot;action\&quot; value=\"uploadProg\"><INPUT TYPE='hidden' name='action' value='upload'><br><INPUT name='submit' TYPE='submit' value='Upload File'></p></FORM></div></td></tr></table>";


i would like to copy the value of select box "names" going to input box "name"