views:

106

answers:

2

Hello

I have this problem in php:

Notice: Undefined variable: _Get in /.../script/install.php on line 3

and this is the code in line 3:

if($_Get['step']<1)

so what is the problem?

+1  A: 

Variable names are case sensitive in PHP.

if($_GET['step']<1)

also, to avoid notice level warnings, you may want to check for the existence of the variable first:

if ((array_key_exists($_GET, "step")) and ($_GET['step']<1))
Pekka
thanks, but the problem still exist
Husain
@Husain can you show the full code as you are using it right now?
Pekka
sure, in this file:http://www.alsbtain.net/sb3/upload/6684-1-567561314.zipthe problem now is:Notice: Undefined index: step in /***/script/install.php on line 3but it's in the same lines
Husain
@Husain you didn't do what I recommended.
Pekka
if you mean this:if ((array_key_exists($_GET, "step")) and ($_GET['step']<1))I did it before but then I deleted it again, but the other things they exist already.any way thank you very much, and I will add this syntax again.
Husain
@Husain the `notice` messages are not really error messages, but they appear when you try to access a variable that doesn't exist. Does it work now?
Pekka
yes it's work ..
Husain
A: 

Also make sure that in your url you have the parameter. EG: install.php?step=1

joe