Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7594683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:28:55+00:00 2026-05-30T21:28:55+00:00

So I am a beginner and I was reading a tutorial here: http://www.freewebmasterhelp.com/tutorials/phpmysql/4 on

  • 0

So I am a beginner and I was reading a tutorial here: http://www.freewebmasterhelp.com/tutorials/phpmysql/4 on how to add values into my database.

This is my database:

enter image description here

This is the query string provided by the tutorial:

"INSERT INTO contacts VALUES ('$first','$last','$phone','$mobile','$fax','$email','$web')";

Notice that the tutorial does not provide the ID on the query because it should auto-increase everytime you add a record. In my case, if I do not enter a number it does not auto-increase and in fact it does not add the record

If I manually set the number as such below, it works.

('2','$first','$last','$phone','$mobile','$fax','$email','$web')";

What I’m I doing wrong? Is it because the database is local?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:28:56+00:00Added an answer on May 30, 2026 at 9:28 pm

    I noticed the tutorial put ” as the first column, whereas you are leaving it out. I would assume you are getting an error from the MySQL engine which you are not checking.

    Personally, I always use an explicit list (this protects you in case of table re-arrangement or re-factoring):

    "INSERT INTO contacts (first, last, phone, mobile, fax, email, web)
    VALUES ('$first','$last','$phone','$mobile','$fax','$email','$web')";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading one tutorial :- http://www.tutorialized.com/view/tutorial/Integrating-Flash-and-mySQL/2334 But i can't understand what is Gateway.php
I`m a beginner reading a tutorial about Dates in JavaScript, and it gives this
I am a beginner in C. While reading git's source code, I found this
I am a beginner to the ASP.Net MVC. After reading many tutorials and digesting
I am just a beginner at windows programming and was reading a tutorial about
I was reading a beginners tutorial on android development which had this line in
I was reading this tutorial for a simple PHP login system . In the
Beginner programmer here. after a bunch of reading about 'variables' which dont exist in
I am beginner in Java, and I was reading the topic of giving values
I'm a beginner to reading assembly language and I'm looking for a good assembly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.