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
Did you know?Explore Trending and Topic pages for more stories like this.
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

Combining refCursors and Summing
Given the following DDL:

CREATE TABLE FOODSALESTEST ("WEEKNBR" NUMBER, "ST

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

cURL error
So here is my code... I got it off of here... http://www.youtube.com/watch?v=XcgQUsorF_8
Because

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: blog:edit_all,delete_all|users:edit_all,delete_

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

Problem Dereferencing
With these types and tables:

CREATE TYPE MANAGER AS OBJECT (
MGR_ID INTEGER,

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

Multidimensional Array into an Html table, help!
Hello all, I am new to HTML/PHP so any help would be great.

I have a multidimensional array f

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

file_put_contents and createimagefromjpeg
All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename

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