form, self submit???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gimpact
Forum Commoner
Posts: 65
Joined: Tue Jun 16, 2009 11:08 pm

form, self submit???

Post 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,
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: form, self submit???

Post by jackpf »

a. What do you mean by self submit?
b. What do you mean by "not working"? Errors?? Need a better explanation...
gimpact
Forum Commoner
Posts: 65
Joined: Tue Jun 16, 2009 11:08 pm

Re: form, self submit???

Post by gimpact »

Thanks for replying I got the solution from here
http://www.webmaster-talk.com/php-forum ... -form.html

Thank you again
Post Reply