Rifts Posted November 25, 2009 Share Posted November 25, 2009 Hello, I can not seem to figure this out.... I have a drop down menu populated by a list of members when I select a name it goes to a new page with a form that the members fill out but the form is ""disabled". I am trying to repopulate the form depending on which user i select from the drop down menu. I'm not sure what code you need to see but here is my drop down menu and the disabled form codes thanks here is the drop down menu which works fine <form id="loginForm" name="loginForm" method="post" action="google.php"> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("clients", $con); $extract = mysql_query ("SELECT * FROM members ORDER BY `date` DESC"); $numrows = mysql_num_rows ($extract); echo"Select USER: <select name='site'>"; while ($row = mysql_fetch_assoc($extract)) { echo '<option name="'.$row['firstname'].'('.$row['date'].')">'.$row['firstname'].' ('.$row['date'].')</option>'; } ?> <input type="submit" name="Submit" value="Submit Now" /> and here is the disabled form which needs to be populated <form id="loginForm" name="loginForm" method="post" action="domainform-exec.php"> <table width="350" border="0" align="center" cellpadding="4" cellspacing="10"> <tr> <th>Description of Website:</th> <td><textarea name="description" rows="2" cols="20" disabled="disabled"><?php echo $description['description'];?></textarea></td> </tr> <tr> <th>Prefered Extensions: (.com, .net, .me etc.) </th> <td width="168"><input name="ext" type="text" class="textfield" id="ext" disabled="disabled" value="<?php echo $_SESSION['SESS_FIRST_NAME'];?>"/></td> </tr> <tr> <th width="124">Associated Keywords:</th> <td width="168"><input name="keyword" type="text" class="textfield" id="keyword" disabled="disabled"/></td> </tr> <tr> <th>Dashes are:</th> <td><select name="dashes" disabled="disabled"> <option value="ok">OK</option> <option value="notok">NOT OK</option> </select></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Submit Now" /></td> </tr> </table> </form> Link to comment https://forums.phpfreaks.com/topic/182868-outputting-values-into-a-form-from-a-database/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.