We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide
Quick HTML Question (Hopefully)
steve_r123
Posts: 512 Forumite
in Techie Stuff
I'm trying to put a newsletter box on a website. What I mean is a user types their email address into a box, then they press a submit button and it stores their email address somewhere for me to cut n paste them.
I've found a mailto way of doing it, but thats not really what I want I dont think.
I am only conversant with fairly basic HTML, so PHP/ASP type things may be a little out of my range.
Any help would be great, this is for a charity music site, and not for spamming etc.
Thanks :beer:
I've found a mailto way of doing it, but thats not really what I want I dont think.
I am only conversant with fairly basic HTML, so PHP/ASP type things may be a little out of my range.
Any help would be great, this is for a charity music site, and not for spamming etc.
Thanks :beer:
0
Comments
-
I cant answer your question directly, but this site has been helpful to me in the past
http://www.w3schools.com/html/default.asp0 -
Basically you cant do it with pure HTML
HTML is static so, as a 101 to how it works, when a web browser asks for a page the server simply sends it. What you want the server to do is to do "something" with the contents of the form when the person hits send which requires the server to do something more than simply send the next page so has to be done with something like ASP/ PHP/ CGI or such to either email you the address, store it to a textfile or database etc.
Thankfully PHP and ASP are both very easy to do these simple things - CGI (now very out of date) is much more difficult but there are plenty of free scripts you can down load and use 99% as is. You need to confirm which your webhost supports and then others will be able to point you in the direction of a script that will do what you want.All posts made are simply my own opinions and are neither professional advice nor the opinions of my employers
No Advertising or Links in Signatures by Site Rules - MSE Forum Team 20 -
From the very site above:
<html>
<body>
<form action="MAILTO:someone@w3schools.com" method="post" enctype="text/plain">
<h3>This form sends an e-mail to W3Schools.</h3>
Name:<br>
<input type="text" name="name"
value="yourname" size="20">
<br>
Mail:<br>
<input type="text" name="mail"
value="yourmail" size="20">
<br>
Comment:<br>
<input type="text" name="comment"
value="yourcomment" size="40">
<br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form>
</body>
</html>0 -
You are going to have to get into a little scripting to be able to do what you want. Although HTML supports forms it doesn't really enable you to do much with the information gathered.
Without knowing the capabilities of your web server I can't recommend a scripting language, except to say that I once did something very similar with Perl - I am sure there are numerous examples online to copy. Try googling for something appropriate e.g. 'CGI save form' or something similar.0 -
moob wrote:From the very site above:
<html>
<body>
<form action="MAILTO:someone@w3schools.com" method="post" enctype="text/plain">
<h3>This form sends an e-mail to W3Schools.</h3>
Name:<br>
<input type="text" name="name"
value="yourname" size="20">
<br>
Mail:<br>
<input type="text" name="mail"
value="yourmail" size="20">
<br>
Comment:<br>
<input type="text" name="comment"
value="yourcomment" size="40">
<br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form>
</body>
</html>
This just sends the mail. The OP specified that they want to store the email address. As Astaroth said, you need to use a server side language and store the details in a file or database. Once you know what your server supports, we can come up with a simple script to do the job.0 -
Have a look if your site can support PHP.
Create a file called ' phpinfo.php ' & upload it to somewhere on your site. In the file stick the following piece of code:
[PHP]
<?
phpinfo()
?>
[/PHP]
Then we can see if: 1) your site supports php & 2) get you going with a form.
==edit==
I realise he could use other scripts & server side languages, but I think php offers the most flexibility (and is quite awesome!)0 -
Just checked with the host, and this is what I have found:
ASP/Active State Perl support
Database support (MS Access 2000)
CGI support
FTP access
Doesnt look like any PHP support unfortunately
0 -
I use a fantastic PHP based program on my website for dealing with the mailing lists.
get it from http://www.phplist.com/
it's open source, so it's free!
Once it's set up you can create custom signup pages (the form you wanted), and then you can create your newsletters within the system, it will batch send them for you, you can export the userlist to excel if you wanted to run off mailing labels by doing a mail merge in word or whatever..)
You can even run separate mailing lists off the one system.
All in all it's rather good, and did i mention it's free ?
0 -
steve_r123 wrote:ASP/Active State Perl support
ASP normally stands for Active Server Pages so not sure if you above quote means that they support something other than normal ASP or if it is ASP and Active State Perl they support?
If it is ASP then you could easily get a script to simply write the email address to an Access db.
Of cause, depending on what you are doing this for you should also have a way for the users to unsubscribe from the mailing list and if you have an ASP script doing one part it becomes tempting to just write another one to deal with the unsubscribes too..... and of cause you could then send the mails out via the website too so it links to the db saving you having to keep replications... before you know it you will have a fully functioning ASP/ CGI website
All posts made are simply my own opinions and are neither professional advice nor the opinions of my employers
No Advertising or Links in Signatures by Site Rules - MSE Forum Team 20 -
Access databases for the LOOSE.
If all you want is to store all the email addresses so that you can come along and copy/paste them into an email client to send mass emails then you would be better appending them to a text file with a comma after them.
If you want a system that allows registration to an email list, I would recommend (for the time being) using one of the many free mailing list programs, I believe Bravenet do a decent one, and so does Yahoo.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 353.5K Banking & Borrowing
- 254.1K Reduce Debt & Boost Income
- 455K Spending & Discounts
- 246.6K Work, Benefits & Business
- 602.9K Mortgages, Homes & Bills
- 178.1K Life & Family
- 260.6K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards