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

Error in Configure System Landscape Directory phase
Hi

We are getting the error in Configure SLD phase ( 41 of 44 phase).

Please f

Help on code output
My CODE:

Code: [Select] echo "<phone>".$line["phone"].&qu

PHP header help!
Hi all I am trying to get this php page to refresh every 5 seconds on my phone which is an aastra 48

uploading video files into mysql in php
hi,
I have the video files which i have to upload into mysql db. along with creating thumbnails f

Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.

Fetching META TAGS through
Hello everybody
I want to fetch meta tags of a domain.
It will be done from following code of

Refining of search Criteria
Dear Friends

I need a help, I have a search page which of cars related, which has different s

Preventing SQL Injection
I have a question about SQL Injection, In some of our code we use this: view plaincopy to clipboa

Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

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