gobbles Posted February 12, 2007 Share Posted February 12, 2007 Hey All, Im just having a bit of a problem with a form. I have a checkbox with the following attributes <input type="checkbox" name="drivers_licence" value="YES"> in the other form i have $licence = $_POST["drivers_licence"]; Im just wondering why it would be giving me a error like the following Undefined index: drivers_licence Can anyone point out where im going wrong? Cheers Link to comment https://forums.phpfreaks.com/topic/38156-quick-checkbox-error/ Share on other sites More sharing options...
ToonMariner Posted February 12, 2007 Share Posted February 12, 2007 Some code and perhaps what method you are using on the form might help... Link to comment https://forums.phpfreaks.com/topic/38156-quick-checkbox-error/#findComment-182628 Share on other sites More sharing options...
JJohnsenDK Posted February 12, 2007 Share Posted February 12, 2007 plz post all your code... cant see what the error is from what you posted. Link to comment https://forums.phpfreaks.com/topic/38156-quick-checkbox-error/#findComment-182632 Share on other sites More sharing options...
Cagecrawler Posted February 12, 2007 Share Posted February 12, 2007 This bit: $licence = $_POST["drivers_licence"]; should be: $licence = $_POST['drivers_licence']; Use single quotes instead of double quotes. Link to comment https://forums.phpfreaks.com/topic/38156-quick-checkbox-error/#findComment-182636 Share on other sites More sharing options...
ToonMariner Posted February 12, 2007 Share Posted February 12, 2007 that shouldn't matter... just post the old html code and the php your run to process it and we will find the problem... Link to comment https://forums.phpfreaks.com/topic/38156-quick-checkbox-error/#findComment-182645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.