Jump to content

[SOLVED] Send request


Mr_J

Recommended Posts

Hi all,

This is NOT for my porn site! ;D

For users to register, they must enter the detail. Somewhere I lost it...

When I click the "SEND REQUEST", nothing happens:

 

<?php session_start();

$MYEMAIL = "[email protected]";

if ($ACTION=="send-mail")
{
    $sw = '';
    if ($disclaim <> '1'){ 
        $sw = '5';
        //echo "Disclaimer";
        }
    if ($email <> $email2){ $sw = '4';}
    if ($merchant."B" == "B"){ $sw = '3';}
    if ($email."B" == "B"){ $sw = '2';}
    if ($name."B" == "B"){ $sw = '1';} 
    
    
    if ($sw."B" == "B" ):
        $headers  = "From:".$email."\r\n";
        $headers .= "Bc: [email protected] \r\n"; 
        $SUBJECT  = "Pcd On-Line Registration";
        $MESSAGE .= "Name:\t" .$name. "\n";     
        $MESSAGE .= "Address:\t" .$adr. "\n";     
        $MESSAGE .= "Tel:\t\t" .$tel. "\n";     
        $MESSAGE .= "Email:\t" .$email. "\n";     
        $MESSAGE .= "Provider:\t" .$merchant. "\n";     
        $MESSAGE .= "Provider Tel:\t" .$merchantel. "\n";     
        $MESSAGE .= "Acc No:\t" .$accno. "\n";     
        $MESSAGE .= "Contract:\t" .$disclaim. "\n";     
        
        mail($MYEMAIL,$SUBJECT,$MESSAGE,$headers);
        header ("Location: thankyfmail.php?mail=preg"); 

echo "Application e-mailed";        
        exit;

    else:
        
        $ACTION = nothing;
    
    endif;
    echo "value of err".$sw."<br>";
    echo "value of Tel".$tel."<br>";
    echo "value Cont-A".$disclaim."<br>";
    echo "value Cont-B".$chk[$disclaim]."<br>";

$chk[$disclaim] = "checked";

}
?>

<td  align="center"><input type="submit" value="Send Request" method="send-mail"></td>

For validation:

<?Php
      SWITCH ($sw){
        case "1":
            echo "Please enter your name!";
            break;
        case "2":
            echo "Please enter your e-mail!";
            break;
        case "3":
            echo "Please enter your PCD provider!";
            break;
        case "4":
            echo "Please re-enter your email";
            break;
        }
?> 

http://medbel.co.za/php/registerpcd.php

Any help please?

Link to comment
https://forums.phpfreaks.com/topic/135482-solved-send-request/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.