Hi All
I'm having trouble putting a Delete Button into a table, to allow a given row to be deleted:
Echo"<td><a href=' . $_SERVER['PHP_SELF'] . '?deletecontact=' . $cid . '>' . 'Delete </a></td>";
is the code i'm using, but this causes an error - It worked ok before I put it into a table cell, but then previously it had some " marks within the code, which i've now had to remove because of using the echo function.
Any pointers as to why this won't work would be greatly appreciated (i'd rather know the reason why this doesn't work than just have someone solve it for me).
Trouble outputting delete function in table
Moderator: General Moderators
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: Trouble outputting delete function in table
You're not closing and reopening your quotes correctly.
Here's how I'd write it:
Here's how I'd write it:
Code: Select all
echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?deletecontact=' . $cid . '">Delete</a></td>';Re: Trouble outputting delete function in table
Thanks, WebbieDave - that works now 