Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
TheShniz
Regular
Regular



Joined: Jan 27, 2004
Posts: 65

PostPosted: Fri Jun 04, 2004 12:21 pm Reply with quote

Code:


<form>
<input type=\"checkbox\" name=\"chkwhatever\" value=\"Yes\" border=0>
<input type=\"submit\" name=\"submit\" value=\"Submit\">
</form>

if ($submit) {
if $_POST["chkwhatever"] == 'Yes' {$record->whatever = 1 }
if $_POST["chkwhatever"] != 'Yes' {$record->whatever = 0 }
}


I'm getting an expecting parse error on the If statement 4 posting the checkbox... obviously I'm not doing it the right way. Can some1 help me out?

P.S.
I am a bit of a n00b 2 PHP

Thanx!
> TheShniz
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Jun 04, 2004 1:05 pm Reply with quote

Code:
if ($submit) { 

    if ($_POST["chkwhatever"] == 'Yes') {$record->whatever = 1; }
    if ($_POST["chkwhatever"] != 'Yes') {$record->whatever = 0; }
}


Missing 2 () and 2 ;
 
View user's profile Send private message
TheShniz







PostPosted: Fri Jun 04, 2004 2:14 pm Reply with quote

Definately an oversight, thanx as always!

> TheShniz
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©