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 4557766
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:33:17+00:00 2026-05-21T17:33:17+00:00

I have made database that contains some information. Want to do is to retrieve

  • 0

I have made database that contains some information. Want to do is to retrieve and display data that fits with parameters like:

if i select green from dropdown list, it will display only information about cars that are green. Also “kõik” means like all.

Here is form that im using.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body align="center" style="margin-top:200px;">
<table border="1" align="center">
  <tr>
    <td>   
<form  action="retrieve.php" method="get">
Rass:
<select name="rass"> 
<option value="ebony">Ebony</option> 
<option value="Valge">Valge</option> 
<option value="Aasia">Aasia</option> 
</select> <br />
<input type="submit" value="lisa" />
</form>    
    </td>
  </tr>
</table>
</body>
</html>

Here is php that used to show all data.

<?php

$connect = @mysql_connect ("localhost", "root", "") or die("Fail!!!! :D:D:D");
mysql_select_db("tibid") or die("selline andmebaas puudub");

$query = mysql_query("select * from test"); 
$num_rows = mysql_num_rows($query);

if($num_rows > 0){
{while($row = mysql_fetch_assoc($query))

    echo 
    $row['rinnad']. "<br>"
    .$row['juuksed']."<br>"
    .$row['silmad']."<br>"
    .$row['rass']."<br>
    <hr>
    ";}
}else{ 
echo "Andmebaas on tühi";

}

?>

Link to this kind tutorial would be helpful.
Thank you

  • 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-05-21T17:33:17+00:00Added an answer on May 21, 2026 at 5:33 pm

    I think you are looking for WHERE. So your query would be:

    select * from cars where color = '$color'
    

    where $color is escaped $_POST['color'] passed from your form.

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

Sidebar

Related Questions

I have a database that contains data in different languages. Some languages use accents
I am having a problem where I have made a database that contains 7
I have a pre-made SQLite database that I am downloading from the net via
I have an application that is made up of the following: A central database
I have made an SQL query that picks out web statistics from a database.
I have made a dump of my database in which one table is pretty
I have made this code to open a database(created in SQLite browser) stored in
I have made a registration program. Making use of mysql database. Can I still
i have a windows application made in VB.NET which maintains a database, and i
I have an Access database that has two tables that are related by PK/FK.

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.