Click to See Complete Forum and Search --> : urgent


zuzupus
09-04-2003, 08:53 AM
hi,

i created a table

CREATE TABLE emp_details (
id int(10) NOT NULL auto_increment,
projektnr varchar(100) NOT NULL default '',
hvorgang varchar(100) NOT NULL default '',
uvorgang varchar(100) NOT NULL default '',
soll varchar(100) NOT NULL default '',
status varchar(100) NOT NULL default '',
PRIMARY KEY (id)
) TYPE=MyISAM

now the problem is im trying to insert the values for hvorgang and uvorgang for particular id thru application for that i created a text field and submit button im using php4.0.6



$nr +=0;
if (isset($HTTP_POST_VARS['add'])){
mysql_query("INSERT into emp_details SET hvorgang = '".$HTTP_POST_VARS['newhvorgang']."' WHERE id = $nr");
mysql_query("INSERT into emp_details SET uvorgang = '".$HTTP_POST_VARS['newuvorgang']."' WHERE id = $nr");
}



but im not able to get iserted teh value in database anybody help me out be appreciable
thanks in advance

kitkat2002uk
09-04-2003, 09:34 AM
it seems there is no database connection string in the query

zuzupus
09-04-2003, 09:40 AM
sorry i ddint get u as in insert clause we cant use SET

anyway thanks alot but plz have a look at the below link

http://server2.vitodesign.com/scripts/drop.phtml

then how i can insert the values in drop down thru application for both fields at same time if not clear shall i post my code so that it will be more clear