Than you very much for all help! I see that my database design is a little dumb, so I'll just make another one.
Best regards Raymond "Raymond Lilleodegard" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all! > > I have this form with some choices: > > <form> > Enter how many cars you want:<input type="text" name="number" > > <select size="1" name="car"> > <option selected>ford</option> > <option>bmw</option> > <option>mercedes</option> > </select> > > And then I am trying to get the price out of a table in my database with > this code: > > > $sql = mysql_query("SELECT '$car' FROM varetabell where carid='$carid' "); > $myrow= mysql_fetch_array($sql); > $x = $myrow["$car"]; > > $price = $x * $number; > > > Shouldn't this work? Or am I missing something here? > > > > Best regards Raymond > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]