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

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

cURL proxy
Okay here is the thing... i know how to add proxys

Code: curl_setopt($ch, CURLOPT_PROXYTYPE,

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

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