Jump to content

Get Checkbox Data error


MGLP

Recommended Posts

In my form file I have 

[<input type=\"checkbox\" name=\"stove\" id=\"stove\" value=\"y\">]

I use [method=\"POST\"] on Submit.

In my next file I have [$stove=$_POST['stove'];]  which works fine if the box was checked

but if the box was not checked, I get error

 "Notice: Undefined index: stove in...."

How can I test if the checkbox has been checked?

Tks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...