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 8543241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:15:19+00:00 2026-06-11T12:15:19+00:00

Here is the code: contact_us2.php <form id=form1 method=post action=enquires.php> <fieldset> <legend>Form to database example</legend>

  • 0

Here is the code:
contact_us2.php

   <form id="form1" method="post" action="enquires.php">
 <fieldset>
 <legend>Form to database example</legend>
  <label for="text">
      <span>Comments:</span>
    <textarea id="text" name="comments" rows="4" cols="80"></textarea>
      </label>
      <label for="name">
     <span>Name:</span>
      <input id="name" type='text' name='name' size='50'/>
       </label>
      <label for="email">
    <span>Email:</span>
  <input id="email" type='text' name='email' size='50'/>
      </label>

     <label for="submit1" id="submit"><span>&nbsp;</span>
      <input id="submit1" class="submit" type="submit" name="submit" value="Submit"/>
      </label>
     </fieldset>
    </form>


                 enquires.php

                <?php
        session_start();
        error_reporting(E_ALL & ~E_NOTICE);
        require('authenticate.php');
        include_once"../scripts/connect_to_mysql.php";
        $name  = $_post['name'];
        $email = $_post['email'];
        $comments = $_post['comments'];
        echo "$email";
        // Query the body section for the proper page
        mysql_select_db("hardware_cms" )or die (mysql_error());
        $sqlCommand = MYSQL_QUERY("INSERT INTO enquires (id, name, email,      comments)". "VALUES ('NULL', '$name', '$email', '$comments')") or die (mysql_error()); 
        ?>

There is no errors. The only thing that is inserted into the database is the id. I think the problem is in contact_us2.php. I’m new to html and php sorry if this is a silly question.

  • 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-06-11T12:15:20+00:00Added an answer on June 11, 2026 at 12:15 pm

    The error is in the php code because you have to use $_POST and don’t $_post

     $name  = $_POST['name'];
     $email = $_POST['email'];
     $comments = $_POST['comments'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here my code, I need to insert into mysql database I have mysql,php,android 1)
Here is code my jqgrid editing through form. $(#DataEnergy).jqGrid('navGrid', '#pagergrid', {}, //options {editdata: {
Here is code example class A{ int i; public: A(int i) : i(i) {}
here is my code about jquery post. I can't make it work somehow. I
Here's my updated code trying to get my form to send me the email.
here is the code of the calling method - NameValuePair[] data = { new
I have a question about Ajax form submit. Here is the code: Controller [HttpPost,
The script is on jsfiddle here : CODE What it does at the moment
Ok the error is showing up somewhere in this here code if($error==false) { $query
Here is code from MSDN . I don't understand why the work isn't just

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.