Okay this is my code, i can't get the else statement part to work...can anyone kindly assist me...i find nothing wrong with the syntax...thank u...
ps: no error...
<?php
session_start();
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="testing"; // Table name
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die(mysql_error());
$invoiceno=$_POST['invoiceno'];
$sql="SELECT * FROM $tbl_name WHERE invoice_no = '$invoiceno'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result) or die(mysql_error());
if($row>0)
echo "Invoice No. found";
else
header("location:main_login.php");
?>