Cardale Posted January 27, 2010 Share Posted January 27, 2010 Has anyone noticed any problems with these examples? http://www.w3schools.com/PHP/php_ajax_database.asp I guess if you ignore any of the PHP code is what I'm talking about. The ajax itself. Quote Link to comment https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 27, 2010 Share Posted January 27, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/#findComment-1002244 Share on other sites More sharing options...
Cardale Posted January 27, 2010 Author Share Posted January 27, 2010 Oh it wasn't that I was getting errors I was wondering security wise. I am not far into ajax and I was curious. Quote Link to comment https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/#findComment-1002264 Share on other sites More sharing options...
oni-kun Posted January 27, 2010 Share Posted January 27, 2010 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). Quote Link to comment https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/#findComment-1002266 Share on other sites More sharing options...
Cardale Posted January 27, 2010 Author Share Posted January 27, 2010 Alright thanks. Quote Link to comment https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/#findComment-1002273 Share on other sites More sharing options...
trq Posted January 27, 2010 Share Posted January 27, 2010 [ot] w3schools has nothing at all to do with the w3c [/ot] Quote Link to comment https://forums.phpfreaks.com/topic/189952-w3c-ajax-examples/#findComment-1002346 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.