Greetings!
If I do the following, it gives me a blank page. However, instead of using
the variable, if I put in $id_num = "191" Then it will display the
information.
Does anyone know what I am doing wrong? I hope you understand my question...
Thank you in advance!
Here is the link I use to this page:
<a href="view_prayer.php?id_num=191">view</a>
---------------------------------------------------------------------------
<?
// log into our local server using the MySQL root user.
$dbh = mysql_connect( "localhost", "username", "password" );
// select the database.
mysql_select_db( "prayer" ) or die ( mysql_error() . "\n" );
$prayer = $_POST["prayer"];
$id_num = $_POST["id_num"];
//and read it back for printing purposes.
$get_table_data = "SELECT * FROM prayer WHERE id_num= \"$id_num\"";
$response = mysql_query( $get_table_data, $dbh );
//now print it out for the user.
if ( $one_line_of_data = mysql_fetch_array( $response ) ) {
extract ( $one_line_of_data );
}
?>
<html>
<head>
<title>Prayer for <? echo "$date\n"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?PHP
$prayer = nl2br ($prayer);
$prayer = stripslashes ($prayer);
echo "$prayer\n";
?>
</body>
</html>
---------------------------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php