Your AJAX framework is incorrect/insufficient.
Use Sajax with php: download the free script “Mini chat” from http://www.web2coders.com
It contains the Sajax framework and all the principles to pass variables from one place to another, including the DB.
Good luck!
Dont use Ajax to store the results on the db. The correct path is
Form -> submit to ajax script -> ajax script gather values and validate -> values are sent to another php page that will store them in the db and return a ‘ok’ code -> when the ‘ok’ code returns, tell the page with the form to show a success message.
As a note, use JQuery for this kind of stuff. It will make your life a ton easier.
Comments
Leave a comment Trackback