Tyler, You probably need one or two of the following: 1. Put single-quotes around case in your SQL (where type like 'case') 2. Use wild-cards in your where statement (where type like '%case%') Good luck! --Dave On Wed, 2002-11-06 at 23:31, Tyler Whitesides wrote: > Hi, > Sorry if this is ametuer, but I have been staring at this code for so long, trying to find out why my selection fields are gathering values, and I cant find the problem. > Thanks, > Tyler > -------------- > <? > include './include/vars.php'; > include './include/dbconnect.php'; > ?> > <html> > <head> > <title><?= $title ?></title> > <script languauge="javascript"> > function totalCost() > { > var form = document.system; > var casing = form.casing.value; > var processor = form.processor.value; > var ram = form.ram.value; > var hdd = form.hdd.value; > var video = form.video.value; > var sound = form.sound.value; > var nic = form.nic.value; > var monitor = form.monitor.value; > var speakers = form.speakers.value; > var interfaces = form.interfaces.value; > var total = casing + processor + ram + hdd + video + sound + nic + monitor + speakers + interfaces; > form.price.value = total; > } > </script> > </head> > <body bgcolor="#CBD5DA" link="#405266" vlink="#3F593E" alink="#3F593E"> > <div align="center"> > <center> > <table border="0" cellspacing="0" cellpadding="0" width="780"> > <tr> > <td width="15" height="15"><img border="0" src="images/corner_tl.gif" width="15" height="15"></td> > <td bgcolor="#FFFFFF" height="15"><img border="0" src="images/clear.gif" width="1" height="1"></td> > <td width="15" height="15"><img border="0" src="images/corner_tr.gif" width="15" height="15"></td> > </tr> > <tr> > <td bgcolor="#FFFFFF" width="15"><img border="0" src="images/clear.gif" width="1" height="1"></td> > <td bgcolor="#FFFFFF"> > <table border="0" width="100%" cellpadding="0" cellspacing="0"> > </tr> > <tr> > <td valign="top" rowspan="3" bgcolor="#C0C0C0"><img border="0" src="images/clear.gif" width="10" height="1"> > </td> > <td valign="top"><img border="0" src="./images/main.png" hspace="2" alt="Computer Service"> > </td> > <td valign="top" align="right"> > <table name="login" border=0 cellpadding=0 cellspacing=0> > <tr> > <td bgcolor="#cococo"> > <center><b>Services</b></center> > </td></tr> > <tr><td> > <center> > <? include './include/links.php'; ?> > </center> > </td></tr> > </table> > <br> > > </td> > </tr> > <tr> > <td valign="bottom" colspan=2> > <!-------------------Main Body----------------------------> > <h2><center>Build Your Custom System</center></h2> > <form name="system" action="customSystems.php" method="post"> > <? $parts = mysql_query("select part,price from parts where type like case;"); ?> > <ul> > Case: > <select name="casing"> > <? > while($item = mysql_fetch_array($parts)) > { > echo "<option name='$item[part]' value=$item[price]>$item[part]</option>"; > } > ?> > </select> > > </ul> > <div align="right">Total Cost Of Parts: <input type="text" name="price" size="6"></div> > </form> > <!-----------------End Main Body--------------------------> > </td> > </tr> > <tr> > <td valign="top" colspan="2"> > <!---------------------Empty Cell---------------------------> > <table border="0" cellpadding="5" cellspacing="7"> > <tr> > <td> > > </td> > <td> > > </td> > > <td valign="top"> > > </td> > </tr> > </table> > > </td> > </tr> > <tr> > <td valign="top" bgcolor="#C0C0C0"> > </td> > <td valign="top" bgcolor="#C0C0C0" colspan="2"> > > </td> > </tr> > </table> > </td> > <td bgcolor="#c0c0c0"></td> > </tr> > <tr> > <td valign="top" align="right" width="15" height="15"><img border="0" src="images/corner_bl.gif" width="15" height="15"></td> > <td bgcolor="#FFFFFF" height="15"></td> > <td valign="top" align="left" width="15" height="15"><img border="0" src="images/corner_br.gif" width="15" height="15"></td> > </tr> > </table> > </div> > > </body> > > </html> > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php