shubho
05-06-2009, 08:53 AM
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
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