Jump to content

kaustubhghag

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kaustubhghag's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have Installed MySQL on windows 2000 professional operating system and then i have created ijdb as new database in which i have created joke table. so when i tried to connect to that table and try to retrieve values it shows me following message: Fatal error: Call to undefined function mysql_connect() in e:\Inetpub\wwwroot\connect.php on line 6 Following is the code: html> <head> <title>Our List of Jokes</title> <body> <?php // Connect to the database server $dbcnx = @mysql_connect('localhost', 'root', 'mypasswd'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } // Select the jokes database if (!@mysql_select_db('ijdb')) { exit('<p>Unable to locate the joke ' . 'database at this time.</p>'); } ?> <p>Here are all the jokes in our database:</p> <blockquote> <?php // Request the text of all the jokes $result = @mysql_query('SELECT joketext FROM joke'); if (!$result) { exit('<p>Error performing query: ' . mysql_error() . '</p>'); } // Display the text of each joke in a paragraph while ($row = mysql_fetch_array($result)) { echo '<p>' . $row['joketext'] . '</p>'; echo "Hello"; } ?> </blockquote> </body> </html>html> <head> <title>Our List of Jokes</title> <body> <?php // Connect to the database server $dbcnx = @mysql_connect('localhost', 'root', 'root'); if (!$dbcnx) { exit('<p>Unable to connect to the ' . 'database server at this time.</p>'); } // Select the jokes database if (!@mysql_select_db('ijdb')) { exit('<p>Unable to locate the joke ' . 'database at this time.</p>'); } ?> <p>Here are all the jokes in our database:</p> <blockquote> <?php // Request the text of all the jokes $result = @mysql_query('SELECT joketext FROM joke'); if (!$result) { exit('<p>Error performing query: ' . mysql_error() . '</p>'); } // Display the text of each joke in a paragraph while ($row = mysql_fetch_array($result)) { echo '<p>' . $row['joketext'] . '</p>'; echo "Hello"; } ?> </blockquote> </body> </html> so can anyone guide what is problem
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.