Suppose you want a box on your website that says "Give us your email address and we'll send you news" or somesuch. What's a simple/elegant way to collect those email addresses (assuming a standard LAMP stack)? In particular, I'd like recommendations on
- Javascript to handle the UI (complain if invalid email address, say thanks when they hit enter, etc).
- CSS to make it look decent.
- PHP to actually collect the email addresses and store them (either flat file or database is fine).
Or if there's a fancy Rails or AJAX way to do this, I'm very open to that, too.
(All I know currently is how to do this the old-school CGI way, with a plain html web form with a submit button and a server-side script that takes the form contents, pulls out the email address, and spits out html (potentially a redirect back to the original page).)
If I'm naive in thinking I can grab something off the shelf for this and should be starting with something like an AJAX tutorial, let me know that as well. I've seen this JQuery/AJAX tutorial recommended. Is that or something like it the quickest way to get a simple sign-up form up and running?