Php mysqli and stored-procedure
Posted
by Mneva skoko
on Stack Overflow
See other posts from Stack Overflow
or by Mneva skoko
Published on 2010-04-27T08:18:45Z
Indexed on
2010/04/27
8:23 UTC
Read the original article
Hit count: 293
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
© Stack Overflow or respective owner