php code is not working,showing
Fatal error: Call to undefined function mysq1i_query()
<?php
$dbhost='localhost';
$dbuser='root';
$dbpass='';
$conn=mysqli_connect($dbhost,$dbuser,$dbpass,"vishal");
$passkey=$_GET['passkey'];
$tblname="data";
$sql="SELECT * FROM $tblname WHERE confirmcode='$passkey'";
$result=mysq1i_query($sql);
if($result)
{
$count=mysqli_num_rows(($result));
if($count==1)
{
$rows=mysqli_fetch_array($result);
$name=$rows['name'];
$emailid=$rows['emailid'];
$password=$rows['password'];
$confirm=$rows['confirm'];
$country=$rows['country'];
$table2="data1";
$sql2="INSERT INTO $table2 (name,emailid,password,confirm,country)VALUES ('$name','$emailid','$password','$confirm','$country')"; $result1=mysqli_query($sql2);
}
else
{
echo"wrong cofirmation code";
}
if($result1)
{
echo"your account has been activated";
$sql3="DELETE FROM $tblname WHERE confirm_code='$passkey'";
$result2=mysqli_query($sql3);
}
}
?>
You have an error in this line:
$result=mysq1i_query($sql);
Its l not 1 in (mysq1i)
Correct one is:
$result=mysqli_query($sql);
And when you get this error Undefined Function it means you do not define this function in your code.
you have used on line no: 9
$result=mysq1i_query($sql);
instead of
$result=mysqli_query($sql);