Jump to content

Shahzaib

New Members
  • Posts

    2
  • Joined

  • Last visited

Shahzaib's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. but the thing that you are telling is rigth.....but this is not solution...............also what about error of undefined user index
  2. The form file is not redirctng to process2.php file after clickng sign in also when i manually open process2.php file then errors comes like this"undefined user index username and password"............ MAIN FILE (FORM FILE): <form action="process2.php" method="post"> <div class="input-controls"> <input type="text" name="username" placeholder="username"> <span id="person"></span> <div id="clear"></div> </div> <div class="input-controls"> <input type="password" name="password" placeholder="password"> <span id="key"></span> <div id="clear"></div> </div> <div class="input-controls"> <button type="button" id="login-btn" name="signin"> sign in </button> </div> <div id="form-footer"> <a href="#" id="forgot">Forgot Password?</a> <a href="#" id="create">Create an account</a> </div> </form> PROCESS2.PHP FILE <?php $user = $_POST['username']; $pass = $_POST['password']; if($user!=" " && $pass!=" ") { if(isset($_POST['signin'])) { setcookie($name,$user,time()+3600); echo "Cookie is set"; } } else { header('location:form.php'); } ?> I Really Appreciate your replies.thanks in advance
×
×
  • 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.