Need help with PHP email form

MangoTBG

Diamond Member
Apr 28, 2003
3,101
0
76
I am trying to follow this tutorial:

PHP Tutorial

I get this response:

Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\mannytest\contact.php on line 79

So you don't have to try to count, that line is this one:

$toAddress="mazubieta@gmail.com"; /* change this! */

Could someone look over my .php file and see if there's something painfully obvious that I messed up, please?

Thanks.
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
You forgot an ending semicolon in the statement before line 79

edit: you need to sanitize your $_POST inputs before feeding it to MySQL. I'm no expert on this.. but I do know - never trust any user inputs.
 

MangoTBG

Diamond Member
Apr 28, 2003
3,101
0
76
Originally posted by: screw3d
You forgot an ending semicolon in the statement before line 79

edit: you need to sanitize your $_POST inputs before feeding it to MySQL. I'm no expert on this.. but I do know - never trust any user inputs.

Thank you for finding the missing semicolon.

Could you explain what you mean by sanitize my $_POST?

Or link me where I can read how to do this?

Thanks!
 

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
Originally posted by: MangoTBG
Originally posted by: screw3d
You forgot an ending semicolon in the statement before line 79

edit: you need to sanitize your $_POST inputs before feeding it to MySQL. I'm no expert on this.. but I do know - never trust any user inputs.

Thank you for finding the missing semicolon.

Could you explain what you mean by sanitize my $_POST?

Or link me where I can read how to do this?

Thanks!

sanitize meaning do data validation, and always do an addslashes($text) before putting it into mysql. this will prevent sql injection type attacks on your site.