Jump to content

Siple for programmer error unexpected T_STRING


nicolem798

Recommended Posts

Can someone please spot my error here Ive compared it to my other stuff just like it and Im not seeing the problem. Line 14 is

Code:

 

$Frequency MHz = $HTTP_POST_VARS["Frequency MHz"];

 

Big thanks in advance

 

Parse error: syntax error, unexpected T_STRING in /public_html/php/Freq_Table_dml.php on line 14

 

Code:

 

{

$Channel = $HTTP_POST_VARS["Channel"];

$Frequency MHz = $HTTP_POST_VARS["Frequency MHz"];

$MHZ Range = $HTTP_POST_VARS["MHZ Range"];

$Type = $HTTP_POST_VARS["Type"];

$Color = $HTTP_POST_VARS["Color"];

$License = $HTTP_POST_VARS["License"];

$Comment = $HTTP_POST_VARS["Comment"];

}

Variable names cannot contain spaces, so $Frequency MHz and $MHZ Range are not valid variable names.

 

Also, $HTTP_POST_VARS were depreciated long ago, turned off by default in php5, and have been complete removed in php6. Use $_POST instead.

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.