php - Submitting form to database error -


this question has answer here:

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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -