i'm having some trouble using javasript in php code, I'm confused in using double quotes and single quotes.
echo '<a href="shop.php?buy=1" onclick="return confirm("Are you sure you want to delete?")">Delete</a>';
or how to do the above code in php ?.
Thanks
use this code
echo '<a href="shop.php?buy=1" onclick="return confirm(\'Are you sure you want to delete?\')">Delete</a>';
you have to escape the quotes.