Jump to content

W3C ajax examples


Cardale

Recommended Posts

The example at that link works for me in the latest FF and IE browsers.

 

If you are having a problem with the code, you would need to be way more specific about the symptoms or errors you are getting for anyone to be able to help you.

Link to comment
https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/#findComment-1002244
Share on other sites

Oh it wasn't that I was getting errors I was wondering security wise.  I am not far into ajax and I was curious.

 

$q=$_GET["q"];

$con = mysql_connect('localhost', 'peter', 'abc123');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("ajax_demo", $con);

$sql="SELECT * FROM user WHERE id = '".$q."'";

 

Open to injection, Dunno why it doesn't tell you to sanitize input, but security wise AJAX should be as secure as you make the backend (PHP).

Link to comment
https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/#findComment-1002266
Share on other sites

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.