submit and checked help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
robaiken
Forum Newbie
Posts: 4
Joined: Wed Jun 17, 2009 5:44 am

submit and checked help

Post 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
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: submit and checked help

Post 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'] )) {
  
}
robaiken
Forum Newbie
Posts: 4
Joined: Wed Jun 17, 2009 5:44 am

Re: submit and checked help

Post by robaiken »

thanks very much! :D
Post Reply