include("dbinfo.inc.php"); $conn = mysqli_connect($serv, $username, $password,$database)or die("cannot connect"); mysqli_select_db($conn,$database) or die( "Unable to select database");
<? while ($i < $num) { $cname=mysqli_result($result,$i,"NAME"); $cid=mysqli_result($result,$i,"ID"); echo "<option value=\"" . $cid . "\">" . $cname . "</option>"; $i++; } ?> </select> <select name="id2"> <? $i=0; while ($i < $num) { $cname=mysqli_result($result,$i,"NAME"); $cid=mysqli_result($result,$i,"ID"); echo "<option value=\"" . $cid . "\">" . $cname . "</option>"; $i++; } mysqli_close(); ?> </select> <input type="submit" value="Submit" /></form><br>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)