kenwvs Posted August 4, 2006 Share Posted August 4, 2006 I have checked everything I can think of and cannot figure out what would be stopping this query from loading to the database. The rest of the form is going to the DB, but this one won't work. Here is the code and the INCLUDE query.[code]<?php$result = mysql_query("SELECT * FROM employees") or die(mysql_error());echo "Technician Name: <select name='Tech'>";while($row=mysql_fetch_array($result)){ echo"<option value=\"{$row[Employee_ID]}\">{$row[First_Name]} {$row[Last_Name]}</option>";} echo"</select>";?></select>[/code]$Technician = $_POST["Tech"]; This is the insert query[code]mysql_query("INSERT INTO `work`(Work, Sched, Technician, Site, Serial, Hours, Starts, Issue,Severity, Resolution, Assistance, PartsA, PartsB, PartsC, PartsD, PartsE, PartsF, PartsG, Safety)VALUES ('$Work', '$Sched', '$Technician', '$Site', '$Serial', '$Hours', '$Starts', '$Issue','$Severity', '$Resolution', '$Assistance','$PartsA', '$PartsB', '$PartsC', '$PartsD','$PartsE', '$PartsF', '$PartsG', '$Safety')")or die(mysql_error());[/code] Quote Link to comment Share on other sites More sharing options...
fenway Posted August 4, 2006 Share Posted August 4, 2006 I will say it again, just as in the other thread -- post the interpolated INSERT statement, and you'll see what the problem is. Quote Link to comment Share on other sites More sharing options...
kenwvs Posted August 4, 2006 Author Share Posted August 4, 2006 I don't understand what you are saying. As I have said, I am a newbie, and don't understand what you are suggesting I do. Quote Link to comment Share on other sites More sharing options...
kenwvs Posted August 4, 2006 Author Share Posted August 4, 2006 I have figured out what was causing the problem and have it resolved. It was a name not being the correct name to go to the DB. I missed this in the drop box. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 4, 2006 Share Posted August 4, 2006 Glad you got it working... all I meant was to echo the "final" query string. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.