tags:

views:

15

answers:

2

I'm programming a wordpress theme and need to make it save data, how should I have it do this? Is there a wordpress function or would I have to connect to the database on my own?

+1  A: 

It depends on what kind of data you're trying to save, how you want it saved, and what you want to do with it later. Can you be more specific?

RodeoRamsey
+1  A: 

Are you just trying to store simple name -> value pairs?

You could check for $_POST data in your theme then use update_option($name,$value) to save the data.

update_option will create the row in the DB if it doesn't exist. And get_option($name) will retrieve it.

Or are you trying to store something more complex?

derrickp