Page 1 of 1

form, self submit???

Posted: Wed Aug 26, 2009 7:57 am
by gimpact
Hello,

I had this weird idea. I am trying to make self submission. Of course it does not work so any one, with an idea to make this work?

Code: Select all

<?php
$ref = $_POST['ref'];
if (ref == accountExist){
$msg = "An account with this email ID already exist";
}else if ($ref == success){
$msg = "Your account has been successfully create. You should activate your account to login.";
}else if ($ref == submit){
$email = $_REQUEST['email'];
$password = $_REQUEST['password'];
include ("secure/LoginClass.php");
LoginClass($email,$password);
}else{
$msg = "";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
      <form action="?ref=submit" method="POST">
          emailID: <input type="text" name="email" value="" />
          
          password: <input type="password" name="password" value="" />
          <br>
          <input type="submit" value="login" name="login" />
      </form>
  </body>
</html>

Thank you,

Re: form, self submit???

Posted: Wed Aug 26, 2009 8:40 am
by jackpf
a. What do you mean by self submit?
b. What do you mean by "not working"? Errors?? Need a better explanation...

Re: form, self submit???

Posted: Wed Aug 26, 2009 8:51 am
by gimpact
Thanks for replying I got the solution from here
http://www.webmaster-talk.com/php-forum ... -form.html

Thank you again