0

Hello Guys,

Is this possible, if so what do i need to type into Google for further information or if someone can show me please.

I insert into the database under table Product1, Product2

Product1 -> Make -> Nokia | Model -> N95
Product2 -> Make -> SamSung | Model -> E3200

The above is what i know how to do.

But what i want to do next is, which is where i need help.

Product Type:[Drop Down]
Name:
Date:
Print

So when i fill the form as below.

Product Type: Product2
Name: Dani Web
Date:11/12/2009
Print

So when i click on print i want it to open another page which i can print and it says.

Name: Dani Web
Date:11/12/2009
Product Information:
Make: SamSung
Model: E3200

Thank you guys.
No_ID

Edited by NoID: n/a

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by NoID
0

Product Type:[Drop Down]
Name:
Date:
Print

Your post was kinda hard to understand as there was no direct question but if I am guessing the question right then I would say your product type drop down box can be created with a while loop looping through the results of all products. Then when the product is submitted another query is submitted where it searches for the information relating to the selected product using the mysql Where clause. I think that sums it up but if you can provide some code and a direct question instead of just statements then I may be able to provide some code for you.

0

Your post was kinda hard to understand as there was no direct question but if I am guessing the question right then I would say your product type drop down box can be created with a while loop looping through the results of all products. Then when the product is submitted another query is submitted where it searches for the information relating to the selected product using the mysql Where clause. I think that sums it up but if you can provide some code and a direct question instead of just statements then I may be able to provide some code for you.

Thank you for the reply.

thats makes sense, and sum it well, would you be able to give me some sort of code, that i can work with please.

Thank you

0

An example of searching through the list is as follows:

$result=mysql_query('SELECT * FROM `table_name_here`') or die(mysql_error());
while ($item=mysql_fetch_assoc($result)) {
    echo '<option value="'.$item['column_name_here'].'">';
    echo $item['column_name_here'].'</option>'."\n";
}

I would suggest searching through a few mysql tutorials...

0

An example of searching through the list is as follows:

$result=mysql_query('SELECT * FROM `table_name_here`') or die(mysql_error());
while ($item=mysql_fetch_assoc($result)) {
    echo '<option value="'.$item['column_name_here'].'">';
    echo $item['column_name_here'].'</option>'."\n";
}

I would suggest searching through a few mysql tutorials...

"echo '<option value="'.$item.'">';"

this is what i needed,


to rajabhaskar525 i would try if i know what to try??

But thank you guys for the help :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.