shopping cart delete item
Moderator: General Moderators
Re: shopping cart delete item
no, it doesn't work
<a href="cancel.php?ref=<?= $product['ref']; ?>"><img src="photos/garbage.jpg"></a>
and that neither
<td align="center" > <img src="photos/garbage.jpg" width="23" height="40" border="0" usemap="#Map"> <map name="Map">
<area shape="rect" coords="2,0,34,47" href="cancel.php?ref=<?php print $product['ref'] ?>"></map>
<a href="cancel.php?ref=<?= $product['ref']; ?>"><img src="photos/garbage.jpg"></a>
and that neither
<td align="center" > <img src="photos/garbage.jpg" width="23" height="40" border="0" usemap="#Map"> <map name="Map">
<area shape="rect" coords="2,0,34,47" href="cancel.php?ref=<?php print $product['ref'] ?>"></map>
Re: shopping cart delete item
You previously stated that this works:
But this doesn't?
That doesn't make any sense. It's the exact same code.
Code: Select all
<a href="cancel.php?ref=<?php print $product['ref'] ?>">cancel</a>Code: Select all
<a href="cancel.php?ref=<?= $product['ref']; ?>"><img src="photos/garbage.jpg"></a>Re: shopping cart delete item
yes, it works correctly
<a href="cancel.php?ref=<?php print $product['ref'] ?>">cancel</a>
but not this
<a href="cancel.php?ref=<?= $product['ref']; ?>"><img src="photos/garbage.jpg"></a>
<a href="cancel.php?ref=<?php print $product['ref'] ?>">cancel</a>
but not this
<a href="cancel.php?ref=<?= $product['ref']; ?>"><img src="photos/garbage.jpg"></a>
Re: shopping cart delete item
That really doesn't make sense. It's literally the same code. Is it generating any errors? What's happening?
Re: shopping cart delete item
I have used another way, but it doesn't work too, do you have any idea in this way ?
<td><form action="cancel.php?ref" method="post">
<input type="hidden" name="ref" value="<?php print $product['ref'] ?>">
<input type="image" name="submit" value="photos/garbage.jpg"/>
</form>
</td>
<td><form action="cancel.php?ref" method="post">
<input type="hidden" name="ref" value="<?php print $product['ref'] ?>">
<input type="image" name="submit" value="photos/garbage.jpg"/>
</form>
</td>
Re: shopping cart delete item
If you're going to use a POST request, then the form action should be cancel.php and you'll need to change the code in cancel.php to look for $_POST['ref'] rather than $_GET['ref']
Re: shopping cart delete item
I understand the problem, for this script:
<img src="photos/garbage.jpg" width="23" height="40" border="0" usemap="#Map"> <map name="Map">
<area shape="rect" coords="2,0,34,47" href="cancel.php?ref=<?php print $product['ref'] ?>"></map>
if there is serveral items, every time cancel.php?ref=first item, which means <?php print $product['ref'] ?> always in the first item position.
but I d'ont understand why this script can cancel correctly each item, do you have any idea ?
<a href="cancel.php?ref=<?php print $product['ref'] ?>">cancel</a>
<img src="photos/garbage.jpg" width="23" height="40" border="0" usemap="#Map"> <map name="Map">
<area shape="rect" coords="2,0,34,47" href="cancel.php?ref=<?php print $product['ref'] ?>"></map>
if there is serveral items, every time cancel.php?ref=first item, which means <?php print $product['ref'] ?> always in the first item position.
but I d'ont understand why this script can cancel correctly each item, do you have any idea ?
<a href="cancel.php?ref=<?php print $product['ref'] ?>">cancel</a>
Re: shopping cart delete item
I have asked you if that code is being generated inside a loop, have asked to see the surrounding code, and I haven't received an answer to either. I don't know. I also don't know why you insist on using image maps.
Re: shopping cart delete item
I have solved the problem, the script:
<a href="cancel.php?ref=<?php print $product['ref'] ?>"> <img src="photos/garbage.jpg" width="23" height="40"></a>
thank you so much
<a href="cancel.php?ref=<?php print $product['ref'] ?>"> <img src="photos/garbage.jpg" width="23" height="40"></a>
thank you so much