PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
TheShniz
Regular
Regular


Joined: Jan 27, 2004
Posts: 65

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

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: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
TheShniz
Regular
Regular


Joined: Jan 27, 2004
Posts: 65

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

Definately an oversight, thanx as always!

> TheShniz
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum