Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8990405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:29:37+00:00 2026-06-15T22:29:37+00:00

When a user clicks an item on my items page, it takes them to

  • 0

When a user clicks an item on my items page, it takes them to blank page template using $_GET to pass the item brand and model through.

I’d like to perform another MYSQL query when that user clicks through to populate the blank page with the product details from my database. I’d like to retrieve the single row using the model number (unique ID) to populate the page with the information. I’ve tried a couple of things but am having a little difficulty.

On my blank item page, I have

                $brand = $_GET['Brand'];
                $modelnumber = $_GET['ModelNumber'];

                $query = mysql_query("SELECT * FROM items WHERE `Model Number` = '$modelnumber'");
                $results = mysql_fetch_row($query);

                echo $results;

I think having ”s around Model Number is causing troubles, but without them, I get a Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given error.

My database columns looks like

Brand | Model Number | Price | Description | Image

A few other things I have tried include

$query = mysql_query("SELECT * FROM item WHERE Model Number = $_GET['ModelNumber']");

Which gave me a syntax error. I’ve also tried concatenating the $_GET which gives me a mysql_fetch_row() expects parameter 1 to be resource, boolean given error

Which leads me to believe that I’m also going about displaying the results incorrectly. I’m not sure if I need to put it in a where loop like I have with my previous page which displays all items in the database because this is just displaying one.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:29:38+00:00Added an answer on June 15, 2026 at 10:29 pm

    It seems that your “result” is pulling in too much information for a single variable.
    Also, I don’t think your table should have column names with spaces, I would suggest filling them all with dashes or underscores.

    Here’s my suggestion:

    $qry = mysql_query("SELECT * FROM items WHERE Model_Number = '$modelnumber'"); //REMEMBER TO MAKE THE CHANGE "Model Number" -> "Model_Number"
    while($row = mysql_fetch_array($qry)){
        $brand = $row['Brand'];
        $modelnumber = $row['Model_Number'];
        $price = $row['Price'];
        $description = $row['Description'];
        $image = $row['Image'];
    }
    

    This will populate all of these variables with whatever you have in your tables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have managed to setup a page so that a user clicks an item
Inside my Controller i have function that runs after user clicks on item, which
When a user clicks once on an item in a Grid or a ListBox,
I'm trying to call different activities depending on the item the user clicks on
When user clicks hyperlink on my ASP.NET page, I want a new browser to
If a user clicks the blank row at the bottom of a DataGridView and
I have a page that contains a user control, when the user clicks an
I have a login page, from login page if the user clicks, it will
I want to change the background of a listview item when the user clicks
I need to show a list of auction items. When a user clicks on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.