Jump to content

HELP!!! new to PHP - first timer - PARSE ERROR unexpected '@' ...


spicey

Recommended Posts

This is my first time using PHP and when I test the form online, I get the following error.  Any suggestions?

 

Parse error: syntax error, unexpected '@' in /mnt/w0106/d00/s28/b02d7599/

 

This is my simple code:

 

?php

  $name = $_REQUEST['name'] ;

  $organization = $_REQUEST['organization'] ;

  $email = $_REQUEST['email'] ;

  $telephone = $_REQUEST['telephone'] ;

  $date_required = $_REQUEST['date_required'] ;

  $checkbox_adult = $_REQUEST['checkbox_adult'] ;

  $adults = $_REQUEST['adults'] ;

  $checkbox_children = $_REQUEST['checkbox_children'] ;

  $children = $_REQUEST['children'] ;

  $leaving_from = $_REQUEST['leaving_from'] ;

  $destination = $_REQUEST['destination'] ;

  $return_to = $_REQUEST['return_to'] ;

  $time_departure = $_REQUEST['time_departure'] ;

  $time_return = $_REQUEST['time_return'] ;

  $additional_info = $_REQUEST['additional_info'] ;

  $checkbox_email = $_REQUEST['checkbox_email'] ;

  $checkbox_telephone = $_REQUEST['checkbox_telephone'] ;

 

  mailto ([email protected], "Quote Request",

    $message, "From: $email" );

  header ( "Location: http://www.website.ca/thankyou.html");

  php?>

Thanks for the help!  Now my error has moved to the "header" line - last one...to read this:

 

Warning: Cannot modify header information - headers already sent by ....

 

I've deleted any extra lines just in case the spaces was the issue - but I still get this warning error.

 

Any other suggestions?  You guys are fantastic in responding!!!!!  :)

<?php
  $name = $_REQUEST['name'] ;
  $organization = $_REQUEST['organization'] ;
  $email = $_REQUEST['email'] ;
  $telephone = $_REQUEST['telephone'] ;
  $date_required = $_REQUEST['date_required'] ;
  $checkbox_adult = $_REQUEST['checkbox_adult'] ;
  $adults = $_REQUEST['adults'] ;
  $checkbox_children = $_REQUEST['checkbox_children'] ;
  $children = $_REQUEST['children'] ;
  $leaving_from = $_REQUEST['leaving_from'] ;
  $destination = $_REQUEST['destination'] ;
  $return_to = $_REQUEST['return_to'] ;
  $time_departure = $_REQUEST['time_departure'] ;
  $time_return = $_REQUEST['time_return'] ;
  $additional_info = $_REQUEST['additional_info'] ;
  $checkbox_email = $_REQUEST['checkbox_email'] ;
  $checkbox_telephone = $_REQUEST['checkbox_telephone'] ;

  mail("[email protected]", "Quote Request", $message, "From: $email" );
  header ( "Location: http://www.website.ca/thankyou.html");
?>

This is my first time using PHP and when I test the form online, I get the following error.  Any suggestions?

 

Parse error: syntax error, unexpected '@' in /mnt/w0106/d00/s28/b02d7599/

 

This is my simple code:

 

?php

  $name = $_REQUEST['name'] ;

  $organization = $_REQUEST['organization'] ;

  $email = $_REQUEST['email'] ;

  $telephone = $_REQUEST['telephone'] ;

  $date_required = $_REQUEST['date_required'] ;

  $checkbox_adult = $_REQUEST['checkbox_adult'] ;

  $adults = $_REQUEST['adults'] ;

  $checkbox_children = $_REQUEST['checkbox_children'] ;

  $children = $_REQUEST['children'] ;

  $leaving_from = $_REQUEST['leaving_from'] ;

  $destination = $_REQUEST['destination'] ;

  $return_to = $_REQUEST['return_to'] ;

  $time_departure = $_REQUEST['time_departure'] ;

  $time_return = $_REQUEST['time_return'] ;

  $additional_info = $_REQUEST['additional_info'] ;

  $checkbox_email = $_REQUEST['checkbox_email'] ;

  $checkbox_telephone = $_REQUEST['checkbox_telephone'] ;

 

  mailto ([email protected], "Quote Request",

    $message, "From: $email" );

  header ( "Location: http://www.website.ca/thankyou.html");

  php?>

 

 

I take it you're new, and that's fine and all (we all were once), but I see tons of threads where the error message said either "unexpected symbol" and it gives the symbol, and all it took was looking at the code for that symbol and seeing the error easily. Or it'd say "error on line 41" and there'd be a majorly obvious messup. All I'm saying is that problem solving is always trial and error with php and I'd high recommend trying to fix the problem by yourself(spend a good bit of time) before making a thread about it.

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.