php - Submitting form to database error -
this question has answer here:
- php parse/syntax errors; , how solve them? 11 answers
i'm trying add simple form data mysql databse , seems not work.
it gives me error
parse error: syntax error, unexpected ';' in portfolio-add-website.php on line 7
and portfolio-add-website.php looks this:
<?php include 'connect_db.php'; $connect = mysqli_connect(host,username,password,db); mysqli_query($connect,"insert portfolio_websites (name, link, description, profile_img_name, cover_img_name, client_name, donedate) values ('$_post[name]', '$_post[link]', '$_post[description]', '$_post[profile_img_name]', '$_post[cover_img_name]', '$_post[client_name]', '$_post[donedate]')"; ?>
i don't see unexpected ";". can me? i'm sure it's small.
you missed closing brace
mysqli_query($connect,"insert portfolio_websites (name, link, description, profile_img_name, cover_img_name, client_name, donedate) values ('$_post[name]', '$_post[link]', '$_post[description]', '$_post[profile_img_name]', '$_post[cover_img_name]', '$_post[client_name]', '$_post[donedate]')");
Comments
Post a Comment