www.webdeveloper.com
Results 1 to 4 of 4

Thread: how to connect mysql database using javascript

  1. #1
    Join Date
    Nov 2006
    Posts
    1

    how to connect mysql database using javascript

    Hi

    I am using PHP and mysql. I need to write javascript functions where i can fetch data from mysql database and display in a table and later do some calculations with those values. Please help me regarding the code required to connect to mysql database.

    Or if there is a possibility of executing php statements and accessing the variables where the results are pointed, i can write php statements in javascript.

    Please reply soon

  2. #2
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    Look into Ajax

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com

  3. #3
    Join Date
    Oct 2012
    Posts
    1

    how to connect mysql database using javascript

    Quote Originally Posted by sailendhran View Post
    Hi

    I am using PHP and mysql. I need to write javascript functions where i can fetch data from mysql database and display in a table and later do some calculations with those values. Please help me regarding the code required to connect to mysql database.

    Or if there is a possibility of executing php statements and accessing the variables where the results are pointed, i can write php statements in javascript.

    Please reply soon
    "can u try this var jsvariable = <?php = "hello" ?> in place of hello u can display ur database element make sure this script u have written in top of the body"

  4. #4
    Join Date
    Sep 2008
    Location
    Dallas
    Posts
    154
    Eric has it right. I have no idea what that other person is suggesting. The only way to do this is through AJAX. Use JQuery, and it will make it a bit easier.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles