Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead.
connect.php
error in:
<?php function connections(){
$user="root";
$pass="";
$server="localhost";
$db="db";
$con=mysql_connect($server,$user,$pass) or die ('Connection failed: '.mysql_error());
mysql_select_db($db,$con) or die ('Could db: '.mysql_error());
return $con;
}
?>
insertcase.php
error in:
$con=connections();
$query="insert into caso values ('','$date','name')";
$cierto=mysql_query($query,$con);
if(!$cierto){
echo "No saved";
}
else {
$query= mysql_query("SELECT @@identity AS id ");
if ($row = mysql_fetch_row($query))
{
$id = trim($row[0]);
}
echo '<script>alert (" tickect is: '.$id.'"); window.location="../index.php";</script>';
}
please help... :)