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

Recommended Answers

All 5 Replies

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.

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

try yourself first , if you have any error, post them here somebady may help you?

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...

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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.