PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I use the $newsid variable to get the ID of a news article from the database. It worked, I could delete an article by clicking a link, but I decided to add a confirm box to confirm that the user really wanted to delete it. Problem is that when I click OK on the confirm box the following location is parsed "http://localhost/testing/show.php?action=delete&id=", which as you see the id variable appears to be blank now. Is something wrong the way I do this? Something with the script?
and you need to make sure you are still pulling that variable from the database at this point on your page.
I notice the escaped quotes in your script. Are you echoing this from PHP? If you still can't figure it out, post your full script and I'll take a look. I'm pretty sure it is just a simple fix.
Yes, it worked for me. However I found a better way to do this with no js prompts. Used a switch and a confirmation message pops at the top. Easy and nice looking. Thanks.