|
-
Jan 7th, 2003, 03:38 PM
#4
Frenzied Member
Originally posted by phpman
try this
PHP Code:
<?
mysql_connect("localhost","username","password")
or die("Unable to connect to SQL server");
mysql_select_db("jokes")
or die("Unable to select database");
$query = "SELECT * FROM jokes";
$joke = mysql_query($query);
if (!$joke){echo mysql_error();}
while ($row = mysql_fetch_array($joke)){
echo $row['joke_id'];
echo $row['joke_name'];
echo $row['joke_message'];
echo $row['joke_date'];
echo"<br />"\n";
?>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|