RE: [PHP] formmail
| From: | Dan Joseph | Date: | Thu, 15 May 2003 13:49:44 +0000 |
| Subject: | RE: [PHP] formmail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147704@lists.php.net to get a copy of this message | ||
Hi Franz,
use $_GET instead of $_POST, and that will solve you problem. Anything
coming thru the URL is a $_GET, anything submitted from a web page form is
$_POST.
-Dan Joseph
> -----Original Message-----
> From: Franz Max [mailto:fbuzas@matrix-cafe.hu]
> Sent: Thursday, May 15, 2003 9:48 AM
> To: php-general@lists.php.net
> Subject: [PHP] formmail
>
>
> 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â«Å
> ’ëd
,¹e÷*
> &emailaddr=C@CC.COM&mobile=06012301232&polosize=S&agreecheck=on&su
> bmit=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>
> <td align="left"><INPUT TYPE="submit" NAME="submit"
> VALUE="Elküld"
> disabled>
> <tr><td>
> <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
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>