Welcome! Log In Create A New Profile

Advanced

Confirm deletion of data row

Posted by Mariuspienaar 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Confirm deletion of data row
February 06, 2013 07:47PM
Hi there

On the portfolio where you delete a player,it must ask to confirm to delete the player on the delete.php page AND give some details of the player,so javascript wont work there because PHP first get executed on the server before javascript,so my player gets deleted when my page loads.
if i put an if function like "if($_POST['submit']) (where submit is my delete button's name) to run the delete code only when the button 'post', then nothing happens.its like the code cannot execute the sql query inside an if function.
Someone knows how to run the query inside an if function?
avatar
Mac
Re: Confirm deletion of data row
February 07, 2013 08:20AM
You can just add another if statement. The confirmation question is passed back to the same page with the relevant information .

Language: PHP
if submit... confirmation question if confirmation question response....delete
Sorry, only registered users may post in this forum.

Click here to login