Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 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 October 10th, 2004, 09:30 AM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with chapter 11 example...

I downloaded the files for the session example (longer one without cookies) and for some reason the update script doesn't seem to work.

The page says:
Update Account Information
Here you can update your account information for viewing in your profile.

Here you can update your account information for viewing in your profile.

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

not sure what the problem is, i read through the code I downloaded and it seems fine.

-Mike

 
Old October 10th, 2004, 10:12 AM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Think I found it...the downloadable file for update_account.php.03.txt has a mistake in it.

key part says:

     $query_update = "UPDATE user_info SET email = '" . $_POST['email'] . "', city
         = '" . $_POST['city'] . "', state = '" . $_POST['state'] . "', hobbies =
         '" . implode(", ", $_POST['hobbies']) . "' WHERE username = '" .
         $_SESSION['user_logged']. "' AND password = (password('" .
         $_SESSION['user_password'] . "';";

The end for the password section should be: "'));";

which you can see in the later queries...
-Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 11 - Problem Opening Database dbcook8 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 February 2nd, 2009 08:41 AM
Problem with chapter 11 example luis.filipe BOOK: Expert SQL Server 2005 Integration Services ISBN: 978-0-470-13411-5 1 January 5th, 2008 05:29 PM
chapter 11 figure 11-7 relative positioning pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 November 29th, 2007 06:11 AM
Page 352 (Chapter 11) IDisposable Problem sosborne BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 August 18th, 2006 05:12 PM





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