forked from iamcal/rfc822
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.php
38 lines (27 loc) · 743 Bytes
/
demo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?
$title = "RFC 822 Demo";
$no_homelink = 1;
include('../../head.txt');
include('rfc822.php');
?>
<p class="homelink"><a href="/php/rfc822/">« Back to project homepage</a></p>
<h1>RFC 822 Demo</h1>
<p>Enter an email address to test:</p>
<form action="demo.php" method="get">
<input type="text" name="e" value="<?=HtmlSpecialChars($_GET['e'])?>" style="width: 400px" />
<input type="submit" value="Go" />
</form>
<? if (strlen($_GET['e'])){ ?>
<hr />
<p><b>Address:</b> <?=HtmlSpecialChars($_GET['e'])?></p>
<p><b>Result:</b>
<? if (is_valid_email_address($_GET['e'])){ ?>
<span style="color: green">Valid</span>
<? }else{ ?>
<span style="color: red">Invalid</span>
<? }?>
</p>
<? } ?>
<?
include('../../foot.txt');
?>