Hello all, I have this one record database file used to hold several last used values, I've confirmed validity of the record. I don't get an error so ....? Will someone take look at this feeble attempt and advise?
thanks in advance!
PHP Code:
<?php
// error_reporting(0);
error_reporting(E_ALL ^ E_NOTICE);
mysql_connect("localhost","root","");
mysql_select_db("numbersdb") or die( "Unable to select database");
if(!empty($_POST["submit"]))
{
$taxrate = $_POST['taxrate'];
$query="SELECT * FROM numbdata Where id='$id'";
$result=mysql_query($query);
if(mysql_num_rows($result))
{
}else{echo "No listing for taxrate $taxrate .<br />Select another? .<br />";}
}
if(!empty($_POST["update"]))
{
$sql = "UPDATE numbdata SET
taxrate = '" .mysql_real_escape_string($_POST['taxrate']) . "',
WHERE taxrate='".$_POST['taxrate']."'";
mysql_query($sql) or die(mysql_error());
echo "Record for taxrate ".$_POST["taxrate"]." has been updated";
}
?>