Hello all,
Guys need some advise and some help regarding displaying data from database...
so, basically this is what i'm trying to do, have a keyword (invoice_no)...i'm suppose to search the database, and the find record...the display the remaining attributes (document_no,pallet_no and so on)
invoice.php
<FORM ACTION=".php" METHOD=get>
<h1>Enter your Invoice No.</h1>
<table>
<tr>
<td>Invoice No. :</td><td><input name="invoice_no" type="text" size"20"></input></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit" id="invoiceno"></input>
</FORM>
<?php
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="testdata"; // Database name
$tbl_name="testdata"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$invoiceno=$_POST['invoice_no'];
$sql="SELECT * FROM $tbl_name WHERE invoice_no='$invoiceno'";
?>
can't think of anyway to proceed...thank u in advance