Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36

Thread: Form email notification depends on drop down

  1. #21
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by elwinh View Post
    ';
    $headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

    mail($to, $subject, $message, $headers);
    ?> [/PHP]
    it is not required to put the any of those additional headers. they were just listed as a reference of how to create multiple additional headers... but what is important is to note that you do need to encapsulate the string inside some form of quotes, which was the problem

  2. #22
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Done this and got
    Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/wichita/public_html/Registr/Registration.php on line 87
    Not to confuse things, but
    This works but need the value in form to be wichita not email address
    added at line 39 $locationEmail = $_POST['Track'];
    and change the orginal
    mail("email address","".$FirstName." ".$RaceDate." Race Registration",
    $message,"From: $EMail");
    To
    mail("$locationEmail","".$FirstName." ".$RaceDate." Race Registration",
    The form looks like
    <select name='Track' style="font-weight: bold; font-style:italic">
    <option value='email address' selected>Wichita
    <option value="email address">Hutchison</option>
    </select>
    Which cant it needs to be because I display the value on other page and dont want to display email address
    <select name='Track' style="font-weight: bold; font-style:italic">
    <option value='Wichita' selected>Wichita
    <option value="Hutchison">Hutchison</option>
    </select>

  3. #23
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    what happened to the array that I posted? that will take the value of the dropdown and insert the email address into the "to" rather then the name of the track.

    and since there have been multiple updates, can you please post your code again? I will examine the whole script instead of just error by error, to hopefully get this working for you.

    ps dont forget to wrap the script in
    [p.hp]
    [/p.hp]
    tags without the dot(s)

  4. #24
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default boogymans coding mod

    Here is what I have but with error
    Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/wichita/public_html/Registr/Registration.php on line 87
    PHP Code:
    <?php
    include("global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input.<ul>";
    pt_register('POST','FirstName');
    pt_register('POST','LastName');
    pt_register('POST','Address');
    pt_register('POST','City');
    pt_register('POST','State');
    pt_register('POST','ZipCode');
    pt_register('POST','HomePhone');
    pt_register('POST','CellPhone');
    pt_register('POST','EMail');
    pt_register('POST','MembershipNo');
    pt_register('POST','RoarNo');
    pt_register('POST','FirstClass');
    pt_register('POST','TransmitterFrequency');
    pt_register('POST','TransponderNo');
    pt_register('POST','TrackTransponder');
    pt_register('POST','SecondClass');
    pt_register('POST','TransmitterFrequency2');
    pt_register('POST','TransponderNo2');
    pt_register('POST','TrackTransponder2');
    pt_register('POST','AbilitySkillLevel');
    pt_register('POST','RaceDate');
    pt_register('POST','Track');
    pt_register('POST','IPAddress');
    pt_register('POST','DatePosted');
    if(
    $FirstName=="" || $LastName=="" || $Address=="" || $City=="" || $State=="" || $ZipCode=="" || $EMail=="" || $FirstClass=="" || $TransmitterFrequency=="" || $AbilitySkillLevel=="" || $RaceDate=="" || $Track=="" ){
    $errors=1;
    $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
    }
    if(!
    eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EMail)){
    $error.="<li>Invalid email address entered";
    $errors=1;
    }
    $IPAddress $HTTP_SERVER_VARS["REMOTE_ADDR"];
    $DatePosted date("Y-m-d h:i");
    $EMail trim(strip_tags(strtolower($_POST['Track']))); 
    $checkArray = array( 
      
    'Wichita' => 'email address'
      
    'Hutchison' => 'email address',
      
    'A Main' => 'email address',
      
    'Pea Body' => 'email address',
      
    'Newton' => 'email address',
      
    'Action RC' => 'email address',
      
    'Enid' => 'email address',
    ); 
    $to $checkArray[$EMail];
    if(
    $errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    $message="First Name: ".$FirstName."
    Last Name: "
    .$LastName."
    Address: "
    .$Address."
    City: "
    .$City."
    State: "
    .$State."
    Zip Code: "
    .$ZipCode."
    Home Phone: "
    .$HomePhone."
    Cell Phone: "
    .$CellPhone."
    E Mail: "
    .$EMail."
    Membership No: "
    .$MembershipNo."
    Roar No: "
    .$RoarNo."
    First Class: "
    .$FirstClass."
    Transmitter Frequency: "
    .$TransmitterFrequency."
    Transponder No: "
    .$TransponderNo."
    Track Transponder: "
    .$TrackTransponder."
    Second Class: "
    .$SecondClass."
    Transmitter Frequency2: "
    .$TransmitterFrequency2."
    Transponder No2: "
    .$TransponderNo2."
    Track Transponder2: "
    .$TrackTransponder2."
    Ability Skill Level: "
    .$AbilitySkillLevel."
    Race Date: "
    .$RaceDate."
    Track: "
    .$Track."
    IP Address: "
    .$IPAddress."
    Date Posted: "
    .$DatePosted."
    "
    ;
    $link mysql_connect("localhost","login","logmein");
    mysql_select_db("wichita",$link);
    $query="insert into Registration (First_Name,Last_Name,Address,City,State,Zip_Code,Home_Phone,Cell_Phone,E_Mail,Membership_No,Roar_No,First_Class,Transmitter_Frequency,Transponder_No,Track_Transponder,Second_Class,Transmitter_Frequency2,Transponder_No2,Track_Transponder2,Ability_Skill_Level,Race_Date,Track,IP_Address,Date_Posted) values ('".$FirstName."','".$LastName."','".$Address."','".$City."','".$State."','".$ZipCode."','".$HomePhone."','".$CellPhone."','".$EMail."','".$MembershipNo."','".$RoarNo."','".$FirstClass."','".$TransmitterFrequency."','".$TransponderNo."','".$TrackTransponder."','".$SecondClass."','".$TransmitterFrequency2."','".$TransponderNo2."','".$TrackTransponder2."','".$AbilitySkillLevel."','".$RaceDate."','".$Track."','".$IPAddress."','".$DatePosted."')";
    mysql_query($query);
    $message stripslashes($message);  
    $subject $FirstName." "$RaceDate ." Race Registration";  
    if( !
    mail($to$subject$message"From: ".$Email) )  
    { {
    echo 
    "<h1>Unable to send email; Please try again later</h1>"

    else
    {
       echo 
    "<h1>Email Sent! Thank You</h1>";
    }  

    ?>


    <!-- This is the content of the Thank you page, be careful while changing it -->

    <body bgcolor="#FFFFFF">

    <h2 align="center"><h2 align="center">Registration Confirmation 
    <a href="#" onclick="window.print();return false;"><font size="2">PRINT</font></a><h2>
    </h2></h2>

    <div align="center">

    <table width="100%">
    <tr><td width="114">First Name: </td><td width="199" style="font-weight: bold"> <?php echo $FirstName?> </td>
        <td width="164">First Class: </td><td style="font-weight: bold"> <?php echo $FirstClass?> </td></tr>
    <tr><td width="114">Last Name: </td><td width="199" style="font-weight: bold"> <?php echo $LastName?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency?> </td></tr>
    <tr><td width="114">Address: </td><td width="199" style="font-weight: bold"> <?php echo $Address?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo?> </td></tr>
    <tr><td width="114">City: </td><td width="199" style="font-weight: bold"> <?php echo $City?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder?> </td></tr>
    <tr><td width="114">State: </td><td width="199" style="font-weight: bold"> <?php echo $State?> </td>
        <td width="164">Second Class: </td><td style="font-weight: bold"> <?php echo $SecondClass?> </td></tr>
    <tr><td width="114">Zip Code: </td><td width="199" style="font-weight: bold"> <?php echo $ZipCode?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency2?> </td></tr>
    <tr><td width="114">Home Phone: </td><td width="199" style="font-weight: bold"> <?php echo $HomePhone?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo2?> </td></tr>
    <tr><td width="114">Cell Phone: </td><td width="199" style="font-weight: bold"> <?php echo $CellPhone?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder2?> </td></tr>
    <tr><td width="114">E Mail: </td><td width="199" style="font-weight: bold"> <?php echo $EMail?> </td>
        <td width="164">Ability Skill Level: </td><td style="font-weight: bold"> <?php echo $AbilitySkillLevel?> </td></tr>
    <tr><td width="114">Membership No: </td>
        <td width="199" style="font-weight: bold"> <?php echo $MembershipNo?> </td>
        <td width="164">Race Date: </td><td style="font-weight: bold"> <?php echo $RaceDate?> </td></tr>
    <tr><td width="114">Roar No: </td><td width="199" style="font-weight: bold"> <?php echo $RoarNo?> </td>
        <td width="164">Track: </td>
        <td style="font-style: italic; font-weight: bold"> <?php echo $Track?> </td></tr>
    <tr><td width="114">&nbsp;</td><td width="199"> &nbsp;</td><td width="164">Date Posted: </td><td> <?php echo $DatePosted?> </td></tr>
    </table>
    </div>
    <!-- Do not change anything below this line -->

    <?php 
    }
    ?>

  5. #25
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default A hole differant code mod base from the very 1st post

    Another attempt. The problem is the form field value is the email address. It cant be because I display it the form field value on another page and dont want it to be an email address I guess an array or something is needed? How?
    What was Changed line added 39 and modified line 69 from origanal PHP file. then made the form field values email address
    PHP Code:
    <?php
    include("global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input.<ul>";
    pt_register('POST','FirstName');
    pt_register('POST','LastName');
    pt_register('POST','Address');
    pt_register('POST','City');
    pt_register('POST','State');
    pt_register('POST','ZipCode');
    pt_register('POST','HomePhone');
    pt_register('POST','CellPhone');
    pt_register('POST','EMail');
    pt_register('POST','MembershipNo');
    pt_register('POST','RoarNo');
    pt_register('POST','FirstClass');
    pt_register('POST','TransmitterFrequency');
    pt_register('POST','TransponderNo');
    pt_register('POST','TrackTransponder');
    pt_register('POST','SecondClass');
    pt_register('POST','TransmitterFrequency2');
    pt_register('POST','TransponderNo2');
    pt_register('POST','TrackTransponder2');
    pt_register('POST','AbilitySkillLevel');
    pt_register('POST','RaceDate');
    pt_register('POST','Track');
    pt_register('POST','IPAddress');
    pt_register('POST','DatePosted');
    if(
    $FirstName=="" || $LastName=="" || $Address=="" || $City=="" || $State=="" || $ZipCode=="" || $EMail=="" || $FirstClass=="" || $TransmitterFrequency=="" || $AbilitySkillLevel=="" || $RaceDate=="" || $Track=="" ){
    $errors=1;
    $error.="<li>You did not enter one or more of the required fields. Please go back and try again.";
    }
    if(!
    eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EMail)){
    $error.="<li>Invalid email address entered";
    $errors=1;
    }
    $IPAddress $HTTP_SERVER_VARS["REMOTE_ADDR"];
    $DatePosted date("Y-m-d h:i");
    $locationEmail $_POST['Track'];
    if(
    $errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    $message="First Name: ".$FirstName."
    Last Name: "
    .$LastName."
    Address: "
    .$Address."
    City: "
    .$City."
    State: "
    .$State."
    Zip Code: "
    .$ZipCode."
    Home Phone: "
    .$HomePhone."
    Cell Phone: "
    .$CellPhone."
    E Mail: "
    .$EMail."
    Membership No: "
    .$MembershipNo."
    Roar No: "
    .$RoarNo."
    First Class: "
    .$FirstClass."
    Transmitter Frequency: "
    .$TransmitterFrequency."
    Transponder No: "
    .$TransponderNo."
    Track Transponder: "
    .$TrackTransponder."
    Second Class: "
    .$SecondClass."
    Transmitter Frequency2: "
    .$TransmitterFrequency2."
    Transponder No2: "
    .$TransponderNo2."
    Track Transponder2: "
    .$TrackTransponder2."
    Ability Skill Level: "
    .$AbilitySkillLevel."
    Race Date: "
    .$RaceDate."
    Track: "
    .$Track."
    IP Address: "
    .$IPAddress."
    Date Posted: "
    .$DatePosted."
    "
    ;
    $message stripslashes($message);
    mail("$locationEmail","".$FirstName." ".$RaceDate." Race Registration",
    $message,"From: $EMail");
    $link mysql_connect("localhost","login","logmein");
    mysql_select_db("wichita,$link);
    $query="insert into Registration (First_Name,Last_Name,Address,City,State,Zip_Code,Home_Phone,Cell_Phone,E_Mail,Membership_No,Roar_No,First_Class,Transmitter_Frequency,Transponder_No,Track_Transponder,Second_Class,Transmitter_Frequency2,Transponder_No2,Track_Transponder2,Ability_Skill_Level,Race_Date,Track,IP_Address,Date_Postedvalues ('".$FirstName."','".$LastName."','".$Address."','".$City."','".$State."','".$ZipCode."','".$HomePhone."','".$CellPhone."','".$EMail."','".$MembershipNo."','".$RoarNo."','".$FirstClass."','".$TransmitterFrequency."','".$TransponderNo."','".$TrackTransponder."','".$SecondClass."','".$TransmitterFrequency2."','".$TransponderNo2."','".$TrackTransponder2."','".$AbilitySkillLevel."','".$RaceDate."','".$Track."','".$IPAddress."','".$DatePosted."')";
    mysql_query(
    $query);
    ?>


    <!-- This is the content of the Thank you page, be careful while changing it -->

    <body bgcolor="
    #FFFFFF">

    <h2 align="center"><h2 align="center">Registration Confirmation 
    <a href="#" onclick="window.print();return false;"><font size="2">PRINT</font></a><h2>
    </
    h2></h2>

    <
    div align="center">

    <
    table width="100%">
    <
    tr><td width="114">First Name: </td><td width="199" style="font-weight: bold"> <?php echo $FirstName?> </td>
        <td width="164">First Class: </td><td style="font-weight: bold"> <?php echo $FirstClass?> </td></tr>
    <tr><td width="114">Last Name: </td><td width="199" style="font-weight: bold"> <?php echo $LastName?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency?> </td></tr>
    <tr><td width="114">Address: </td><td width="199" style="font-weight: bold"> <?php echo $Address?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo?> </td></tr>
    <tr><td width="114">City: </td><td width="199" style="font-weight: bold"> <?php echo $City?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder?> </td></tr>
    <tr><td width="114">State: </td><td width="199" style="font-weight: bold"> <?php echo $State?> </td>
        <td width="164">Second Class: </td><td style="font-weight: bold"> <?php echo $SecondClass?> </td></tr>
    <tr><td width="114">Zip Code: </td><td width="199" style="font-weight: bold"> <?php echo $ZipCode?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency2?> </td></tr>
    <tr><td width="114">Home Phone: </td><td width="199" style="font-weight: bold"> <?php echo $HomePhone?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo2?> </td></tr>
    <tr><td width="114">Cell Phone: </td><td width="199" style="font-weight: bold"> <?php echo $CellPhone?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder2?> </td></tr>
    <tr><td width="114">E Mail: </td><td width="199" style="font-weight: bold"> <?php echo $EMail?> </td>
        <td width="164">Ability Skill Level: </td><td style="font-weight: bold"> <?php echo $AbilitySkillLevel?> </td></tr>
    <tr><td width="114">Membership No: </td>
        <td width="199" style="font-weight: bold"> <?php echo $MembershipNo?> </td>
        <td width="164">Race Date: </td><td style="font-weight: bold"> <?php echo $RaceDate?> </td></tr>
    <tr><td width="114">Roar No: </td><td width="199" style="font-weight: bold"> <?php echo $RoarNo?> </td>
        <td width="164">Track: </td>
        <td style="font-style: italic; font-weight: bold"> <?php echo $Track?> </td></tr>
    <tr><td width="114">&nbsp;</td><td width="199"> &nbsp;</td><td width="164">Date Posted: </td><td> <?php echo $DatePosted?> </td></tr>
    </table>
    </div>
    <!-- Do not change anything below this line -->

    <?php 
    }
    ?>

  6. #26
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    copy and paste this entire code and tell me if it works now..
    I believe this should work... before you did forgot a closing tag, which I believe I have remedied. I have also moved a couple things around to help any future debugging / good coding form.


    Code:
    <?php
    include("global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input. \n<ul>";
    pt_register('POST','FirstName');
    pt_register('POST','LastName');
    pt_register('POST','Address');
    pt_register('POST','City');
    pt_register('POST','State');
    pt_register('POST','ZipCode');
    pt_register('POST','HomePhone');
    pt_register('POST','CellPhone');
    pt_register('POST','EMail');
    pt_register('POST','MembershipNo');
    pt_register('POST','RoarNo');
    pt_register('POST','FirstClass');
    pt_register('POST','TransmitterFrequency');
    pt_register('POST','TransponderNo');
    pt_register('POST','TrackTransponder');
    pt_register('POST','SecondClass');
    pt_register('POST','TransmitterFrequency2');
    pt_register('POST','TransponderNo2');
    pt_register('POST','TrackTransponder2');
    pt_register('POST','AbilitySkillLevel');
    pt_register('POST','RaceDate');
    pt_register('POST','Track');
    pt_register('POST','IPAddress');
    pt_register('POST','DatePosted');
    
    if($FirstName=="" || $LastName=="" || $Address=="" || $City=="" || $State=="" || $ZipCode=="" || $EMail=="" || $FirstClass=="" || $TransmitterFrequency=="" || $AbilitySkillLevel=="" || $RaceDate=="" || $Track=="" )
    {
    	$errors = 1;
    	$error.="\n<li>You did not enter one or more of the required fields. Please go back and try again.</li>";
    }
    if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$EMail))
    {
    	$error.="\n<li>Invalid email address entered</li>";
    	$errors=1;
    }
    
    $IPAddress = $HTTP_SERVER_VARS["REMOTE_ADDR"];
    $DatePosted = date("Y-m-d h:i");
    
    
    if($errors==1) {echo $error;}
    else {
    	$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
    	$message = "First Name: ".$FirstName."
    Last Name: ".$LastName."
    Address: ".$Address."
    City: ".$City."
    State: ".$State."
    Zip Code: ".$ZipCode."
    Home Phone: ".$HomePhone."
    Cell Phone: ".$CellPhone."
    E Mail: ".$EMail."
    Membership No: ".$MembershipNo."
    Roar No: ".$RoarNo."
    First Class: ".$FirstClass."
    Transmitter Frequency: ".$TransmitterFrequency."
    Transponder No: ".$TransponderNo."
    Track Transponder: ".$TrackTransponder."
    Second Class: ".$SecondClass."
    Transmitter Frequency2: ".$TransmitterFrequency2."
    Transponder No2: ".$TransponderNo2."
    Track Transponder2: ".$TrackTransponder2."
    Ability Skill Level: ".$AbilitySkillLevel."
    Race Date: ".$RaceDate."
    Track: ".$Track."
    IP Address: ".$IPAddress."
    Date Posted: ".$DatePosted."
    ";
    
    	$link = mysql_connect("localhost","login","logmein");
    	mysql_select_db("wichita",$link);
    $query="INSERT INTO Registration (First_Name, Last_Name, Address, City, State, Zip_Code, Home_Phone, Cell_Phone, E_Mail, Membership_No, Roar_No, First_Class, Transmitter_Frequency, Transponder_No, Track_Transponder, Second_Class, Transmitter_Frequency2, Transponder_No2, Track_Transponder2, Ability_Skill_Level, Race_Date, Track, IP_Address, Date_Posted) VALUES ('".$FirstName."','".$LastName."','".$Address."','".$City."','".$State."','".$ZipCode."','".$HomePhone."','".$CellPhone."','".$EMail."','".$MembershipNo."','".$RoarNo."','".$FirstClass."','".$TransmitterFrequency."','".$TransponderNo."','".$TrackTransponder."','".$SecondClass."','".$TransmitterFrequency2."','".$TransponderNo2."','".$TrackTransponder2."','".$AbilitySkillLevel."','".$RaceDate."','".$Track."','".$IPAddress."','".$DatePosted."')";
    	if( mysqli_query($link, $query) )
    	{
    		$EMail = trim(strip_tags(strtolower($_POST['Track']))); 
    		$checkArray = array( 
    		  'Wichita' => 'email address', 
    		  'Hutchison' => 'email address',
    		  'A Main' => 'email address',
    		  'Pea Body' => 'email address',
    		  'Newton' => 'email address',
    		  'Action RC' => 'email address',
    		  'Enid' => 'email address',
    		); 
    		$to = $checkArray[$EMail];
    		$message = stripslashes($message);  
    		$subject = $FirstName." ". $RaceDate ." Race Registration";  
    		if( !mail($to, $subject, $message, "From: ".$Email) )  
    		{
    			echo "<h1>Unable to send email; Please try again later</h1>"
    		} 
    		else
    		{
    			displayThanks();
    		} 
    	} 
    	else
    	{
    		echo "An Error Occured Inserting Data. Please try again later";
    	}
    }
    
    public function displayThanks() {
    ?>
    <h2 align="center">Registration Confirmation <a href="#" onclick="window.print();return false;">PRINT</a><h2>
    
    <div align="center">
    
    <table width="100&#37;">
    <tr><td width="114">First Name: </td><td width="199" style="font-weight: bold"> <?php echo $FirstName; ?> </td>
        <td width="164">First Class: </td><td style="font-weight: bold"> <?php echo $FirstClass; ?> </td></tr>
    <tr><td width="114">Last Name: </td><td width="199" style="font-weight: bold"> <?php echo $LastName; ?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency; ?> </td></tr>
    <tr><td width="114">Address: </td><td width="199" style="font-weight: bold"> <?php echo $Address; ?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo; ?> </td></tr>
    <tr><td width="114">City: </td><td width="199" style="font-weight: bold"> <?php echo $City; ?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder; ?> </td></tr>
    <tr><td width="114">State: </td><td width="199" style="font-weight: bold"> <?php echo $State; ?> </td>
        <td width="164">Second Class: </td><td style="font-weight: bold"> <?php echo $SecondClass; ?> </td></tr>
    <tr><td width="114">Zip Code: </td><td width="199" style="font-weight: bold"> <?php echo $ZipCode; ?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency2; ?> </td></tr>
    <tr><td width="114">Home Phone: </td><td width="199" style="font-weight: bold"> <?php echo $HomePhone; ?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo2; ?> </td></tr>
    <tr><td width="114">Cell Phone: </td><td width="199" style="font-weight: bold"> <?php echo $CellPhone; ?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder2; ?> </td></tr>
    <tr><td width="114">E Mail: </td><td width="199" style="font-weight: bold"> <?php echo $EMail; ?> </td>
        <td width="164">Ability Skill Level: </td><td style="font-weight: bold"> <?php echo $AbilitySkillLevel; ?> </td></tr>
    <tr><td width="114">Membership No: </td>
        <td width="199" style="font-weight: bold"> <?php echo $MembershipNo; ?> </td>
        <td width="164">Race Date: </td><td style="font-weight: bold"> <?php echo $RaceDate; ?> </td></tr>
    <tr><td width="114">Roar No: </td><td width="199" style="font-weight: bold"> <?php echo $RoarNo; ?> </td>
        <td width="164">Track: </td>
        <td style="font-style: italic; font-weight: bold"> <?php echo $Track; ?> </td></tr>
    <tr><td width="114">&nbsp;</td><td width="199"> &nbsp;</td><td width="164">Date Posted: </td><td> <?php echo $DatePosted; ?> </td></tr>
    </table>
    </div>
    
    <?php 
    }
    ?> 
    PS if this doesnt work I would like to see what is in the global.inc.php file

  7. #27
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Paisted and got error
    Parse error: syntax error, unexpected '}', expecting ',' or ';' in /home/wichita/public_html/Registr/Registration.php on line 95
    I did add email address to aray
    global.inc.php
    PHP Code:
    <?php

    function pt_register()
    {
      
    $num_args func_num_args();
       
    $vars = array();

       if (
    $num_args >= 2) {
           
    $method strtoupper(func_get_arg(0));

           if ((
    $method != 'SESSION') && ($method != 'GET') && ($method != 'POST') && ($method != 'SERVER') && ($method != 'COOKIE') && ($method != 'ENV')) {
               die(
    'The first argument of pt_register must be one of the following: GET, POST, SESSION, SERVER, COOKIE, or ENV');
         }

           
    $varname "HTTP_{$method}_VARS";
          global ${
    $varname};

           for (
    $i 1$i $num_args$i++) {
               
    $parameter func_get_arg($i);

               if (isset(${
    $varname}[$parameter])) {
                   global $
    $parameter;
                   $
    $parameter = ${$varname}[$parameter];
              }

           }

       } else {
           die(
    'You must specify at least two arguments');
       }

    }

    ?>
    Last edited by big-dog1965; 09-05-2007 at 05:17 PM.

  8. #28
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    it shouldn't be the problem, but the error is being given on line
    PHP Code:
    echo "<h1>Unable to send email; Please try again later</h1>" 
    try adding a semi colon at the end and see what happens then

    Code:
    echo "<h1>Unable to send email. Please try again later</h1>";

  9. #29
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Now
    Parse error: syntax error, unexpected T_FUNCTION in /home/wichita/public_html/Registr/Registration.php on line 107

  10. #30
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    now its not recognizing the call to the "thanks" page... deleting displayThank();
    and putting your code for the display in... basically swapping the two

    PHP Code:
                    echo "<h1>Unable to send email, try again later.</h1>";
            }
            else
            {
    ?>


    <h2 align="center">Registration Confirmation <a href="#" onclick="window.print();return false;">PRINT</a><h2>

    <div align="center">

    <table width="100%">
    <tr><td width="114">First Name: </td><td width="199" style="font-weight: bold"> <?php echo $FirstName?> </td>
        <td width="164">First Class: </td><td style="font-weight: bold"> <?php echo $FirstClass?> </td></tr>
    <tr><td width="114">Last Name: </td><td width="199" style="font-weight: bold"> <?php echo $LastName?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency?> </td></tr>
    <tr><td width="114">Address: </td><td width="199" style="font-weight: bold"> <?php echo $Address?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo?> </td></tr>
    <tr><td width="114">City: </td><td width="199" style="font-weight: bold"> <?php echo $City?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder?> </td></tr>
    <tr><td width="114">State: </td><td width="199" style="font-weight: bold"> <?php echo $State?> </td>
        <td width="164">Second Class: </td><td style="font-weight: bold"> <?php echo $SecondClass?> </td></tr>
    <tr><td width="114">Zip Code: </td><td width="199" style="font-weight: bold"> <?php echo $ZipCode?> </td>
        <td width="164">Transmitter Frequency: </td><td style="font-weight: bold"> <?php echo $TransmitterFrequency2?> </td></tr>
    <tr><td width="114">Home Phone: </td><td width="199" style="font-weight: bold"> <?php echo $HomePhone?> </td>
        <td width="164">Transponder No: </td><td style="font-weight: bold"> <?php echo $TransponderNo2?> </td></tr>
    <tr><td width="114">Cell Phone: </td><td width="199" style="font-weight: bold"> <?php echo $CellPhone?> </td>
        <td width="164">Track Transponder: </td><td style="font-weight: bold"> <?php echo $TrackTransponder2?> </td></tr>
    <tr><td width="114">E Mail: </td><td width="199" style="font-weight: bold"> <?php echo $EMail?> </td>
        <td width="164">Ability Skill Level: </td><td style="font-weight: bold"> <?php echo $AbilitySkillLevel?> </td></tr>
    <tr><td width="114">Membership No: </td>
        <td width="199" style="font-weight: bold"> <?php echo $MembershipNo?> </td>
        <td width="164">Race Date: </td><td style="font-weight: bold"> <?php echo $RaceDate?> </td></tr>
    <tr><td width="114">Roar No: </td><td width="199" style="font-weight: bold"> <?php echo $RoarNo?> </td>
        <td width="164">Track: </td>
        <td style="font-style: italic; font-weight: bold"> <?php echo $Track?> </td></tr>
    <tr><td width="114">&nbsp;</td><td width="199"> &nbsp;</td><td width="164">Date Posted: </td><td> <?php echo $DatePosted?> </td></tr>
    </table>
    </div>


    <?php
            

        } 
        else
        {
            echo 
    "An Error Occured Inserting Data. Please try again later";
        }
    }
    ?>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •