i can see very well where the dd is coming from, but you've not taken on board what i posted previously:
Think about how that script runs off the server - first time it's called $dd hasnt been set, so it wont be = to either 1 or 2, it will be blank. Then when you select one of them, you have to run the php again to see whether to do $dd==1 or $dd==2 : the php wont be run again until you send the value to it, so it will remain unset until you submit the form back to the php page.
PHP WILL NOT update any of its variables or values until they have been sent back to the server. You changing a value on the screen will have no effect on the variable that is stored on the server that is running your php script - how can it!!??
The easiest way to tell what selection is made is to make proper use of the form you're trying to use: send the variable using a post method to another page, and then use the variable then.
eg
<form method="POST" action="check_variable.php">
.... your select bits ....
<input type="submit" value="Send this selection">
</form>
Alternatively you can use javascript to send the value automatically when the selection is changed, but you cant get away from having to send the information back to the server (since that's where all the back end gubbins is happening), and to do that you'll need some sort of refresh. THEN you can test to see what the value of $dd is, and code around it accordingly.
echo "<form method=\"POST\" action=\"check_variable.php\">\n";
echo "<select size=\"1\" name=\"dd\">\n";
echo "<option value=0 selected>Select</option>\n";
echo "<option value=1>$".stripslashes($row["price1"])."</option>\n";
echo "<option value=2>$".stripslashes($row["price2"])."</option></select>\n";
echo "<input type=\"submit\" value=\"Send this selection\">\n";
echo "</form>\n";
and then test.php:
echo "<p>On the last form you selected $_POST['dd']</p>\n";
....here you can put if's, but's and whatever's...
It seems odd that you'rre trying to send the name and value and so on anyway. From your code these are already in a database - why risk people fiddling (believe me, they will) with data that's much safer to get to by leaving it on the server anyway?