Problem Printing Value Retrieved From Mysql Query
I am trying to print a value retrieved from a MySQL query with javascript. Here is the code function editVal(category){ //alert(category); //document.ge
Solution 1:
You have to make an AJAX call if you want to execute a mysql query with some parameter (here category
) in query condition which depends on what you clicked.
Try to understand that, server side code has finished executing and then you clicked on the checkboxes. At this instant client side code is running and even a correct mysql query cannot run if you put it here.
Your query would actually run while the page is being generated by the server, and at that time it would not get the value of category
and hence would run with category
= '', hence not entering the while loop.
Post a Comment for "Problem Printing Value Retrieved From Mysql Query"