I'm getting a deprecated error with the following code
require 'dbconfig.php';
function checkuser($fuid,$ffname,$femail){
$check = mysql_query("select * from Users where Fuid='$fuid'");
$check = mysql_num_rows($check);
if (empty($check)) { // if new user . Insert a new record
$query = "INSERT INTO Users (Fuid,Ffname,Femail) VALUES ('$fuid','$ffname','$femail')";
mysql_query($query);
} else { // If Returned user . update the user record
$query = "UPDATE Users SET Ffname='$ffname', Femail='$femail' where Fuid='$fuid'";
mysql_query($query);
}
}
but every time I try to use mysqli
I get a error
Warning: Cannot modify header information - headers already sent by
what should I do?
Warning. This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include:
mysqli_connect() PDO::__construct()
http://php.net/manual/en/function.mysql-connect.php
Cannot modify header information - This error has nothing to do with databases.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.