I create a html page & a database in mysql.I want when i submit my quary in a html page by pressing submit buttom.then it can show me the result.result can extracted from mysql data base.and show in my current php page....
connection with my sql via a html page
Collapse
X
-
Originally posted by shiny007I create a html page & a database in mysql.I want when i submit my quary in a html page by pressing submit buttom.then it can show me the result.result can extracted from mysql data base.and show in my current php page....
I think No way to connect the database html page -
The submit button directs the user to a php script where the following functions can be used.
mysql_connect() then
mysql_select_db () then
mysql_query()
HTML and php can be mixed on the same pageComment
-
Originally posted by code greenThe submit button directs the user to a php script where the following functions can be used.
mysql_connect() then
mysql_select_db () then
mysql_query()
HTML and php can be mixed on the same page
You can do the same thing in ajax, thats the better way. By using ajax u can call PHP script from server and grab its output and display it on your page. Not only php but you can use any suitable server side language.Comment
-
I really cannot see any advantage of using Ajax for this when you want to show a new results page. Ajax is very handy when you want to show the results within an existing page without page reload, but using it to show a completely new page is a lot of unnecessary extra coding.Originally posted by udaypawarYou can do the same thing in ajax, thats the better way. By using ajax u can call PHP script from server and grab its output and display it on your page. Not only php but you can use any suitable server side language.
Ronald :cool:Comment
Comment