Re: Help Needed Please

From: Date: Wed, 04 Apr 2001 02:21:29 +0000
Subject: Re: Help Needed Please
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46948@lists.php.net to get a copy of this message
On Wed, 4 Apr 2001 11:23, Peter Houchin wrote: > > > > <snip> > > $rs = "UPDATE main SET system='$system',"; > > $rs .= "part='$part',"; > > $rs .= "monthly='$monthly'"; > > $rs .= "WHERE id='$id'"; > > > > > > $result = mysql_query($rs,$db); > > ?> > > <form name="update" method="get" > > action="../../ben.php"> > > <? > > $foo = "SELECT * FROM main"; > > > > $result = mysql_query($foo); > > while ( ($myrow = mysql_fetch_array($result,$db) ) ) { > > > > $id = $myrow["id"]; > > $system = $myrow["system"]; > > $part = $myrow["part"]; > > $config = $myrow["monthly"]; > > > > ?> > > <!--form elements with echo on $myrow, and id hidden--> > > > This ^^^^ might be the place to start - what do you get when you view > the source?? > > > > <? > > } > > ?> > > <input type="submit" name="submit" value="submit"> > > <snip> > > > i get all id numbers for the records in the hidden id fields as well as > all data that was originally in the db ... > just a thought when i do a print $rs; i get this > > UPDATE main SET system='A33',part='cpu/mem',monthly='6000'WHERE > id='' > > which is that last record in the db .. so for some reason it's not > picking up any id numbers :< OK - how are you passing (or trying to pass) the value for id? When I do this, I usually show the ID for each record as a link, and pass the ID via the link. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#46948) next »