Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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....

  • #2
    New Coder
    Join Date
    Oct 2003
    Location
    AZ
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <?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.

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanx works perfect....


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •