i am having some problem with my PHP form . I have created everything and its posting the details to my mailbox the problem however is that in the message area all it shows is $text , it doesn't show what the visitor typed into that area all it shows is $text
here is the form
<html> <head><title>contact us </title> </head> <body><form action="step2.php" method ="post"> Name<br/><input type="text" name="username" /><br/> Email<br/><input type="text" name="email" /><br/> Inquiry<br/><textarea row="7" cols="70" name="inquiry" /></textarea><br/> <input type="submit"value="send your inquiry" /></form> </body> </html>
here is the PHP
<?php $name = $_POST['username']; $email = $_POST['email']; $text = $_POST['inquiry']; //To, Subject, Message, Header mai('firstname.lastname@example.org','Inquiry',$text,'From: '. $name .'<' . $email . '>'); '>'); header('location: step3.html') ?>
is there anything i am doing wrong ? Please if there is a better way which i can make a better submit form / PHP script please assist me . i would appreciate your help.