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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:51:59+00:00 2026-05-27T20:51:59+00:00

I have a simple contact form on a website that has 2 text fields,

  • 0

I have a simple contact form on a website that has 2 text fields, 1 textarea, and 1 hidden field.

For some reason, all the fields POST to a PHP script except the textarea. I have done this a thousand times before and never had this issue.

Here is my HTML:

<form action="scripts/contactform.php" method="post">
<table width="0" border="0" cellspacing="3" cellpadding="5" class="gpass">
  <tr>
    <td>Name:</td>
    <td><input name="name" type="text" maxlength="50" /></td>
  </tr>
  <tr>
    <td>E-mail:</td>
    <td><input name="email" type="text"/></td>
  </tr>
  <tr>
    <td>Message:</td>
    <td><textarea name="comment" id="comment" cols="30" rows="5"></textarea>
    <input type="hidden" value=" <?php echo $_SERVER['REMOTE_ADDR'];?>" name="address" />
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center"><input name="submit" type="submit" value="Submit" class="noround" id="regbut" /><input name="reset" type="reset" value="Reset" class="noround" id="regbut"/></td>
  </tr>
</table>
</form>

And my script looks like this:

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) 
{
    die('Failed to connect to server: ' . mysql_error());
}

$db = mysql_select_db(DB_DATABASE);
if(!$db) 
{
    die("Unable to select database");
}

$name = mysql_real_escape_string($_POST['name']);
$email = mysql_real_escape_string($_POST['email']);
$comment = mysql_real_escape_string($_POST['comment']);
$ipaddress = mysql_real_escape_string($_POST['address']);

I have a few things to process the data underneath this, but that doesn’t matter since the $comment variable isn’t being defined. I’ve searched the entire script and there are no conflicting variable names.

I am completely stumped on why this is happening. I’ve successfully processed textarea‘s on my site multiple times before, so this really is confusing.

  • 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-27T20:51:59+00:00Added an answer on May 27, 2026 at 8:51 pm

    I once experienced an error similar to yours. What helped me was to use different id and name parameters. Try and see for yourself, because you have them identical here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple contact form with Subject and Message that I want to
Have created simple Ajax enabled contact forms before that have around 12 fields -
I have a website that has an index.php, a few simple .html pages and
I have a simple contact form that works in every browser, except IE. It
i have developed a simple php contact form, that's working fine, but i am
I have a very simple contact form with fields like this: <label> First Name<em>*</em>
I have a very simple model form, but for some reason, the code fails
I have a simple contact form with name, email, a select list, and textarea.
I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input
I have a simple contact form thats throwing up an Notice: Undefined index: e

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.