Help deleting a user on a php calendar<

liunx

Guest
I am using an event calendar that lets you add and delete users. The delete user function pops up a confirmation box, asking if you want to delete that user. If you click yes, then you get 'page can not be displayed'. I have found through tinkering with the code, that if you change the number 4, in the bit of script below, to a 5 then it will delete the user. But...you have to then change that number to a 6 to delete the next user, and so on and so forth. Is there a variable that can be put there to keep from having to go in and change the code each and every time you want to delete a user? I'm a true newbie so my knowledge is very limited and I have run out of ideas.

Here is the code that I am referring to:

echo " <td><span class=\"user_table_txt\"><a href=http://www.htmlforums.com/archive/index.php/\"useradmin.php?flag=delete&id=4\" onClick=\"deleteConfirm('" . $row[1] . "', '" . $row[0] . "');\">" . $lang['delete'] . "</a></span></td>\n";


Any help that you can offer would be greatly appreciated.

Mopar :cool:you would ahve to make the 'id' a variable. so from this line what do you get


echo " <td><span class=\"user_table_txt\"><a href=http://www.htmlforums.com/archive/index.php/\"useradmin.php?flag=delete&id=$row[0]\" onClick=\"deleteConfirm('" . $row[1] . "', '" . $row[0] . "');\">" . $lang['delete'] . "</a></span></td>\n";It worked like a charm! I am very greatful for your help.

Thank you! Thank you! Thank you!

Mopar :cool:
 
Back
Top