Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete a row in a shopping cart

Status
Not open for further replies.

mancroft

Programmer
Joined
Oct 26, 2002
Messages
267
Location
GB
I have done a delete function in a file ShoppingBag.php thus:

Code:
	function RemoveItem($ITEMID)
	{

		global $dbServer, $dbUser, $dbPass, $dbName;

		// Get a connection to the database
		$cxn = @ConnectToDb($dbServer, $dbUser, $dbPass, $dbName) or die(mysql_error());
		
		mysql_query("delete from cart where cookieId = '" . GetCartId() . "' and ITEMID = $ITEMID") or die(mysql_error());

	}

What I would like to do is let the user click on an image file and then delete something like this:

Code:
<a href=&quot;Dunno what to put here&quot;><img src=&quot;Del.jpg&quot;></a>

Can someone please suggest what to put instead of &quot;Dunno what to put here&quot;.

Many thanks.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top