Undefined index: SUCCESS_MESSAGE in C:\xampp\htdocs\phpMM\ch12\show_users.php on line 39
this is line 39:
page_start("Current Users", $delete_user_script,
I have forwarded your question on to our Book Tech staff, so they can help you find a solution. If you ever have any questions or issues with the content of a title, you can also contact them directly at email@example.com or call them at:
1-707-827-7019 (outside the USA)
7:30 am to 5:00 PST
Customer Service Representative
Could you provide some more information about your problem? Can you give me a page number of the example you are trying? You mentioned a problem with Chapter 11, but the file you are using above is in the Chapter 12 folder.
It sounds like your show_users.php file is dependent on another file that defines SUCCESS_MESSAGE and I can see that is defined in the view.php file in the scripts folder.
O'Reilly Book Support
I was working up to the end of ch11 and got the errors. So I took the download for the start of ch12 from your site to see if maybe I had created some error along the way but your sample code for the start of ch12 gave me the same errors. I am following the book completely, even started over in ch11 but same result. How do I move forward.
Are you sure that you created the view.php file that is shown on page 368, and are you sure that the php file you are running includes the line -
at the beginning of it? That is where SUCCESS_MESSAGE is defined, so without that you'll get the undefined error above.
If that doesn't help, send your response to firstname.lastname@example.org and we can go from there.
O'Reilly Book Support
$_REQUEST['success_message'] is pulling a request parameter, so it's going to look in your URL for something like:
So a few things:
1. The code on p. 356 shows (correctly) that success_message should be lowercase, rather than SUCCESS_MESSAGE as in your message. I'd check that first. Follow this through to p. 379 where page_start is called from show_users.php, and you'll see the same. So check your case, first of all.
2. This is a particularly tangly bit of code through here; lots of refactoring. So I'd try the code at the end of Chapter 11 from the downloads. That's known to work.
Let us know if you have further issues.