I have a stored procedure:
Create procedure news(in dt datetime,in title varchar(10),in desc varchar(200))
Begin
Insert into news values (dt,title,desc);
End
Now my php:
$db = new mysqli("","","","");
$dt = $_POST['date'];
$ttl = $_POST['title'];
$desc = $_POST['descrip'];
$sql = $db->query("CALL news('$dt','$ttl','$desc')");
if($sql)
{
echo "data sent";
}else{
echo "data not sent";
}
I'm new with php please help thank you
My php doesn't work i keep getting the "data not sent" message. Am I doing something incorrectly?