I have the following code
<html>
<head><basefont face="Arial"></head>
<body>
<?php
include "mailvalid.php";
if(email_valid($email==o)) //failure
{
echo"$email is not valid";
?>
<h2>User Profile</h2>
<form action="<?=$PHP_SELF?>" method="POST">
<b>Name</b><br>
<input type="text" name="name" size="15"><br>
<b>Email address</b><br>
<input type="text" name="email" size="20"><p>
<input type="submit" name="submit" value="submit">
</form>
<?php
}
else
{
echo "$email is valid adding to database";
?>
<form method="post" action="addtotable.php">
<b>Name</b><br>
<input type="text" name="name" size="15"><br>
<b>Email address</b><br>
<input type="text" name="email" size="20"><p>
<input type="submit" name="submit" value="submit">
</form>
<?php
}
?>
</body> </html>
Can somebody tell me how to n=make this work I have email valid function in mailvalidator once somebody eneter the mail address on form this cheks and returns is it ok or not,if it is ok I want to add this info to database otherwise I want to give warning and show the same page <php_self>
Any ideas?
Regards
anand


