Jump to content

need help with this code plz


HAN!

Recommended Posts

im not getting any errors with this code but also no results:

<form name="insert" action="insert.php" method="post">
<table>
<tr><td>First Name:</td><td><input type="text" name="first" /></td></tr>
<tr><td>Midle Name:</td><td><input type="text" name="middle"  /></td></tr>
<tr><td>Familly Name:</td><td><input type="text" name="family" /></td></tr>
<tr><td>Adress:</td><td><input type="text" name="adress" /></td></tr>
<tr><td>Describe yourself:</td><td><textarea name="description"></textarea></td></tr>
<tr><td>E-mail:</td><td><input type="text" name="email"  size="26" />
<script language="javascript">
function CheckEmail() {
email = document.f1.Email.value
AtPos = email.indexOf("@")
StopPos = email.lastIndexOf(".")
Message = ""

if (email == "") {
Message = "Not a valid Email address" + "\n"
}

if (AtPos == -1 || StopPos == -1) {
Message = "Not a valid email address"
}

if (StopPos < AtPos) {
Message = "Not a valid email address"
}

if (StopPos - AtPos == 1) {
Message = "Not a valid email address"
} 
return message
</script>






<tr><td><input type="submit" onclick="CheckEmail()"/></td></tr>
</table>

Thank you

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.