need help connecting database with webpage

Discussion in 'Web Development' started by daveritwick, Apr 25, 2009.

  1. daveritwick

    daveritwick New Member

    Joined:
    Aug 20, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    hi there i need help regarding connecting database with web page
    i have installed wamp server includes php, sql, apache
    but when i run the final coding same as tutorials it give Sql error
    need help plz
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Moved to Web Development forum
     
  3. mclarke1987

    mclarke1987 New Member

    Joined:
    May 7, 2009
    Messages:
    10
    Likes Received:
    1
    Trophy Points:
    0
    Any chance you can be more specific with the error? Here's a basic connection/query script. You might want to check the hostname that's a common issue.

    <?php
    mysql_connect('localhost', 'user', 'pass');
    mysql_select_db('dbname');
    mysql_query('SELECT * FROM table');
    ?>
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice