Ok I am using the $_POST command and it works for all my text fields. For my comments section which is a textarea it doesn't carry it over. Is there a special command I use for this?
Nope, everything should be in $_POST. Is it the same form? If not, maybe your using the get method on the comments section? Maybe you've accidentally closed the form before the textarea, if it is the same form?
I get nothing on the next page no matter what I type in.
you need to reply to jstarkey ?
kind regards paul
Form page
<form action='regprocess.php' method=post> <font size='+1'>Several portions of this site require you to be logged in to use. These portions are for the use of LCF members only. <p>If you are a member please fill out the form below completely to create your account.</font> <p><hr> <p><INPUT TYPE='Text' NAME='user' SIZE='15' MAXLENGTH='15'> <br><b>Username</b> <p><INPUT TYPE='Text' NAME='password' SIZE='15' MAXLENGTH='15'> <br><b>Password</b> <p><hr> <p><font size='+1'>This information will be used for the online Church directory, only members of the Church will have access to it.</font> <p><INPUT TYPE='Text' NAME='first' SIZE='30' MAXLENGTH='30'> <br><b>First Name</b> <p><INPUT TYPE='Text' NAME='last' SIZE='30' MAXLENGTH='30'> <br><b>Last Name</b> <p><INPUT TYPE='Text' NAME='address' SIZE='60' MAXLENGTH='60'> <br><b>Address</b> <p><INPUT TYPE='Text' NAME='city' SIZE='30' MAXLENGTH='30'> <br><b>City</b> <p><INPUT TYPE='Text' NAME='zip' SIZE='5' MAXLENGTH='5'> <br><b>Zip Code</b> <p><INPUT TYPE='Text' NAME='hphone' SIZE='10' MAXLENGTH='10'> <br><b>Home Phone</b> <p><INPUT TYPE='Text' NAME='cphone' SIZE='10' MAXLENGTH='10'> <br><b>Alternate/Cell</b> <p><TEXTAREA NAME='comments' COLS=40 ROWS=5></TEXTAREA> <br><b>Additional Comments</b> <p><INPUT TYPE='Submit' VALUE='Submit'> </form>
Then the regprocess.php page
<?php $user = $POST['user']; $password = $POST['password']; $first = $POST['first']; $last = $POST['last']; $address = $POST['address']; $city = $POST['city']; $zip = $POST['zip']; $hphone = $POST['hphone']; $cphone = $POST['cphone']; $comments = $POST['comments']; $toaddress = 'email@address.net'; $subject = 'New User'; $mailcontent = 'Username: '.$user."\n". 'Password: '.$password."\n". 'First Name: '.$first."\n". 'Last Name: '.$last."\n". 'Address: '.$address."\n". 'City: '.$city."\n". 'ZipCode: '.$zip."\n". 'Home Phone '.$hphone."\n". 'Cell Phone '.$cphone."\n". 'Comments '.$Comments."\n"; $fromaddress = 'From: [email]webserver@lcfphx.org[/email]'; mail($toaddress, $subject, $mailcontent, $fromaddress); header("Location: regcomplete.php"); ?>
<?php $user = $POST['user']; $password = $POST['password']; $first = $POST['first']; $last = $POST['last']; $address = $POST['address']; $city = $POST['city']; $zip = $POST['zip']; $hphone = $POST['hphone']; $cphone = $POST['cphone']; $comments = $POST['comments'];
$toaddress = 'email@address.net'; $subject = 'New User'; $mailcontent = 'Username: '.$user."\n". 'Password: '.$password."\n". 'First Name: '.$first."\n". 'Last Name: '.$last."\n". 'Address: '.$address."\n". 'City: '.$city."\n". 'ZipCode: '.$zip."\n". 'Home Phone '.$hphone."\n". 'Cell Phone '.$cphone."\n". 'Comments '.$Comments."\n"; $fromaddress = 'From: [email]webserver@lcfphx.org[/email]'; mail($toaddress, $subject, $mailcontent, $fromaddress); header("Location: regcomplete.php");
?>
Near the bottom, in your message contents, you're using $Comments. Change that to $comments. (lower case C)
Also, if you're going to use $_POST that way, you can save some code by doing:
foreach( $_POST as $name => $value ) $$name = $value;