SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $GET_ function goes from Mammals to animals_

    I thought I was having trouble with my mod-rewrite script, but now it looks like $_GET may be the problem. I have the following at the top of the page:

    PHP Code:
    $MyName = ($_GET['ref']);

    echo 
    $MyName
    When I type in MySite/Reference/Mammals, it correctly echoes "Mammals". But when I type in MySite/Reference/Animals, it echoes "animals/" (lower case A + slash) and the URL defaults to http://geosymbols/Reference/Animals/?ref=animals

    Obviously, my new mysql_num_rows script won't work if $MyName = "Animals/?ref=animals...

    PHP Code:
    $result mysql_query("SELECT * FROM gs_sym_ref WHERE URL = '$MyName'"$link);
    $num_rows mysql_num_rows($result);

    // MYSQL_NUM_ROW #1
    if (mysql_num_rows($result) === || empty($MyName))

    Any idea what's going on?

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    oh sure we can find your problem with these little snipplets of code
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

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