[wp-hackers] mysql insert and then a page redirect

John Blackbourn johnbillion+wp at gmail.com
Sat May 29 11:20:43 UTC 2010


You can use either the $wpdb->update or $wpdb->query methods to update
the database. These will return true or false depending of the query
is successful.

To redirect afterwards you should use wp_redirect( your_url ) followed by die().

John

On Fri, May 28, 2010 at 10:29 PM, Brian Fidler <fidler.brian at gmail.com> wrote:
> I'm setting up some PayPal integration where I set the PayPal return URL to
> a url with a specific transaction number as a URL variable. I'd like to
> return to a script that updates the database and then redirects to a
> different page once the db has been updated.
>
> What's the best way (or is it even necessary) to verify that the db has been
> updated and upon verification load a different page?
>
> thanks,
> brian
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list