mysql - accessing database values in javascript -


OK

The position we are using is mysql. We have written the questions and have achieved the result of the Assoc array. Now how do we use the results from Javascript.

  $ query = "Select the first name from the staff; $ result = mysql_query ($ query, $ resource); $ value = mysql_fetch_assoc $;); Remove ($ value); < / Code> 

Now be a JavaScript code

  & lt; script type = "text / javascript" & gt; function a function () {var database field = document .getElementsByName ("firstname") value;}   

By the way, you must add the first name value to your PHP-generated HTML. Switch to the output can, or you can output it as a hidden INPUT field.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -