Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
login does not work anymore May 14, 2013 04:09PM |
Registered: 11 years ago Posts: 51 Rating: 0 |
Re: login does not work anymore May 14, 2013 08:40PM |
Registered: 11 years ago Posts: 58 Rating: 3 |
Re: login does not work anymore May 15, 2013 02:48PM |
Registered: 11 years ago Posts: 51 Rating: 0 |
Hope i can get some helpLanguage: PHP<?php include("connect.php");//include database connection session_start(); //initialize session if($_SERVER["REQUEST_METHOD"] == "POST") { // username and password sent from Form// $myusername=addslashes($_POST[';username';]); $mypassword=addslashes($_POST[';password';]); $sql="SELECT id FROM login WHERE username=';$myusername'; and password=';$mypassword';"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $active=$row[';active';]; $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row// if($count==1) { session_register("myusername"); $_SESSION[';login_user';]=$myusername; header("location: welcome.php"); } else { $error="Your Login Name or Password is invalid"; } } ?> <html> <form action="" method="post"> <label>UserName :</label> <input type="text" name="username"/><br /> <label>Password :</label> <input type="password" name="password"/><br /> <input type="submit" value=" Submit "/><br /> </form>
Re: login does not work anymore May 15, 2013 06:08PM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: login does not work anymore May 16, 2013 08:28AM |
Registered: 11 years ago Posts: 51 Rating: 0 |
Re: login does not work anymore May 16, 2013 01:29PM |
Registered: 11 years ago Posts: 58 Rating: 3 |
Re: login does not work anymore May 17, 2013 11:29AM |
Registered: 11 years ago Posts: 51 Rating: 0 |