Hi all,
I created an HTML form to be processed by a PHP script. No matter what I do, the data from the form is not passed to the $_POST variables. It's probably something very simple that I'm missing.
This is the form code:
<form action="contact.php" method="post" name="contact_us">
<label for="name">Your name:</label><br /><input name="name" value="" type="text" size="29" maxlength="75"/>
<br />
<br />
<label for="email">Your email: </label><br /><input name="email" value="" type="text" size="29" maxlength="100" />
<br />
<br />
<label for="message">Your message: </label>
<br />
<textarea name="message" cols="25" rows="5"></textarea>
<br />
<input name="user_submit" type="button" value="Submit" id="submit_btn" /><input name="form_clear" type="reset" value="Clear" id="clear_btn" />
</form>
And this is the PHP code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$msg = $_POST['message'];
$message = "\n\n Name: ".$name."\n\n Email: ".$email."\n\n Message: ".$msg."\n\n Please contact them soon.";
echo "$message";
?>
A few things I have tried include changing to quotation marks in the $_POST variable ($_POST["name"]), as well as removing any quotes ($_POST[name]). I'm at a bit of a loss as it has been about 5 years since I last did any web design and programming.
Thank you in advance!