$_GET is not receiving the value I'm sending

Greetings;
I have a problem with my PHP code, I sent a value through the link to another PHP page, when I open the PHP page it shows in the URL the value sent but apparently my variable is not receiving it and I’m not sure why.
Here is the code on the first page:

    $qry1 = 'SELECT * FROM seller WHERE category_id='.$_GET['categoryId'].';';
    $result1 = mysql_query($qry);
    $row1 = mysql_fetch_array($result1);
    Print '<td style="width:15%"><a href = "Seller_page.php?sellerId ='.$row1['id'].'">';
    Print '<img src = "Seller_Image_table.png" height = "50" width = "50"></a></td>';

Here is the code to the page that is supposed to receive the value:

$id = isset($_GET['sellerId']) ? $_GET['sellerId'] : '';

Thanks in advance.

hi @boshokai, what is the URL that you are using? Also I highly recommend reading this article on using PDO to secure your queries

Space in the URL after the variable name is defined and before the = sign. I can’t remember if that would upset it.

That was the problem! Thank you so much!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.