WordPress.org

Ready to get started?Download WordPress

Forums

Plugin help for a newbie plugin writer (5 posts)

  1. lifegauge
    Member
    Posted 6 years ago #

    I have taken my first steps to write a plugin for my site. I have done the following so far:

    1) plugin creates a table in database when activated
    2) plugin can query and display content in the sidebar by calling the plugin's function

    I am trying to display a form that allows the user to add data to my plugin's table - how should i do this? is there a thread or a tutorial that you can point me to for this?

    Very much appreciated!

  2. Alex Cragg
    Member
    Posted 6 years ago #

    I wrote a quick post listing some resources for writing a plugin, and to save listing them all here again, have a look at http://webdev.mysoutham.com/writing-a-plugin/

  3. lifegauge
    Member
    Posted 6 years ago #

    Thanks for the link - I've seen most of the sites listed on your page before, and the closest they got to man-handling a database is pulling data out, or even inserting data into the options table.

    I'm trying to write a form to let me user insert data into my own plugin's table. Any idea please?

  4. Alex Cragg
    Member
    Posted 6 years ago #

    when you say user then, do you mean not a backend user, but a visitor to your site?

  5. lifegauge
    Member
    Posted 6 years ago #

    Visitor to my site, yes.

    For example, those plugins that allow visitors to vote via a sidebar widget, where the data of the vote is stored in database. There must be a form that allows visitors to select "Yes" or "No", and "Submit" to enter the vote into the database. My question is, should this <form> be in a serparate PHP page, other than the main plugin php file? If so, how does wordpress know that PHP page is part of my wordpress plugin? Should I include that page within my wordpress plugin page?

Topic Closed

This topic has been closed to new replies.

About this Topic