473,408 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Checking Get variable exists

Hello,
How do I check to see if a GET varaible exists?
This is giving me an error message.

if (isset !($_GET['id']))
{die('You must Have a Key to get in');
}

Thanks

Sep 17 '07 #1
3 20721
On Sep 17, 12:08 pm, Mike <ampel...@gmail.comwrote:
Hello,
How do I check to see if a GET varaible exists?
This is giving me an error message.

if (isset !($_GET['id']))
{die('You must Have a Key to get in');

}

Thanks
How about:

if(!isset($_GET['id']))

Sep 17 '07 #2

"Mike" <am******@gmail.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
Hello,
How do I check to see if a GET varaible exists?
This is giving me an error message.

if (isset !($_GET['id']))
{die('You must Have a Key to get in');
}
well, is the error "you must have a key to get in"?

just tac this onto the end your the url:

?id=qwerty

you shouldn't get that error at that point. do you understand the difference
between $_GET, $_POST, $_REQUEST?
Sep 17 '07 #3

"ZeldorBlat" <ze********@gmail.comwrote in message
news:11**********************@n39g2000hsh.googlegr oups.com...
if(!isset($_GET['id']))

lol...i didn't even see that. chuckle.
Sep 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tesla | last post by:
Hey guys, I want to PHP to do stuff only if a sertain form variable exists. How do i check to see if a variable exists or not? Something like If $http_post_vars exists, then do this. syntax...
9
by: Bart Nessux | last post by:
Are these equivelent? Is one approach prefered over the other #check to see if var contains something... if so proceed. if var is not None: continue #check to see if var is empty... if so...
2
by: Bryan Rasmussen | last post by:
Hi I have a little program that is importing from os.path import exists, join, isdir, normpath, isfile at one point in my program I check if a file exists using if exists("c:\projects"): and...
1
by: wg | last post by:
Hey, Can someone show my how to change the code below to check to see if a variable exists rather than if the variable contains an empty string. if (document.form.regionselection.value...
15
by: Geiregat Jonas | last post by:
is using if(open("file",O_EXCL) != -1){ printf("File does exists")}else{printf("file does not exists"); } a good way of checking if a file exists or not, if not how should I do it ?
99
by: Mikhail Teterin | last post by:
Hello! Consider the following simple accessor function: typedef struct { int i; char name; } MY_TYPE; const char *
5
by: RSH | last post by:
I am using code to create a new modal form from a parent form. It is not an MDI form. I need to know if an instance of the form already exists so when the user clicks on the button I can close...
4
by: chinu | last post by:
HI all, i am declaring an array in javascript var a = new array(); now before assigning a value to the ith element of this array, i have to check if some value has already been assigned there....
7
by: sprash | last post by:
Newbie question: I'm trying to determine if a file physically exists regardless of the permissions on it Using File.Exists() returns false if it physically exists but the process does not...
8
by: Brad Pears | last post by:
I want to check to see if a particular object exists using vb.net 2005. I have a class called clsContract. When the user clicks the 'New Contract' button, I want to check to see if a clsContract...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.