Escape hyphen in PHP /mySQL query

bulwinkl

New Member
The following line throws an error:\[code\]$query = "INSERT INTO mail_senders(mailAddress) VALUES ('$_POST[sender-email]')";\[/code\]and the problem is the hyphen "-"I might easily change "-" with "_" but I would like to know if it possible to escape that character for future reference.Thanks in advance
 
Back
Top