Unfortunately, there’s still a problem. You might have noticed something like Figure 10-2 when you got your image insertion working. You could see a blank screen, or even a totally different user, as in this scenario.
This isn’t as much of a mystery as it first seems. Here’s the last bit of your code from create_user.php
What’s the problem? It’s in that second-to-last line. Remember, mysql_ insert_ id returns the 10 of the last INSERT query, which is no longer the INSERT for your users table; it’s your new INSERT for images. The redirect to show_user.php is in fact working, but j,t’s sending the 10 of the image inserted rather than the user. Fortunately, you can easily fix that:
Try this out again, and you should be back to what you expect: a slightly broken version of show_user.php but broken in the way that you expect (see Figure 10-3),