Well that bit of code that i posted before should solve your problem of displaying which brand is to be displayed first(the user selected 1) but were not upto that point yet.
Have you ran the query in your mysql database just to check that it brings back results? just as a raw query and putting in a brand "brand A"?
Does the page you display something or is it just that you get a nice informative blank page?
One think i have noticed is that when your doing the query and i dont know whether this will make a difference is that you do:
Code:
$produpdarray = mysql_query("SELECT productid, brandid, username, productname, productnumber, producttype, gender, currency, price, recpriceretail, prodpic, mancountry, productdescription FROM products WHERE productid = ".$produpd." ");
Whereas in my experience it should be
Code:
$produpdarray = mysql_query("SELECT productid, brandid, username, productname, productnumber, producttype, gender, currency, price, recpriceretail, prodpic, mancountry, productdescription FROM products WHERE productid = "$produpd");
basically its just removing the concat parts at the end where you reference the variable with the brand in it.
Try it, see what you get in mysql, see if you get some results and if you dont then you know thats its the mysql syntax, if it does bring back results then take out the concat part(use my suggested query)
Also just as a note, you wont get Brand C appear twice(at the top and some where else in the option list), not unless you do 2 queries and stick on the end, but its not necessary anyway.
Hope this helps you to figure something out to an extent, let us know what happens so we can help if its not sorted
Bookmarks