Dukester0122
IS-IT--Management
I have a script that returns everything on the table but want to change it to return what the user only enter on the Search field. The current HTML script is:
<html>
<head>
<body>
<Form Action="button.php" Method=Post>
<Input Type="Submit" Name="button2" Value="Customer ID">
</body>
</head>
</html>
The current php script is:
<?
$dsn="customers";
$username="sa";
$password="myaccess2tb";
$sqlconnect=odbc_connect($dsn,$username,$password);
$sqlquery="SELECT custnmbr FROM RM00101;";
$process=odbc_exec($sqlconnect, $sqlquery);
while(odbc_fetch_row($process)){
$custnmbr = odbc_result($process,"custnmbr");
echo "$custnmbr<br>"; }
odbc_close($sqlconnect);
?>
<html>
<head>
<body>
<Form Action="button.php" Method=Post>
<Input Type="Submit" Name="button2" Value="Customer ID">
</body>
</head>
</html>
The current php script is:
<?
$dsn="customers";
$username="sa";
$password="myaccess2tb";
$sqlconnect=odbc_connect($dsn,$username,$password);
$sqlquery="SELECT custnmbr FROM RM00101;";
$process=odbc_exec($sqlconnect, $sqlquery);
while(odbc_fetch_row($process)){
$custnmbr = odbc_result($process,"custnmbr");
echo "$custnmbr<br>"; }
odbc_close($sqlconnect);
?>