$movie_director = $row[ movie_director ]; $movie_leadactor = $row[ movie_leadactor ]; //get director s name from people table get_director(); //get lead actor s name from people table get_leadactor(); $movie_details .=<<
| $movie_name |
$director |
$leadactor |
EOD; } $movie_details .=<<
| Total :$num_movies Movies |
EOD; $movie_footer =
; $movie =<< 2. Save your file and reload it in your browser. Your screen should now look like that in Figure 4-4. How It Works With the functions get_director and get_leadactor added, the script requests that specific information be requested from the server for each separate row in the table. This enables you to pull the information you want without muddling up your original query. You also cleaned up the formatting for the last two rows with the change in code near the end of the script. Congratulations! You have successfully developed a powerful script that will query a database and put its contents into an HTML table. Give yourself a pat on the back. But like all good explorers, onward we must go. 119 Using Tables to Display Data
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web design programs services
This entry was posted
on Sunday, April 22nd, 2007 at 9:11 pm and is filed under php.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.