even if i change into
Code: Select all
$pingsql = ("SELECT * FROM tbl_update_request WHERE id = '$id'");
it same.. what should i do this.
here is this the whole code:
Code: Select all
if(isset($_POST['valrequest']))
{
$pingsql = "SELECT id FROM tbl_update_request WHERE id = '$varid'";
$pingresult = mysql_query($pingsql) or die('query error. $pingsql' .mysql_error());
if(mysql_num_rows($pingresult) > 0)
{
echo 'file already exist';
}
if((empty($varre_qty)) || (!(ctype_digit($varre_qty))))
{
header('Location:error_function/error82.php');
}
$pingsql = ("INSERT INTO tbl_update_request(id,uid,cat_name,tbl_brnch_name,product_name,product_model,rec_on,return_on,sold,balancs,re_qty,dt_nwo,commnt)
VALUES('$varid',
'$vauid',
'$varcat_name',
'$varbrnch',
'$varproduct_name',
'$varproduct_model',
'$varrec_on',
'$varreturn_on',
'$varsold',
'$varbalancs',
'$varre_qty',
'$vardt_nwo',
'$varcommnt')");
$pingresult = mysql_query($pingsql) or die('Server error. $pingsql' .mysql_error());
if(($pingresult))
{
header('Location:in_function/resquest_inn.php');
}
}