View Single Post
Old 05-06-2009, 08:53 AM   PM User | #1
shubho
New Coder

 
Join Date: May 2009
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
shubho has a little shameless behaviour in the past
undefined index error

I am new in php.I get following error

undefined index :username on line 12.The code is as below

<?php session_start();
if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"])){ ?>
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=myaccount.php">
<?php
exit();
}

$display_error = "";
$username = "";

if ($_POST['username']) {
$username = $_POST['username'];
if( strtolower($_POST['code'])!= strtolower($_SESSION['texto'])){
$display_error = "* Security Code Error"; // error language
include ('error.php');
exit();
}else{
include('includes/config.inc.php');
$username=uc($_POST['username']);
$pass=uc($_POST['password']);
$password = sha1($pass);

if ($password==NULL) {
$display_error = "* All fields are required"; // error language
include ('error.php');
exit();
}else{

please help with this coding

Last edited by shubho; 05-06-2009 at 09:00 AM.. Reason: highlight
shubho is offline   Reply With Quote