connection with my sql via a html page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shiny007
    New Member
    • Mar 2007
    • 2

    #1

    connection with my sql via a html page

    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....
  • vssp
    Contributor
    • Jul 2006
    • 268

    #2
    Originally posted by shiny007
    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....

    I think No way to connect the database html page

    Comment

    • code green
      Recognized Expert Top Contributor
      • Mar 2007
      • 1726

      #3
      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 page

      Comment

      • udaypawar
        New Member
        • Feb 2007
        • 29

        #4
        Originally posted by code green
        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 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

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          Originally posted by udaypawar
          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.
          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.

          Ronald :cool:

          Comment

          Working...