 |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6  | This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 10th, 2006, 04:55 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ch. 4 pg114-116
I'm having problems getting anything to show up in the webpage with the example:
<?php
//connect to database
//ignore this, i changed it when posting
$link = mysql_connect("localhost", "username", "password")
or die(mysql_error());
//use the correct database
mysql_select_db("moviesite")
or die (mysql_error());
//pour the results into result query
$query = "SELECT movie_name, movie_director, movie_leadactor " .
"FROM movie";
$result = mysql_query($query, $link)
or die(mysql_error());
$num_movies = mysql_num_rows($result);
//Designing the Movie Table Heads
$movie_header = <<<EOD
<h2><center>Movie Review Database</center></h2>
<table width="70%" border ="1" cellpadding="2"
cellspacing= "2" align="center">
<tr>
<th>Movie Title</th>
<th>Movie Director</th>
<th>Movie Lead Actor</th>
</tr>
EOD;
echo "I'm getting pissed!!!!!!!!!!";
$movie_details = ' ';
while ($row = mysql_fetch_array($result)){
$movie_name = $row['movie_name'];
$movie_director = $row['movie_director'];
$movie_leadactor = $row['movie_leadactor'];
$movie_details .= <<<EOD
<tr>
<td> $movie_name </td>
<td> $movie_director </td>
<td> $movie_leadactor </td>
</tr>
EOD;
}
$movie_details .= <<<EOD
<tr>
<td>$nbsp;</td>
</tr>
<tr>
<tr>Total :$num_movies Movies</td>
</tr>
EOD;
?>
any suggestions??
|
|

May 11th, 2006, 01:53 AM
|
|
Authorized User
|
|
Join Date: May 2005
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You haven't closed the <table> tag, so it won't show anything.
|
|

May 11th, 2006, 11:36 AM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks, (should have read further.) I appreciate it!!!
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Ch 2 - Ex 2 |
jkiernander |
BOOK: Ivor Horton's Beginning Visual C++ 2005 |
0 |
December 29th, 2007 08:47 PM |
| Answer to the nightmare on pages 114, 115, 116, |
mobyme |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
1 |
April 23rd, 2007 07:53 PM |
| Ch. 4 & Ch. 12 |
athena |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
0 |
July 23rd, 2004 10:54 AM |
| CH.15 NEED HELP |
stacy |
BOOK: Beginning ASP 3.0 |
1 |
January 21st, 2004 03:37 AM |
| ch. 2 with C# |
Justin |
BOOK: Beginning ASP.NET 1.0 |
1 |
July 10th, 2003 03:59 PM |
|
 |