Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-26-2004, 04:17 PM   PM User | #1
grudz
Regular Coder

 
Join Date: Jan 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
grudz is an unknown quantity at this point
simple, quick question......

PHP Code:
 <?php $value $_GET['value'];
switch(
$value) {
    case 
t2:
        echo 
$row_Recordset1['name'];
        break;
    case 
t3:
        echo 
"t3";
        break;
}
?>
here is my code before the <head> on my web page....now whats the correct code to call it in my <body>

because i thought it was this
PHP Code:
<?php echo $value ?>
but that is going to give me the actual value, not the 'name' from the recordset?

thank you in advance....
grudz is offline   Reply With Quote
Old 01-26-2004, 04:19 PM   PM User | #2
coffeedemon
New Coder

 
Join Date: Oct 2003
Location: AZ
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
coffeedemon is an unknown quantity at this point
<?php

$value = $_GET['value'];

switch($value) {

case t2:

$newValue= $row_Recordset1['name'];

break;

case t3:

$newValue = "t3";

break;

}

?>

<?= $newValue ?>
__________________
PHP | FreeBSD | MySQL |
Check documentation... check documentation again and actually read it..do it... doesn't work ask.
coffeedemon is offline   Reply With Quote
Old 01-26-2004, 04:28 PM   PM User | #3
grudz
Regular Coder

 
Join Date: Jan 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
grudz is an unknown quantity at this point
thanx works perfect....
grudz is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:59 AM.


Advertisement
Log in to turn off these ads.