 |
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
|
|
|

November 3rd, 2005, 08:55 PM
|
Registered User
|
|
Join Date: Apr 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 13, useraccount.php
There seems to be a problem with the Modify Account function, in useraccount.php ... When you create an account, and modify the access level with an Administrator, the "Full Name" field is filled with your Admin's name field, instead of the account you're modifying. Therefore, if you change the access level and save it, you will change the new account's name to match your admin account!
What's worse, the screenshot in the book (page 456) shows this happening, the user "George Smith" gets modified, and "admin" is displayed in the edit box.
Changing the $name inside useraccount.php (I used $uname) fixes the functionality for it, but why is it happening? If there's a conflict with a global variable, why isn't the DB read overwriting YOUR logged-in-as name, instead of the other way around?
<SPAN ATTRIB="DORK">KarlGG</SPAN>
|

March 13th, 2008, 07:27 PM
|
Registered User
|
|
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I ran into this same problem. From what I can tell, the $name variable gets set correctly, but when the require_once 'header.php' is issued after setting the variables, it releases $name for some reason.
Moving require_once 'header.php' to the top of the file (line 3) solved my problem.
|

February 16th, 2010, 04:44 AM
|
Authorized User
|
|
Join Date: Feb 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hey there,
Even weirder- I have had the useraccount.php working fine until I tried to set up the admin page! The first time I tried to modify a users details in the administrators login I ended up with that users name as the logged in name and since then once logged out any user that is logged in again it wont show any user name - till I try to modify a user acount then end up with that users name again..... I'm using Xampp with apache 2.4.14 AND PHP 5.3.1 on windows. Have checked php.ini and register globals is st to off. I've always had the $name changed to $username anyway and tried moving include header to the top as suggested above.....but alas still the same prrblem. I have to say I have modified the script from the book to fit into my own site so will now see if the same thing occurs using the code straight from the book.
|

February 16th, 2010, 05:06 AM
|
Authorized User
|
|
Join Date: Feb 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ok, heres the rub... working fine in the book version.. but my code which is obviously very wrong i get this message...
Quote:
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
|
as i said before register globals is off... does that mean it should be on? considering im using php 5.3.1????
hmmmm... any thoughts anyone?
|

February 16th, 2010, 09:23 AM
|
Authorized User
|
|
Join Date: Feb 2010
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
fixed it - typing error 
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Chapter 13: Error in user.php |
pherank |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
0 |
July 4th, 2008 09:09 PM |
Cahpter 13 remove.php |
Graham76 |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
1 |
November 4th, 2004 01:33 PM |
Chapter 12 - useraccount.php |
buzzuh |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
3 |
September 3rd, 2004 02:53 PM |
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 |
13. how can i execute a php script using command l |
phpsharma |
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 |
3 |
October 31st, 2003 05:27 AM |
|
 |