Merge remote-tracking branch 'origin/github/pr/45'
[grml.org.git] / php-mailer / mailform.php
1 <?php
2 $name = ($_POST['name']) ? $_POST['name'] : 'Your name';
3 $email = ($_POST['email']) ? $_POST['email'] : 'Your E-Mail-Address';
4 $comments = ($_POST['comments']) ? stripslashes($_POST['comments']) : '';
5 ?>
6 <br>
7 <form action="" method="post">
8 <div style="background:#f0f0f0;padding:3px;font-size:70%">
9 <div style="background:#e0e0e0;padding:2px;font-weight:bold">Your message:</div>
10 <label for="name">Your name:</label><br />
11 <input size="25" type="text" name="name" id="name" value="<?="$name"?>" onfocus="if(this.value=='Your name'){this.value='';} this.style.backgroundColor='#DDD'" onblur="this.style.backgroundColor='#FEDB64'" /><br />
12
13 <label for="email">Your mailaddress:</label><br />
14 <input size="25" type="text" name = "email" id="email" value="<?="$email"?>" onfocus="if(this.value=='Your E-Mail-Address'){this.value='';} this.style.backgroundColor='#DDD'" onblur="this.style.backgroundColor='#FEDB64'" /><br />
15
16 <br /><label for="comments">Your message:</label><br />
17 <textarea name="comments" id="comments" style="width:95%" rows="15" onfocus="this.style.backgroundColor='#DDD'" onblur="this.style.backgroundColor='#FEDB64'"><?php echo htmlspecialchars($comments); ?></textarea><br /><br />
18
19 <input name="nopreview" type="hidden" value="1">
20 <input name="nopreview" id="nopreview" type="checkbox" value="0" checked="checked" /><label for="nopreview">show preview</label><br />
21
22 <p>
23 <input name="submit" type="submit" value="Submit message" />
24 </p>
25 </div>
26 </form>