RE: [PHP] How to delete a row from MySql

From: Date: Thu, 22 Mar 2001 10:31:24 +0000
Subject: RE: [PHP] How to delete a row from MySql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45086@lists.php.net to get a copy of this message
curious of Hither Green writes: > printf("<a > href=\"%s?id=%s&delete=yes\">(DELETE)</a></td></tr>", $PHP_SELF, $myrow["id"]); Is there a reason why you're not using interpolation? This looks simpler to me, and I thought that a lot of effort went into optimising PHP interpolation. echo "<A HREF='$PHP_SELF?id=$myrow[id]&delete=yes'>Delete $myrow[id]</A>"; cheers, Jeff -----Original Message----- From: Peter Houchin [mailto:peterh@vfsa.com.au] Sent: Thursday, March 22, 2001 4:38 AM To: YoBro; php-general@lists.php.net Subject: RE: [PHP] How to delete a row from MySql db connection here if ($delete){ $rs = "DELETE FROM users WHERE id=$id"; $result = mysql_query($rs); echo "<font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#003399\">Record Deleted <P> "; } $id = $myrow["id"]; printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a></td></tr>", $PHP_SELF, $myrow["id"]); -----Original Message----- From: YoBro [mailto:nospam@brochures.co.nz] Sent: Thursday, March 22, 2001 3:29 PM To: php-general@lists.php.net Subject: [PHP] How to delete a row from MySql Hello, Does anybody know how to make a text link delete items from a MySql Database. I have a PHP page that reads from the database and displays the results, but i want to include an option at then end of each row to delete that information. Alot like in phpMyAdmin. I have looked at that code, but can't figure it out. Any help on this would be really great. -- Regards, YoBro ------------------------------------------------------------- DO NOT REPLY TO THIS VIA EMAIL PLEASE USE THE NEWSGROUP All emails sent to this address are automatically deleted. This is to avoid SPAM! ------------------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#45086) next »