MySQL Forums
Forum List  »  PHP

Re: image not beimg saved to database through php
Posted by: Larry Seymour
Date: August 31, 2016 09:14PM

the php returns the new id that is autop generated and i put out to the comnsole
php is
else if ($type === "add")
{
//echo $picture;
$stmt = $conn->prepare('INSERT INTO meals (user_id,meal,comment,date,taste,feeling,mealPic) values(?,?,?,?,?,?,?)');
$stmt->bind_param('isssiib',$user_id,$meal,$scribble,$date,$taste,$feeling,$picture);
//$stmt->send_long_data(0,$codedPic);
$stmt->execute();
$stmt->store_result();
$stmt->fetch();
$newId = $conn->insert_id;
echo $newId;
}

the echo received by app is
id received from db: 70

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.