You are on the right track, but missed one major thing.
Anytime you want to retrieve information from a database result set you have
to follow 3 basic steps.
1) Connect to the database *you got that one
2) Execute a query *you got that one
3) Retrieve the resultset ***missed this one

See http://www.php.net/mysql_fetch_assoc for the appropriate syntax.


----- Original Message -----
From: "Todd Barr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 6:32 PM
Subject: [PHP] Hello and help


I am a PHP newbie, and I am having difficulty in getting my records to
display

here is my code

<?php
$Host="localhost";
$User="us34992a";
$Password="*****";
$DBname="db34992a";
$Tablename="calendar";
$Link=mysql_pconnect($Host, $User, $Password)
or die ("YOu suck1");
$db=mysql_select_db($DBname, $Link)
or die ("ISUCKEGGS");
$result=mysql_query("SELECT * from calendar", $Link)
or die ("YOu suck3");
print("<table width="53%" border="0" cellpadding="0" cellspacing="0">\n");
print ("<tr>\n");
print ("<td background="topbig.gif">\n");
print ("<div align="center"><font face="Arial, Helvetica,
sans-serif"><b><font color="#FFFFFF">Calender</font></b></font></div>
                  </td>
                </tr>\n");
print ("<tr bgcolor="#009ACE">\n");
print("<td>$result[meeting_name]</td>\n")or die ("you suck");
mysql_close ($Link);
?>

any help?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to