Welcome Guest, Not a member yet? Register   Sign In
checkbox
#1

[eluser]black.Blank[/eluser]
is there any other way on how i can rewrite the following sample code?
Code:
if(in_array('sample1',$sample)
  $samp = 1;
  else if(!in_array('sample1',$sample)
  $samp = 0;

if(in_array('sample2',$sample)
  $samp2 = 1;
  else if(!in_array('sample2',$sample)
  $samp2 = 0;

if the checkbox is ticked, then the value for the corresponding field in the dbase will be 1 else 0.

thanks Smile


Messages In This Thread
checkbox - by El Forum - 01-05-2011, 03:29 AM
checkbox - by El Forum - 01-05-2011, 04:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB