PasteSite.Com

Recent Pastes

Sign Up!

PasteSite is open to the public, but with limited features. Register to be able to modify access rights, track your pastes and more...

Change the theme

If you prefer reading light text on a dark background to dark text on a light background, then you might want to try the dark theme.

This paste is a reply. View the Previous Paste?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<form>
    <p>First Name:</p><input name="fname" class="name" size="40" maxlength="255" type="text" />
    <p>Last Name:</p><input name="lname" class="name" size="40" maxlength="255" type="text" />
    <p>Email Adress:</p><input name="email" class="email" size="40" maxlength="255" type="text" />
    <p>Subject:</p><input name="subject" id="subject" size="40" maxlength="255" type="text" />
    <p>Enter Text:</p><input name="content" id="content" style="width: 500px; height: 200px;" type="text" />
</form>
<?php
if(isset($_POST['name']) && !preg_match('/[^a-zA-Z-]/',$_POST['fname'].$_POST['lname']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) && !preg_match('/[^a-zA-Z0-9 ]/',$_POST['subject']) && strlen($_POST['content']) <= 400){
    if(@mail($_POST['email'], $_POST['subject'], $_POST['content'], "From: ".$_POST['fname']." ".$_POST['lname']." <".$_POST['email'].">")){
        echo "success";
    }
    else{
        echo "random mail failure";
    }
}
else{
echo "incorrect details";
}
?>

Reply to This Paste

(leave blank to make this paste permanent)
(if set as private)