Current location: Hot Scripts Forums » Programming Languages » PHP » Trouble with SWITCH function in Radio Button group


Trouble with SWITCH function in Radio Button group

Reply
  #1 (permalink)  
Old 02-25-04, 08:13 AM
maverickblair maverickblair is offline
Newbie Coder
 
Join Date: Feb 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Trouble with SWITCH function in Radio Button group

I can't seem to get this SWITCH to check the radio button based on the current value box. This is being used in and UPDATE form

PHP Code:



Current value of listing: 
<input name="current_value" type="text" class="formelements" id="current_value" value="<? print "$new_used"?>" size="10">
Edit listing to be 
<?
// CHECKS TO SEE WHAT THE CURRENT VALUE IS AND POPULATES THE CORRECT RADIO BUTTON BELOW
$value 'current_value';
switch (
$value === '' $value) {
   case 
'new':
       echo 
$new true;
       break;
   case 
'used':
       echo 
$used true;
       break;
}
?>
<input name="new_used" type="radio" class="formelements" id="new" value="new">new or 
<input name="new_used" type="radio" class="formelements" id="used" value="used">pre-owned

thanks for anyones assitance here.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
accessing existing ISP email with a PHP webmail script. nlancaster PHP 1 01-07-04 03:28 AM
Help trim code down TheLaughingBandit JavaScript 0 09-02-03 09:50 AM
radio button selection TheLaughingBandit ASP 3 08-31-03 06:22 PM
File Management, sorry i keep changing, this is the last one! :) Arctic ASP 28 08-29-03 12:04 AM


All times are GMT -5. The time now is 09:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.