Wrox Programmer Forums
|
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 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
 
Old November 21st, 2012, 07:23 PM
Registered User
 
Join Date: Nov 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile chapter 3 exercise Q 3

Code:
<?php
	$db=mysql_connect('localhost','bp6am','bp6ampass') or die(mysql_error($db));
	mysql_select_db('moviesite',$db)or die(mysql_error($db));
	
	if(isset($_GET['offset'])){
		$offset = $_GET['offset'];
	}else{
			$offset=0;
	}
	
	$query='select 
				movie_name,movie_year
			from
				movie
			order by
				movie_name
			LIMIT ' . $offset . ' , 1';
	$result=mysql_query($query,$db)or die(mysql_error($db));
	$row = mysql_fetch_assoc($result);
?>
<html>
	<head>
		<title><?php echo $row['movie_name']; ?></title>
	</head>
	<body>
			<table border="1">
				<tr>
					<th> Movie Name</th>
					<th> Year </th>				
				</tr><tr>
					<td><?php echo $row['movie_name']; ?></td>
					<td><?php echo $row['movie_year']; ?></td>
				</tr>
			</table>
			<p>
				<a href="page.php?offset=0">Page 1</a>,
				<a href="page.php?offset=1">Page 2</a>,
				<a href="page.php?offset=2">Page 3</a>
			</p>
	</body>
</html>
I HAVE PROBLEM WITH THIS CODE WHEN I CLICK ON PAGE 1, PAGE 2 OR PAGE 3, THE ERROR CAME error 404 NOT FOUND.
 
Old July 12th, 2013, 12:31 AM
Registered User
 
Join Date: Jul 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 3 Exercise 3

For me it doesn't work too, why? is there any one home... please help us out.
 
Old July 12th, 2013, 07:00 AM
Friend of Wrox
 
Join Date: May 2011
Posts: 125
Thanks: 0
Thanked 24 Times in 24 Posts
Default

Greetings,

Did you call the file 'page.php' ?

If not then you'll have to alter the page that's called here;
Code:
<a href="page.php?offset=0">Page 1</a>
change page.php to whatever you called the file containing the code in the first post.
 
Old July 15th, 2016, 04:40 AM
Registered User
 
Join Date: Dec 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy WHEN I CLICK ON PAGE 1, PAGE 2 OR PAGE 3, THE ERROR CAME error 404 NOT FOUND

Why..... WHEN I CLICK ON PAGE 1, PAGE 2 OR PAGE 3, THE ERROR CAME error 404 NOT FOUND ???????????

Help me please..!!

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 exercise 4 earlmw BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 0 March 3rd, 2012 03:05 PM
Chapter 5 Exercise 2 diango BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 February 1st, 2011 03:24 PM
Chapter 2 Exercise #5 yowzer14 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 August 26th, 2010 12:33 AM
Chapter 7 - Exercise rickymartini76@yahoo.it BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 2 March 16th, 2010 07:32 PM
Chapter 3 exercise 2 weekapaugh BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 2 March 11th, 2010 02:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.