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

php require help needed
Ok i tried to use the search funtion but the word require is everywhere.

i'm really new to cr

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

Beginners syntax and loop questions - help please!
Hi everyone,

I have some problems with php code. I'm currently in the middle of learning php,

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

Time script, set to my time zone?
I am using this line to get the date and time

Code: $time = date(F." ".d.", &q

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

Help: problem with Headers to download PDF file
Hi,

I'm trying to implement a script where when a user clicks a link he gets a PDF file to op

article site help remaining text
Hi all hope you will be fine
I am creating a article site in this site i want to put some text on

defining website tags
Hi,

What would be the best way to define tags for my site, such as website title, url etc.

Reading waves
Hi,

I am trying to find a way of finding the highs and lows on a graph line, the line points

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