I think you need a WHERE clause for the UPDATE, otherwise it will update
ALL the records.

e.g.  WHERE OwnerName='$result'

Then perhaps a redirect to another page.


> I probably need to use if(isset($submit)): and an update statement, but my
> attempt just causes the web page to display completely blank. This is what
> I tried -
>
> if(isset($submit)):
>          $query1 = "update warranty set
> VesselName='$vessel',OwnerName='$owner',OwnerStreet='$address',OwnerCity='$city',OwnerState='$state',OwnerZip='$zip',OwnerCountry='$country',DateInstalled='$DateInstalled',DealerName='$Dealer',DealerStreet='$DealerAddress',DealerCity='$DealerCity',DealerState='$DealerState',DealerZip='$DealerZip',DealerCountry='$DealerCountry',Model='$Parts',SN='$PartsSN',VesselType='$vesseltype',VesselLength='$length',InstalledOn='$construction',VesselTypeOther='$vesseltypeother')
> ;
>          $result1 = mysql_query($query1);
>          mysql_query($query1);
> else:
>          $query = "select * from warranty WHERE OwnerName='$result'";
>         $results = mysql_query($query);
>          $row = mysql_fetch_array($results);
> ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to