A question about building a test form in php

Source: Internet
Author: User
Why does PHPcode & lt ;? Php $ conmysql_connect (& quot; localhost & quot;, & quot; root & quot;, & quot;); mysql_select_db (& quot; test & quot ;); mysql_query (& quot; setnamesgb231 for a question about building a test form in php
PHP code
  
  

This is the initial server config.
PHP code
  
  ";if (!$_POST["test_name"]){    echo "create test";    echo "
  
  
   
   ";    echo "";    echo "
  
  
";}else { include 'config.php'; $content=$_POST["test_name"]; $sql="insert into question('content') values('$content')"; if (mysql_query($sql)) { echo "create test_content successfull!!!"; echo "

"; echo "clickhereto add question"; } else "error!!!".mysql_error(); mysql_close();}echo "

";?>

The problem is that the form cannot be created. please help me with some advice... why is this happening... thank you.

------ Solution --------------------
$ SQL = "insert into question ('content') values ('$ content')"; // The comment symbol of content is wrong.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.