Topic: How do I update the database table from a Form, using WordPress $wpdb

I would like to know how I can update the database table, from my own form in WordPress. I can do this using regular PHP MySQL, but when I go to use the $wpdb class, I have some problems with it. Can someone let me know how to do this. What I want to do is very simple, just take a form like the following:

Name:
Last Name:
Address:
Telephone:
Email:
Subject:

and then move the entered values into the database, using the $wpdb class.

Thank you very much,

Ricardo

Re: How do I update the database table from a Form, using WordPress $wpdb

As described here: http://codex.wordpress.org/Function_Ref … NSERT_rows

You simply have to call the insert method:

$wpdb->insert( 'table', array( 'column1' => $_POST["lastname"], 'column2' => $_POST["email"] , ...), array( '%s', '%d' ) )

Hope it helps.

Forum Software Reviews Review, compare and test forum software solutions.
[img]http://www.forum-software.org/review-bar/punbb[/img]
PunBB score: 7/10! Vote