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

i want run some web server under the ip sharer
hello i want run some web server under the ip sharer
my ip is floating ip but it doesnt matter

Escape Latin Characters
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thoug

Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make

If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.

i have this c

mysql select query problem
how can i select multiple fields from multiple table in one query like

i have table name t1 a

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

help with email script...
hey

I need help with my mail script

when the form on http://www.mcgdesignstudio.com/c

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,

Can I call a class inside a function?
I have a class written in another file that handles my image resizing.

Can I do this (php say

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