Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Subscribe buttons

Featured Replies

Hi.

 

Im looking for a simple subscribe button that i can use so people can join a mailing list on my site. All i need is the input box and then a subscribe button, where i would then get an email with what the person put. I have looked on google but most of what i find isnt really what i am looking for, could anyone help?

Something like this?

Input form code:-

<form action="process.php" method="post">
<ul style="list-style-type: none;">
<li>Email: <input type="text" name="email" size="30" maxlength="40"></li>
<li> </li>
<li><input type="submit" name="submit" value="Send"></li>
</ul>
</form> 

 

Process file process.php to go in same folder/directory as form:-

<?php
$admin="mail@your-domain.com";//Your email address
$sub="Form feedback";
$email = $_POST['email'];
mail($admin,$sub,$email,"From: $admin");
echo "Thanks, $email, your email address has been recorded.";
?>

 

That is just the most basic code. When you get attacked by a spambot, google or ask for some security codes.

 

The email goes from you ($admin) to you ($admin) because some ISPs don't like computer-generated emails that have a From address that is not from their own server, they are suspect spam and can get blocked, so the viewer's email address is in the message part of the email to you.

 

Just in case you don't know much PHP, the main file with the html form needs a .php filename extension and the process.php file also. Check that your hosting service supports PHP.

  • Author

Something like this?

Input form code:-

<form action="process.php" method="post">
<ul style="list-style-type: none;">
<li>Email: <input type="text" name="email" size="30" maxlength="40"></li>
<li> </li>
<li><input type="submit" name="submit" value="Send"></li>
</ul>
</form> 

 

Process file process.php to go in same folder/directory as form:-

<?php
$admin="mail@your-domain.com";//Your email address
$sub="Form feedback";
$email = $_POST['email'];
mail($admin,$sub,$email,"From: $admin");
echo "Thanks, $email, your email address has been recorded.";
?>

 

That is just the most basic code. When you get attacked by a spambot, google or ask for some security codes.

 

The email goes from you ($admin) to you ($admin) because some ISPs don't like computer-generated emails that have a From address that is not from their own server, they are suspect spam and can get blocked, so the viewer's email address is in the message part of the email to you.

 

Just in case you don't know much PHP, the main file with the html form needs a .php filename extension and the process.php file also. Check that your hosting service supports PHP.

 

I just tried it and it exactly what i needed, thank you so much.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.