On Thu, Jun 23, 2011 at 14:18, Chris Stinemetz <[email protected]> wrote:
> So far I am good on creating the form and  submitting it to mysql
> database and calling the submitting value from a different script.
>
> My question is: How can I make it so when a user selects radio option
> value "1" it will then be displayed as 0-250kbps when I call it the
> value in the bottom script?
Use an if or a switch. For example:
<?php
// Using if/elseif/else
if ($row['tp_test'] == '1') {
echo '0-250Kbps';
} elseif ($row['tp_test'] == '2') {
echo 'The second value.';
} elseif ($row['tp_test'] == '3') {
echo 'The third value.';
} else {
echo 'I have no clue. I give up.';
}
// Using switch
switch ($row['tp_test']) {
case '1':
echo 'First case.';
break;
case '2':
echo 'Second case.';
break;
case '3':
echo 'Third case.';
break;
default:
echo 'No idea whatsoever.';
break;
}
?>
--
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php