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

  • Home
  • SEARCH
  • 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 6850497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:07:55+00:00 2026-05-27T01:07:55+00:00

I am developing a web application that allows a user to add entries to

  • 0

I am developing a web application that allows a user to add entries to a MySQL database through a web form. The web form posts to the same page, some PHP code captures that data and sends it to MySQL. For whatever reason, nothing ever makes it to MySQL. This is the code I have so far that isn’t working:

    <?php
    include("config.inc.php");
    $Name=$_POST['AddName'];
    $Group=$_POST['AddGroup'];
    $Grade=$_POST['AddGrade'];
    $Position=$_POST['AddPosition'];
    $Email=$_POST['AddEmail'];
    $HomeAddress=$_POST['AddHomeAddress'];
    $City=$_POST['AddCity'];
    $State="SC";
    $Zip=$_POST['AddZIP'];
    $CellPhone=$_POST['AddCellNumber'];
    $HomePhone=$_POST['AddHomeNumber'];
    $FirstPeriod=$_POST['AddFirstPeriod'];
    $SecondPeriod=$_POST['AddSecondPeriod'];
    $ThirdPeriod=$_POST['AddThirdPeriod'];
    $FourthPeriod=$_POST['AddFourthPeriod'];
    $FifthPeriod=$_POST['AddFifthPeriod'];
    $SixthPeriod=$_POST['AddSixthPeriod'];
    $SeventhPeriod=$_POST['AddSeventhPeriod'];
    $Homeroom=$_POST['AddHomeroom'];
    $dbpassword=$_POST['AddPassword'];

    $con = mysql_connect("127.0.0.1","$username","******");
    if (!$con)
      {
      die();
      }        

    mysql_select_db("$database", $con);
    $sql="INSERT INTO names     (Name,Grp,Grade,Position,Email,HomeAddress,City,State,Zip,CellPhone,HomePhone,FirstPeriod,SecondPeriod,ThirdPeriod,FourthPeriod,FifthPeriod,SixthPeriod,SeventhPeriod,Homeroom)
    VALUES('$Name','$Group','$Grade','$Position','$Email','$HomeAddress,'$City','$State','$Zip','$CellPhone','$HomePhone','$FirstPeriod','$SecondPeriod','$ThirdPeriod','$FourthPeriod','$FifthPeriod','$SixthPeriod','$SeventhPeriod','$Homeroom')";

    if (!mysql_query($sql,$con))
      {
      die();
      }
    echo "1 record added";

    mysql_close($con)
    ?>
            </body>
    </html>
  • 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-27T01:07:55+00:00Added an answer on May 27, 2026 at 1:07 am

    Try this and see what it says:

    if (!mysql_query($sql,$con))
    {
        die(mysql_error());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing a web application that receives data from an on-site database.
I'm developing an internal web application, that allows me to store remote control credentials
I'm currently developing a web application that has one feature while allows input from
I'm possibly developing a web-based application that allows users to create individual pages. I
I'm developing a web application that is targeted at IE and during testing would
We are developing a web application that will be sold to many clients. There
I'm developing a web application that uses an in-house SSO server for authentication. I
I'm developing a Web application that will let users upload images. My concern is
I'm developing a web application that shows some controls and descriptions dynamically (I don't
I'm developing a web application that is going to be served from an OSGi

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.