insert query problem
3 posts
Page 1 of 1
plz help me out in this query
Code: Select all
<?php
$a = $_POST['T1'];
$b = $_POST['T2'];
$c = $_POST['T3'];
$d = $_POST['T4'];
$e = $_POST['T5'];
$f = $_POST['T6'];
$con = mysql_connect("localhost", "root", "");
if(!$con)
{
echo "error in connection".mysql_error();
}
mysql_select_db("uc", $con);
$q = mysql_query("insert into members values('$a',$b','$c','$d','$e','$f'",$con);
if(!$q)
{
echo "error in query".mysql_error();
}
session_start();
$_SESSION['sname'] = $a;
header("location:confrmreg.php");
}
else
{
echo "invalid id or password try again";
}
?>
the error is "DUPLICATE KEY 0 TO 1"
i made changes in query it was run only one time and redirect to other page successfully
but again i try . its gives the above error
i made changes in query it was run only one time and redirect to other page successfully
but again i try . its gives the above error
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023