The error occurred while inserting the database.-php Tutorial

Source: Internet
Author: User
Let's take a look at this piece of code. there is a problem with the database insertion and no error is found.
                        
                 War-game-Add Your score                War game-add your score
 Thanks for adding your new high score!

'; Echo'

FIRST_NAME:'. $ First_name .'
'; Echo'LAST_NAME:'. $ Last_name .'

'; Echo'

Score:'. $ Score .'

'; Echo'

<Back to hight score

'; // Clear the score data to clear the form $ firet_name = ""; $ last_name = ""; mysqli_close ($ dbc) ;}?>
The table is like this.


Reply to discussion (solution)

An error occurred while importing data to mysql.

When an error occurs, what error is prompted?


$ Query = "insert into score_lis (first_name, last_name, score) VALUES ('$ first_name', '$ last_name', '$ score')"; space

Call to undefined function mysqli_connect () in/var/www/addscore. php on line 25

Check whether the extension = php_mysql.dl in php. ini has removed the annotation (; is the annotator). If yes, restart Apache.

Call to undefined function mysqli_connect () in/var/www/addscore. php on line 25
Thanks for searching for half a day. just look for the syntax and forget that I just re-configured the server today. thanks a lot.

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.