Re: I dont see anything
| From: | Zak Greant | Date: | Wed, 06 Dec 2000 04:15:55 +0000 |
| Subject: | Re: I dont see anything | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-40204@lists.php.net to get a copy of this message | ||
Dear Brandon,
This list is for discussing the development of the PHP language, not
development with the PHP language.
A better forum for your questions is the PHP general mailing list
(php-general-subscribe@lists.php.net to subscribe.)
--zak
----- Original Message -----
From: "Brandon Feldhahn" <BrandonFeldhahn@earthlink.net>
To: <php-dev@lists.php.net>
Sent: Tuesday, December 05, 2000 8:31 PM
Subject: [PHP-DEV] I dont see anything
> i created a form called guestbook.html:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> <META NAME="Generator" CONTENT="TextPad 4.0">
> <META NAME="Author" CONTENT="?">
> <META NAME="Keywords" CONTENT="?">
> <META NAME="Description" CONTENT="?">
> </HEAD>
>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000"
> VLINK="#800000"
> ALINK="#FF00FF" BACKGROUND="?">
>
> <FORM method="POST" action="guestbook2.php">
> <INPUT type="text" name="NAME" size="10"
> maxlength="35"><br />
> <INPUT type="text" name="E_MAIL" size="25"
> maxlength="50"><br />
> <TEXTAREA name="SUGGESTIONS
> " cols=30 rows=5></TEXTAREA><br />
> <INPUT type="submit" value="Submit!">
> </form>
>
> </BODY>
> </HTML>
>
> then created the thing you view it in called guestbook2.php:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
> <HTML>
> <HEAD>
> <TITLE></TITLE>
> <META NAME="Generator" CONTENT="TextPad 4.0">
> <META NAME="Author" CONTENT="?">
> <META NAME="Keywords" CONTENT="?">
> <META NAME="Description" CONTENT="?">
> </HEAD>
>
> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000"
> VLINK="#800000"
> ALINK="#FF00FF" BACKGROUND="?">
>
> <?php
>
> // create connection
> $connection = mysql_connect("localhost","brandon","surfer")
> or die("Couldn't make connection.");
>
> // select database
> $db = mysql_select_db("guestbook_db", $connection)
> or die("Couldn't select database.");
>
>
> // create SQL statement
> $sql = "SELECT NAME, E_MAIL, SUGGESTIONS
> FROM GUESTBOOK";
>
> // execute SQL query and get result
> $sql_result = mysql_query($sql,$connection)
> or die("Couldn't execute query.");
>
> // start results formatting
> echo "<TABLE BORDER=1>";
> echo "<TR>
> <TH>Name</TH>
> <TH>Suggestions</TH>
> </TR>
> ";
>
> // format results by row
> while ($row = mysql_fetch_array($sql_result)) {
> $E_MAIL = $row["E_MAIL"];
> $NAME = $row["NAME"];
> $SUGGESTIONS = $row["SUGGESTIONS"];
> echo "<TR>
> <TD><a
> href='mailto:E_MAIL'>$NAME</a></TD>
> <TD>$SUGGESTIONS</TD>
> </TR>
> ";
> }
>
> echo "</TABLE>";
>
> // free resources and close connection
> mysql_free_result($sql_result);
> mysql_close($connection);
>
> ?>
>
>
>
> </BODY>
> </HTML>
>
>
> all i see is "NAME" and "SUGGESTIONS" and no data
> WHAT AM I DOING WRONG?
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>