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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -