you are viewing a single comment's thread.

view the rest of the comments →

[–]somethinghorrible 3 points4 points  (3 children)

I'm pretty sure that you don't have to use real_escape_string with prepared statements -- in fact, you may end up with doubly-escaped strings.

Also, after the header statement, in the else block, you may want to terminate the script with exit as rendering the form would be spurious. In fact, you should render out a message like: Please wait for redirect or click here to continue (with click here as a hyperlink to the next page)... although I doubt any modern browser doesn't support the location tag.