• Resolved OLennox

    (@olennox)


    Hi there,

    I’m working on a site for my business and I would like to include a form (1 input text, 1 submit) that allows people to subscribe to a mailing list. The control would exhibit the following behavior:

    • Unsubscribed users would see the text field & submit button
    • When the user clicks submit:
    • A validation check is made against a regular expression
    • A check is made against an “mailing_list” table in the database to check for duplicates
    • The email address is inserted into the table
    • The system will attempt to add a cookie which shows that the user is subscribed
    • If the system detects the cookie then the form is hidden and a message is displayed

    I’m pretty new to PHP but I’ve been writing .NET for a few years and various other languages before/during. I suppose my questions are:

    • Does something like this already exist?
    • If not can I write this using regular PHP or will WordPress get upset if I start doing postbacks (etc.) outside of it’s control
    • If I need to code this around WordPress then I guess I’d need to write this as a plugin – is that right?

    Thanks for your time,

    Olly

Viewing 1 replies (of 1 total)
  • Thread Starter OLennox

    (@olennox)

    I ended up writing some custom script to achieve the functionality required. Coming from a .NET background I assumed that WordPress operated as an all-encompassing application that would break if I started messing about with post backs. That is obviously not the case.

    Cheers,

Viewing 1 replies (of 1 total)
  • The topic ‘(Very) Simple Mailing List Form?’ is closed to new replies.