Page 1 of 1

submit and checked help

Posted: Wed Jun 17, 2009 5:49 am
by robaiken
hi im trying to make something that will do something generate a key when a check boxs is check and generate something else when its not checked

i tryed

Code: Select all

if( $_REQUEST['submit'] != '' ){
}
 
if( $_REQUEST['submit'] != '' && isset($_REQUEST['eval'] ) {
 
}
and the form looks like this

<input type="checkbox" name="eval" value="eval" />
<input type="submit" name="submit" value="Generate" />
this is the error
Parse error: syntax error, unexpected '{' in /web/administration/test.php on line 114

Re: submit and checked help

Posted: Wed Jun 17, 2009 6:15 am
by papa

Code: Select all

 if(!empty($_REQUEST['submit'])){
 }
 
 if(!empty($_REQUEST['submit']) && isset($_REQUEST['eval'])) {
  
 }
 
or
 
if( $_REQUEST['submit'] != '' ){
 }
 
 if( $_REQUEST['submit'] != '' && isset($_REQUEST['eval'] )) {
  
}

Re: submit and checked help

Posted: Wed Jun 17, 2009 7:06 am
by robaiken
thanks very much! :D