Wrox Programmer Forums
|
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 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 February 17th, 2010, 08:58 AM
Registered User
 
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 3 - Data Error

PHP Code:
$type "INSERT INTO movietype (movietype_id, movietype_label) " .
"VALUES (1, 'Sci Fi'), " .
"(2, 'Drama'), " .
"(3, 'Adventure'), " .
"(4, 'War'), " .
"(5, 'Comedy'), " .
"(6, 'Horror'), " .
"(7, 'Action'), " .
"(8, 'Kids')" .
$results mysql_query($type)
or die(
mysql_error());

//insert data into "people" table
$people "INSERT INTO people (people_id, people_fullname, " .
"people_isactor, people_isdirector) " .
"VALUES (1, 'Jim Carrey', 1, 0), " .
"(2, 'Tom Shadyac', 0, 1), " .
"(3, 'Lawrance Kasdan', 0, 1), " .
"(4, 'Kevin Kline', 1, 0). " .
"(5, 'Ron Livingston', 1, 0). " .
"(6, 'Mike Judge', 0, 1). " .
$results mysql_query($people)
or die(
mysql_error()); 
I get that message:
Quote:
Notice: Undefined variable: type in C:\Wampp\www\moviedata.php on line 28

Notice: Undefined variable: people in C:\Wampp\www\moviedata.php on line 40
Data inserted successfully
Any idea why is that?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 17-Data Binding Hotshotron25 BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 1 August 20th, 2009 04:10 PM
Chapter 11: Error while updating user data pherank BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 March 16th, 2008 07:03 PM
data environment in data report- error?Why myth12345 VB How-To 0 February 18th, 2005 03:08 AM
Parse error in error handler (Chapter 8) Funky Monk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 August 6th, 2004 08:59 AM





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