Jump to content

Why won't show_user.php work in PHP & MySQL Missing Manual?

WangDawski's Photo
Posted May 12 2013 07:32 PM
2022 Views

I have 2 problems: running the examples in the book using my MAMP server never loads the CSS, and the show_user.php that should display the results from my create_user.html form comes back blank. I know the database_connection is good because the entry is created in the database table! What's my problem? Please help!

Tags:
1 Subscribe


3 Replies

0
  bmclaugh's Photo
Posted May 14 2013 05:03 AM

Hey there-

First of all, you should take the time to get the CSS loading. That suggests that you don't have the relative paths right in your files, or that you don't have your CSS where you're referencing it. Without more context, it's difficult to tell; unfortunately, "XXX isn't working" doesn't give us much information. In short, though, you need to figure out where your CSS is in reference to your HTML, which apparently you can load via localhost.

Maybe you can post the URL you're putting into your browser to access an HTML page, and then the link tags and hrefs in those tags that refer to your CSS.

As for your other problem, we need a lot more information.

1. Which chapter and what page are you in? Those scripts are continually developed throughout the book, so it's important to know where you are.

2. Keep in mind that before show_user.php is involved, create_user.php handles the actual user creation. It's possible that you're not correctly redirecting the user from create_user.php to show_user.php. create_user.html doesn't directly submit to show_user.php.

3. Have you tried accessing show_user.php directly? If that works, then you've almost certainly got an issue in how create_user.php connects and redirects to show_user.php.

Hope that helps. In general, we need a lot more information to help, though.

Thanks
Brett
---
Brett McLaughlin
O'Reilly Media, Inc.
"I teach"

email: brett@oreilly.com
phone: 214.771.8758
twitter: @oreillybrett
0
  WangDawski's Photo
Posted May 14 2013 11:19 PM

I've checked the relative paths, they are correct and match the ones in the missing cd files. Show_user.php doesn't return anything on its own except to tell me that it can't find show_error.php in the folder it thinks is on my computer, even though I defined the site root using the folder I created on my GoDaddy server. Basically I'm confused about how much of the code should now refer to what's on my godaddy server and how much should refer to files on my computer. I tried uploading show_user and a couple other scripts to a folder on my site but the show_user.html I launch from my computer won't load them.
Oh, and is it a problem that I've been typing the scripts using Dreamweaver instead of a text editor?

Thanks,
Mark
0
  Jony Ancher's Photo
Posted Mar 26 2014 04:43 AM

If you have lost any thing from your MySQL database, then you try Kernel for MySQL recovery software. Its a best tool for ever users, try with free trial demo version of this tool first then purchase the tool and the software support with all kind of MS windows OS.

For more guidance about this tool: http://www.mysqlrecovery.net