Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 21st, 2012, 06:23 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old July 12th, 2013, 12:31 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #3 (permalink)  
Old July 12th, 2013, 07:00 AM
Friend of Wrox
Points: 651, Level: 9
Points: 651, Level: 9 Points: 651, Level: 9 Points: 651, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2011
Location: North East UK
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.
Reply With Quote
  #4 (permalink)  
Old July 15th, 2016, 04:40 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 02:05 PM
Chapter 5 Exercise 2 diango BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 4 February 1st, 2011 02: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 01:28 AM



All times are GMT -4. The time now is 08:13 PM.


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