Not Able To Connect The DataBase

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mmr315
    New Member
    • Aug 2007
    • 25

    Not Able To Connect The DataBase

    Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apac he2.2\htdocs\da tabaseconnect.p hp on line 5


    i wrote code like this

    Databaseconnect .php
    =============== ==
    [code=php]<?php
    $user="admin";
    $password="admi n";
    $database="onli neauction";
    mysql_connect(s erver9,$user,$p assword);
    @mysql_select_d b($database) or die( "Unable to select database");
    $result = mysql_query("SE LECT * FROM t_user_info");
    $numrows = mysql_num_rows( $result);
    print "There are $numrows people in usertable\n";

    ?>[/code]

    My os is windows 2000 professional
    database is at remote place(server9)
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, MMR.

    You'll need to reinstall PHP with MySQL support. When you are installing PHP from the .msi, look for a custom install option and be sure to select the 'MySQL' option.

    Comment

    Working...