Thanks for helping me out Stoned Gecko. I set it up like this but I get this error.
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE product_id = ']' at line 1 1
I'm looking through the manual now, but have not found the answer yet.
<?php
$product_array = array(
1 => "as",
2 => "ep",
3 => "es",
4 => "lc",
5 => "pen",
6 => "sb",
7 => "ssa",
8 => "ssamw",
9 => "ssb",
10 => "ssc",
//Some code here that gets the $product_id
$query = "SELECT * FROM products WHERE id = " . $_GET['id'] . ";";
//Then make the query
$query = "SELECT * FROM " . $product_array[$product_id] . " WHERE product_id = '$product_id]";
$result = mysql_query($query) or die(mysql_error());
?>