p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 (http://p2p.wrox.com/forumdisplay.php?f=160)
-   -   Chapter 4 table3.php (http://p2p.wrox.com/showthread.php?t=38595)

mojo11ku February 16th, 2006 06:09 PM

Chapter 4 table3.php
 
I have noticed something in the code, which goes something like this:
Code:

1. $movie_details .= <<<EOD
2. <tr>
3. <td><a href="movie_details.php?movie_id=$movie_id"
4. title="Find out more about $movie_name">$movie_name</td>
5. <td>$director</td>
6. <td>$leadactor</td>
7. </tr>

Now if you look at line number 3 it starts with <a> but have no endings in line nr. 4
I have tryed it in my browser and the code didn't produce any error but i just thought
it would be better with ending tags...

TheDudeTux February 16th, 2006 07:39 PM

Hey whats up Dude? I saw your post, actually I didnt notice that before. So when I looked at my code and also the books code and the downloaded code. They all had the same code without the closing </a>. The code probably ran fine because HTML is pretty forgiving compared to Java and PHP and other languages. I changed mine with the </a> and it still worked the same. I had it set up $movie_name </a></td> on line 4. All and all with or without it I think your good to go. But in future situations things might be different depending on what you are doing with the link...sometimes not closing the <a href will hyper link up your work if you dont close it. Keep up the good work and keep coding!!! Good eye on spotting it too! Take Care



All times are GMT -4. The time now is 06:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.