Just from quickly looking you are trying to submit a form and grab the submitted value and stick it into the DB?
If so try using METHOD="POST" on your form, and using the variable $_POST["form_field"] in the insert statement Matt Babineau MCWD / CCFD ----------------------------------------- e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -----Original Message----- From: Mike Germain [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 2:25 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] help with $_Get in form I'm trying to get a partnum field into a select statement but i'm not getting anything passed into the varable. i'm sure it's a simple fix but i can't find it. thx mike <html> <head> Inventory Lookup <meta name="GENERATOR" content="W3e 2000"> <title></title> </head> <body> <?php $partnum=""; function get_partnum($partnum="") { ?> <FORM ACTION="default.php" METHOD="get"> PartNum:<INPUT TYPE="TEXT" NAME="partnum"> <INPUT TYPE="submit" VALUE="submit"> </FORM> <?php } $dsn="invfile"; $user= ""; $upasswd= ""; get_partnum(); #$partnum= $_get['partnum']; echo $partnum; $conn = odbc_connect($dsn,$user ,$upasswd, SQL_CUR_USE_ODBC ); echo "conn: $conn"; if ($conn <= 0) { echo "Error in connection<BR>"; exit; } else { echo "<P>Connection successful\n"; }; $query = "SELECT whs,loc,miprod,mndesc,onhand FROM npshrlib_prdinv1 where miprod = '$partnum' "; $result = odbc_exec($conn, $query); odbc_result_all($result); ?> </body> </html> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php