setting Check box

From: Date: Tue, 27 Mar 2001 04:25:57 +0000
Subject: setting Check box
Groups: php.general 
Request: Send a blank email to php-general+get-45689@lists.php.net to get a copy of this message
Hiya can some one pls let me know if i am on the right track pls, this is in a form that updates if there is an id else it inserts, now what i want it if there is an id i want the check box to be either checked or unchecked depending on the 'y' / 'n' value in the db <input type="checkbox" name="avail" value="" <? if ($avail == 'n') { echo 'SELECTED '; }?>"> Peter Houchin peterh@sunrentals.com.au ========================================================= _____ __ /\ /_/_/_\ / |_/ \ /_/_/_ __ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/ v ________ ________________________________________ /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ ______ __ __ /_/ ____ __ ______ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/ ========================================================= Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 ************* We rent the dot in .COM! **************

« previous php.general (#45689) next »