Jump to content
MakeWebGames

Trouble with $_GET, isset or something else (?) in a form. I have no idea, this should be really simple.


Recommended Posts

Posted

I'm trying to do a form, and in that form, I've put in a little snippet to ensure that my users actually have written something in the fields. I've used these two codes,

if ($_GET['header'] == 0)

{

die( "You did not fill out all forms.");

}

and

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

{

print "You did not fill out all forms.";

}

Bu neither of them works! The first code activates no matter what I write in the header field, and the second one never does... I'm sincerely stuck, and would greately appriciate any help! What am I doing wrong? I'm betting it's something really stupid and easy.

Posted

You should post your actual form.

Looking at those 'snippets', they look okay.

Are you sure you're using "$_GET" as the form method?, or are you actually using "$_POST"?

Posted
You should post your actual form.

Looking at those 'snippets', they look okay.

Are you sure you're using "$_GET" as the form method?, or are you actually using "$_POST"?

No, it's get. But that code from jon182 fixed it, so thanks! Case closed, :P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...