Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- new to ajax and need help with json


swa66 - 4:15 pm on Dec 25, 2012 (gmt 0)


Code like
if (isset($_POST[reg]) && ($_POST[sname]))
{
$lookup = mysql_query('SELECT * FROM cust WHERE reg = '$_POST[reg]'AND sname LIKE '%$_POST[sname]%'")

is an open invitation to getting hacked. SQL injection.

Suggest you switch away from the obsolete mysql interface to the mysqli (note the i) and use prepared statements or at the very least escape the data
Also improve your input filtering.

Otherwise you risk this: [xkcd.com...]


Thread source:: http://www.webmasterworld.com/javascript/4530873.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com