Notice Undefined index: reset/ Attempting to redirect, works, but get a notice


Posted on 16th Feb 2014 07:03 pm by admin

Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET["reset"]); //THIS IS LINE 3
if(empty($reset))
$reset = false;
if($reset==NULL)
$reset=false;
if($reset==true){
session_destroy();
header( 'Location: index.php' ) ;
}
?>

and i get the "Notice":
Undefined index: reset in /Users/../header.php on line 3

What is going on? If you need more information, here is start and end of my main file, index.php
Code: [Select]<?php
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

session_start();
require_once("includes/header.php");
require_once("includes/constants.php");

//...
?>
<a href="index.php?reset=true">CLICK HERE TO RESET AND DESTROY ALL DATA</a>

So i only get this error when i go to index.php
index.php?reset=true works for me, but the problem is later after it redirects me back to index.php, the "Notice" is displayed..
How do i fix this??

No comments posted yet

Your Answer:

Login to answer
129 Like 17 Dislike
Previous forums Next forums
Other forums

Count
Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FR

preg-match with a string and numbers
Hi, I can't get the expression to work for my preg_match, what I'd like is for it to match the strin

Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line

Is there a function ... auto send IP
Is there some function that can be sent to a ddns service that returns the ip address of a ddns forw

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

! = ''
In the following 'IF' statement if v_ompcat = PU for example then Oracle equates that 'IF' statement

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag

How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.

I have a form with several drop down me

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash