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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to