Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Or in any of the other 11 Wordpress tables. I also need to store: submission date, name, contact number in the same table.

What approach would be best? A custom table or using a standard table?

share|improve this question
1  
What are they submitting? If they're creating posts then yes the post meta table would be ideal to store those four pieces of data. –  Andrew Bartel Apr 15 '13 at 17:18
    
@AndrewBartel Thank-you for taking an interest! –  mattnewbie Apr 17 '13 at 14:59
add comment

1 Answer

up vote 4 down vote accepted

If it's information that logically belongs to a post/page - you store it in postmeta (with update_post_meta function). If it's something that pertains to a user - usermeta table is for you. More still, there's Settings API in case you have a plugin that needs to persist any settings.

From your question it is somewhat unclear which of these would be best for you. What's a "submission date"? The name and contact number, I'm guessing, are for a user, and so would belong in the usermeta. Function update_user_meta is a good place to start.

share|improve this answer
    
Thank-you, you've answered my question spot on! –  mattnewbie Apr 17 '13 at 14:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.