0

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?

3 Answers 3

2

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))
Sign up to request clarification or add additional context in comments.

5 Comments

@Husain can you show the full code as you are using it right now?
sure, in this file: alsbtain.net/sb3/upload/6684-1-567561314.zip the problem now is: Notice: Undefined index: step in /***/script/install.php on line 3 but it's in the same lines
@Husain you didn't do what I recommended.
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 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?
0

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

Comments

0

I was experiencing the same error "undefined variable $_GET" ... Then I re-install XAMPP, now in the C drive and problem was solved.

I don't know if there was an issue with my previous installation per se, or maybe something XAMPP does not like about logical drives.

Just wanted to share. Good luck!!

1 Comment

OP didn't mention XAMPP and may not be using it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.