Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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 Search this Thread Display Modes
  #1 (permalink)  
Old July 4th, 2008, 09:09 PM
Registered User
 
Join Date: Mar 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 13: Error in user.php

I've been getting an error message for the following code:

Code:
<?php

$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
 or die('Could not connect to MySQL database. ' . mysql_error());

mysql_select_db(SQL_DB,$conn);

if (isset($_GET['u']))
{
 $uid = $_GET['u'];
 $sql = "SELECT * FROM ml_users WHERE user_id = '$uid';";
 $result = mysql_query($sql)
  or die('Invalid query: ' . mysql_error());
 if (mysql_num_rows($result)) {
  $row = mysql_fetch_array($result);
  $e-mail = $row['e-mail'];
 } else {
  $e-mail = "";
 }
}
?>
Code:
[05-Jul-2008 01:28:42] PHP Parse error:  parse error, unexpected '=' in /_test/mailings/user.php on line 32
Line 32 would be this one:
Code:
  $e-mail = $row['e-mail'];
Does anyone have a clue as what's wrong here?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 13, useraccount.php karlgg BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 4 February 16th, 2010 09:23 AM
LINQ Error ? Chapter 13 workidoo BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 July 22nd, 2008 09:37 AM
chapter 13 of php4, user_auth.php Exitus BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 August 5th, 2004 09:02 AM



All times are GMT -4. The time now is 02:51 PM.


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