How to determine and show content?

Discussion in 'PHP' started by misohoni, Jun 13, 2014.

  1. #1
    I've got this string:
    /comp.php?section=view&drawing=68&title=1234
    How do I show the title output in php? So that it shows up in:
    $title .= $model_name;
    - the title field is called comments in a table...
    A previous one that worked was:
    } elseif ($_GET["blogID"] != "") { $query = "SELECT * FROM blog_sets WHERE setslug = '".mysql_real_escape_string($_GET["blogID"])."'"; $result = doQuery($query); $row = mysql_fetch_array($result); $model_name = $row["title_meta"]; $title .= $model_name;
     
    }
    Code (markup):

     
    misohoni, Jun 13, 2014 IP
  2. Nei

    Nei Well-Known Member

    Messages:
    106
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    170
    #2
    Is the task to change source-field id a database from "title meta" to "comments"?
    Then the code will be next:
    } elseif ($_GET["blogID"] != "") {
        $query = "SELECT * FROM blog_sets WHERE setslug = '".mysql_real_escape_string($_GET["blogID"])."'";
        $result = doQuery($query);
        $row = mysql_fetch_array($result);
        $model_name = $row["comments"];
        $title .= $model_name;
    }
    Code (markup):
     
    Nei, Jun 14, 2014 IP
  3. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #3
    Thanks, I think the code I gave isn't relevant. I just wanted to work out how to code if I've got the terms:
    section=XX&drawing=XX&title=XX ?

    Thanks
     
    misohoni, Jun 14, 2014 IP