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] Link to comment https://forums.phpfreaks.com/topic/16510-i-cant-see-what-is-stopping-this-query-from-going-to-the-db/ 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. Link to comment https://forums.phpfreaks.com/topic/16510-i-cant-see-what-is-stopping-this-query-from-going-to-the-db/#findComment-68984 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. Link to comment https://forums.phpfreaks.com/topic/16510-i-cant-see-what-is-stopping-this-query-from-going-to-the-db/#findComment-68985 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. Link to comment https://forums.phpfreaks.com/topic/16510-i-cant-see-what-is-stopping-this-query-from-going-to-the-db/#findComment-69022 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. Link to comment https://forums.phpfreaks.com/topic/16510-i-cant-see-what-is-stopping-this-query-from-going-to-the-db/#findComment-69203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.