i would like to create form with drop down list that retrieve data from dtadbase
once and other page containg radio bottons but use information that saved in database
plz help
once and other page containg radio bottons but use information that saved in database
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Prac 3 Task 4</title>
</head>
<body>
<?php
$conn = odbc_connect("warehouse","IWSDStudent","assign2");
$sql = "SELECT lastName ROM ocustomer ";
$rs = odbc_exec($conn,$sql);
?>
<form id="customerform" action="task10.php" method="get">
<select name='class' size='1' >
<option value='$cusID'>$lName</option>
</select>
<?php
while (odbc_fetch_array($sql))
{
$cusID = odbc_result($rs,"customerID");
$lName = odbc_result($rs, "lastName");
echo "";
}
odbc_close($conn);
?>
<p><input type="submit" value="Submit">
<input type="reset" value="Reset"></p>
</form>
</body>
</html>
Comment