formmail

From: Date: Thu, 15 May 2003 13:47:33 +0000
Subject: formmail
Groups: php.general 
Request: Send a blank email to php-general+get-147703@lists.php.net to get a copy of this message
Hi All, I have got a form that I want to send as mail to an address. I can't use the MAILTO method, because it requires a mail client on the users machine. Most of my clients do not have mail client, they use any webmail provider as well. How can I send the form as mail, if there is no php installed on my server? But I can use an another server with php installed. I've put in the form tag the target... If I hit the submit button, a new window will be open with this address line: http://www.myserver.hu/reporttocs.html?uname=THENAME&clanname=CLAN&emailaddr=C@CC.COM&mobile=06012301232&polosize=S&agreecheck=on&submit=Elk%FCld So the phpmail.php can't get the form fields. WHYYYYY? The form is: <FORM target="http://www.softbolt.hu/phpmail.php" onsubmit="return formCheck(this);"> <TABLE width=100%> <tr><td class="verdana10" align="right">Név: <td align="left"><INPUT TYPE="text" NAME="uname" MAXLENGTH="30" > <tr><td class="verdana10" align="right">Klán neve: <td align="left"><INPUT TYPE="text" NAME="clanname" MAXLENGTH="30" > <tr><td class="verdana10" align="right">Te vagy a klánvezér? <td align="left"><INPUT TYPE="checkbox" NAME="leader" > <tr><td class="verdana10" align="right">e-mail cím: <td align="left"><INPUT TYPE="text" NAME="emailaddr" VALUE="@"> <tr><td class="verdana10" align="right">Mobilszám: <td align="left"><INPUT TYPE="text" NAME="mobile" VALUE="06"> <tr><td class="verdana10" align="right">Pólóméretem: <td align="left"><SELECT NAME="polosize"><OPTION VALUE="S">S<OPTION VALUE="M">M<OPTION VALUE="L">L<OPTION VALUE="XL">XL<OPTION VALUE="XXL">XXL</SELECT> <tr><td class="verdana10" align="right">A szabályokat elfogadom <td align="left"><INPUT TYPE="checkbox" NAME="agreecheck" onClick="agreesubmit(this)"> <tr><td>&nbsp; <td align="left"><INPUT TYPE="submit" NAME="submit" VALUE="Elküld" disabled> <tr><td>&nbsp; <td class="verdana10" align="left"><a href="javascript:window.close();">bezár</a> </TABLE> </FORM> ------------- Here is my phpmail.php: ------------ <?php $to = "info@matrix-cafe.hu"; $subject = "Jelentkezési lap"; $body = ""; if( $_POST['cname'] ) { $body = sprintf( "Nevezõ: %s\n", $_POST['uname'] ); } if( $_POST['clanname'] ) { $body. = sprintf( "Klán : %s\n", $_POST['clanname'] ); } if( $_POST['leader'] ) { if( $_POST['leader'] == 'on' ) { $body. = "Klánvezér\n"; } if( $_POST['emailaddr'] ) { $body. = sprintf( "email : %s\n", $_POST['emailaddr'] ); } if( $_POST['mobile'] ) { $body. = sprintf( "mobil : %s\n", $_POST['mobile'] ); } if( $_POST['polosize'] ) { $body. = sprintf( "póló : %s\n", $_POST['polosize'] ); } $rt = @mail($to, $subject, $body, "From: webmaster@$SERVER_NAME\r\n" ."Reply-To: webmaster@$SERVER_NAME\r\n" ."X-Mailer: PHP/" . phpversion());); ?> ------- Thanx for any answer regards Franz

« previous php.general (#147703) next »