kbios
asked on
Help with jQuery and AJAX process to load data to MySQL
I am wanting to use jquery/ajax to load data to mysql. Below is the HTML and the php script that I am using. When I run this program the MySql db is NOT updated. Would someone please review the code and offer any suggestions as to why this may not be working? This is my first attempt at jquery/ajax so the error may be a simple one but it has me stumped. Thanks.
ee.txt
ee.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your HTML is missing a HEADER and BODY to start with You may find that an OnLoad javascript
may be helpful in setting things up as well. e.g <BODY onLoad="javascript:myFunct ion();">
If I were you I would start with a simple connection test in PHP
maybe write it to a file or the screen using typical submit action code
the file is as simple as
$fp1=fopen("path2debgfile. txt", "a");
fwrite($fp1, "what I want to verify:" . (string) $valueFromDatabase );
fclose($fp1);
I find that really helps when debugging complex web apps
There are also debuggers you can use as well
I hope thsa helped.
may be helpful in setting things up as well. e.g <BODY onLoad="javascript:myFunct
If I were you I would start with a simple connection test in PHP
maybe write it to a file or the screen using typical submit action code
the file is as simple as
$fp1=fopen("path2debgfile.
fwrite($fp1, "what I want to verify:" . (string) $valueFromDatabase );
fclose($fp1);
I find that really helps when debugging complex web apps
There are also debuggers you can use as well
I hope thsa helped.
ASKER
You're terrefic! Thank you. I can't believe I was THAT close but hey that's why you're the expert! Thanks again.
Open in new window
by :Open in new window