InMotion Hosting Support Center

issue posting customer info to database

Category: Databases

2013-01-20 3:16 pm EST

Hits: 518
I was following along with the tutorial at

I've set up the database and table using MySQL Wizard and phpMyAdmin.

I've put together the following 4 php files as instructed:

1. formcode_2.php
2. manage_customer_info.php
3. page1_B.php
4. page2_B.php

When I go the URL I'm able to input my customer information into the fields, and when I click on Submit I get the Thank You message.

The problem that I'm having is that when I go back to phpMyAdmin to see if the information that I entered, the table isn't showing any results. All it says is "MySQL returned an empty result set (i.e. zero rows)."

In the $con = mysql_connect line of my "manage_customer_info.php" file I have "localhost" as the server.

Does anyone know why the information that I entered isn't getting posted on the database?


You must login before you can ask a follow up question.

You must login before you can submit an answer.



5,889 Points
2013-01-21 11:16 am EST
Thank you for your question alexinmo!

Sorry for the trouble with the script not working. We checked your code and found it missing the query to run the INSERT into your database. I verified the variables are being received from the form. I added code in your public_html/manage_customer_info.php file that will displays what was entered in the form.

You will need to add the code that runs the INSERT script. please see the following link on this.

Using PHP to INSERT data into a database

Unfortunately, because we need the current cPanel password to check PhpMyAdmin, we are not able to test the SQL to see if its working or look at your database tables to see what the values are. Because this is a public forum, you will want to get with tech support over chat or by phone to see if you can have them check the database in PhpMyAdmin for the data INSERT. Sorry for the trouble.

James R

You must login before you can post a comment about this answer.

Like this Question?

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!