This is a discussion on "Log in Error Need Help" within the PHP Forum section. This forum, and the thread "Log in Error Need Help are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Log in Error Need Help
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Log in Error Need Help
i got this error can anybody help me below is the code..
Warning: Cannot modify header information - headers already sent by (output started at C:\Server\htdocs\index.php:7) <?php ob_start(); //include the header.php file require("config.php"); //Write the login form out echo "<form method=post action=index.php?action=check><table><tr><td>Usern ame:</td><td><input type=text name=Uname></td></tr><tr><td>Password:</td><td><input type=password name=Pword></td></tr> <tr><td><a href=forgotpassword.php>Forgot password</a></td><td><input type=submit value=Login></td></tr></table> Don't have an account yet? <a href=register.php>Register Here</a><br></form>"; //check the input if($_GET['action'] == 'check') { //find the user $result = mysql_query("SELECT * FROM loginphp WHERE Uname='{$_POST['Uname']}'") or die(mysql_error()); $row = mysql_fetch_array( $result ); //set $row to result if($row['Uname'] == "") { echo error(); } else { //$enc = md5($_POST['Pword']); $enc = $_POST['Pword']; if($row['Pword'] == $enc) { $_SESSION['Uname'] = $_POST['Uname']; $_SESSION['lp'] = 'pl'; header("Location: main.php"); exit; } else { echo error(); } } } function error() { echo "<b>The username/password is incorrect</b>"; } ?> |
|
|
![]() |
| Tags |
| login |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Getting the "Microsoft JET Database Engine error '80040e14'" error. | VegaLA | Classic ASP | 3 | Jan 26th, 2008 00:12 |
| Keep getting error message Microsoft VBScript runtime error '800a01a8' | cpando1974 | Classic ASP | 2 | Aug 7th, 2007 12:00 |
| Error 500 - Internal server error | JasonStanley | PHP Forum | 3 | Apr 23rd, 2007 17:56 |