☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> How To Validate In Php
Add Reply
New Topic
New Poll
Views: 225
Replies: 4
Track Topic
swtscp
Member
Posts: 3,965
Joined: Jul 10 2011
Gold
:
5,200.00
#1
Nov 10 2015 09:45pm
how do you validate if a radio button is selected if the value is 0?
carteblanche
Member
Posts: 32,925
Joined: Jul 23 2006
Gold
:
3,804.50
#2
Nov 10 2015 09:50pm
if(!isset($_POST['mycheckbox']))
swtscp
Member
Posts: 3,965
Joined: Jul 10 2011
Gold
:
5,200.00
#3
Nov 10 2015 09:50pm
yeah i thought the same thing but it doesnt work
because isset doesnt considerate it since the value is 0
This post was edited by swtscp on Nov 10 2015 09:51pm
carteblanche
Member
Posts: 32,925
Joined: Jul 23 2006
Gold
:
3,804.50
#4
Nov 10 2015 09:53pm
Quote (swtscp @ Nov 10 2015 10:50pm)
yeah i thought the same thing but it doesnt work
because isset doesnt considerate it since the value is 0
you sure?
https://www.virendrachandak.com/techtalk/php-isset-vs-empty-vs-is_null/
swtscp
Member
Posts: 3,965
Joined: Jul 10 2011
Gold
:
5,200.00
#5
Nov 10 2015 09:57pm
omg thx is_null() might work love you
Go Back To
Programming & Development
Topic List
Add Reply
New Topic
New Poll
© 2003-2026 d2jsp
Contact