Jump to content

Archived

This topic is now archived and is closed to further replies.

kenwvs

I can't see what is stopping this query from going to the DB

Recommended Posts

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]

Share this post


Link to post
Share on other sites
I will say it again, just as in the other thread -- post the interpolated INSERT statement, and you'll see what the problem is.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Glad you got it working... all I meant was to echo the "final" query string.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.