Results 1 to 5 of 5
  1. #1
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default PHP Error - No One looks in coding forums :P

    Hello,

    Im trying to set up a mail handler but am getting this PHP Error:

    Code:
    Parse error
    Code:
    : syntax error, unexpected T_VARIABLE in /home/tom/public_html/formtests/handler.php on line 4
    Here is the file:

    PHP Code:
    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'GET'){ 
    $subject $_POST['DansDiscos User Application']
    $FullName $_POST['FullName']; 
    $EmailAddress $_POST['EmailAddress']; 
    $ChildWillBe $_POST['ChildWillBe'];
    $TypeofParty $_POST['TypeofParty'];
    $VenueAddress $_POST['VenueAddress'];
    $TeirAddress $_POST['TeirAddress'];
    $Telephone $_POST['Telephone'];
    $extra $_POST['extra'];
    $Aggreeq $_POST['Aggreeq']
    $messig =
    Name: 
    $FullName 
    \n 
    Email: 
    $EmailAddress 
    \n 
    Age Child Would Be (If Applicable): 
    $ChildWillBe
    \n
    Party Type: 
    $TypeofParty
    \n
    Address of Venue: 
    $VenueAddress
    \n
    Address of Organiser: 
    $TeirAddress
    \n
    Organisers Telepone: 
    $Telephone
    \n
    Extras: 
    $extra
    \n
    Has the organiser Aggred to our Terms And Conditions? 
    $Aggreeq
    "
    ;
    $subject $subject
    mail("[email protected]"$subject$messig); 
    Header("Location: thanks.php"); 

    else 

    echo 
    'ERROR'

    ?>
    Last edited by Recursion; 21-01-2007 at 05:50 PM.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  2. #2
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Code:
    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'GET'){ 
    $subject = $_POST['DansDiscos User Application'];
    $FullName = $_POST['FullName']; 
    $EmailAddress = $_POST['EmailAddress']; 
    $ChildWillBe = $_POST['ChildWillBe'];
    $TypeofParty = $_POST['TypeofParty'];
    $VenueAddress = $_POST['VenueAddress'];
    $TeirAddress = $_POST['TeirAddress'];
    $Telephone = $_POST['Telephone'];
    $extra = $_POST['extra'];
    $Aggreeq = $_POST['Aggreeq']
    $messig =" 
    Name: $FullName 
    \n 
    Email: $EmailAddress 
    \n 
    Age Child Would Be (If Applicable): $ChildWillBe
    \n
    Party Type: $TypeofParty
    \n
    Address of Venue: $VenueAddress
    \n
    Address of Organiser: $TeirAddress
    \n
    Organisers Telepone: $Telephone
    \n
    Extras: $extra
    \n
    Has the organiser Aggred to our Terms And Conditions? $Aggreeq
    ";
    $subject = $subject; 
    mail("[email protected]", $subject, $messig); 
    Header("Location: thanks.php"); 
    } 
    else 
    { 
    echo 'ERROR'; 
    } 
    ?>
    Try that.

  3. #3
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Quote Originally Posted by Invent View Post
    Code:
    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'GET'){ 
    $subject = $_POST['DansDiscos User Application'];
    $FullName = $_POST['FullName']; 
    $EmailAddress = $_POST['EmailAddress']; 
    $ChildWillBe = $_POST['ChildWillBe'];
    $TypeofParty = $_POST['TypeofParty'];
    $VenueAddress = $_POST['VenueAddress'];
    $TeirAddress = $_POST['TeirAddress'];
    $Telephone = $_POST['Telephone'];
    $extra = $_POST['extra'];
    $Aggreeq = $_POST['Aggreeq']
    $messig =" 
    Name: $FullName 
    \n 
    Email: $EmailAddress 
    \n 
    Age Child Would Be (If Applicable): $ChildWillBe
    \n
    Party Type: $TypeofParty
    \n
    Address of Venue: $VenueAddress
    \n
    Address of Organiser: $TeirAddress
    \n
    Organisers Telepone: $Telephone
    \n
    Extras: $extra
    \n
    Has the organiser Aggred to our Terms And Conditions? $Aggreeq
    ";
    $subject = $subject; 
    mail("[email protected]", $subject, $messig); 
    Header("Location: thanks.php"); 
    } 
    else 
    { 
    echo 'ERROR'; 
    } 
    ?>
    Try that.
    Doesn't Work

    YES I DO!
    Last edited by Recursion; 21-01-2007 at 06:00 PM.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  4. #4
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    www.retroforum.info/bobbanet.fla

    Enjoy, should work.

    Also

    Code:
    <?php
    if ($_SERVER['REQUEST_METHOD'] != 'GET'){ 
    $subject = $_POST['DansDiscos User Application'];
    $FullName = $_POST['FullName']; 
    $EmailAddress = $_POST['EmailAddress']; 
    $ChildWillBe = $_POST['ChildWillBe'];
    $TypeofParty = $_POST['TypeofParty'];
    $VenueAddress = $_POST['VenueAddress'];
    $TeirAddress = $_POST['TeirAddress'];
    $Telephone = $_POST['Telephone'];
    $extra = $_POST['extra'];
    $Aggreeq = $_POST['Aggreeq'];
    $messig = " 
    Name: $FullName 
    \n 
    Email: $EmailAddress 
    \n 
    Age Child Would Be (If Applicable): $ChildWillBe
    \n
    Party Type: $TypeofParty
    \n
    Address of Venue: $VenueAddress
    \n
    Address of Organiser: $TeirAddress
    \n
    Organisers Telepone: $Telephone
    \n
    Extras: $extra
    \n
    Has the organiser Aggred to our Terms And Conditions? $Aggreeq
    ";
    $subject = $subject; 
    mail("Ferguson933********.com", $subject, $messig); 
    Header("Location: thanks.php"); 
    } 
    else 
    { 
    echo 'ERROR'; 
    } 
    ?>
    Last edited by Invent; 21-01-2007 at 06:03 PM.

  5. #5
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Both Worked

    Thanks!
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

Posting Permissions

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