After testing your solution, it got me to a point which showed that the problem is in a different part of my script. I added "+log" to the popup and it displayed Admin. So the issue was somewhere else... Thank you
Originally Posted by m2244
Have you tried to simply get the echo to work?
<a onclick=<?php echo $log; ?>>
and then step forward from there until it doesn't work. Good luck.
Thanks for the suggestions, I have checked the echo and moved through the steps to see if I could figure it out. But all I could do was narrow down where the issue was... I think.
Originally Posted by sunfighter
When passing variables into a function, they must be a string or in quotes. This looks like a string. but it's not. You are missing a close tag also.
The line S/B:
<a onclick="Delete_All(<?php echo "'".$log."'"; ?>)">Click here to delete stuff</a>
In another part that is just "Delete", I also have <?php echo $row['id']; ?>
which works fine. It is actually an integer but it is passed the same way, so that might mean your solution isn't correct here? I'm not sure, but adding the quotes like you said doesn't work for me. Although, now the script actually runs and creates a popup, but the $log doesn't get sent. So when redirecting it goes to the incorrect page.