shanthi Posted May 31, 2010 Share Posted May 31, 2010 hi, I have written php code for deleting perticular row its working but i need to confirm before deleting Please assist.... Quote Link to comment Share on other sites More sharing options...
riwan Posted May 31, 2010 Share Posted May 31, 2010 I would think of javascript solution <input type="Submit" value="Delete" onclick="return confirm('are you sure ?');"/> Quote Link to comment Share on other sites More sharing options...
shanthi Posted May 31, 2010 Author Share Posted May 31, 2010 i am using an image not button and i need the complete java script code Quote Link to comment Share on other sites More sharing options...
riwan Posted May 31, 2010 Share Posted May 31, 2010 well, its because you don't give any of your source code. you could use sth like <a .... onclick="return confirm('are you sure ?');"><img .../></a> Quote Link to comment Share on other sites More sharing options...
shanthi Posted May 31, 2010 Author Share Posted May 31, 2010 I have done the same i got the error message syntax error, unexpected T_STRING, expecting ',' or ';' i am forwarding my code please assist [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
riwan Posted May 31, 2010 Share Posted May 31, 2010 This is why you should give your code. You're using html in php. Below should work echo'<a href="deleteEmployeenew.php?id='.$rs[0].'" onclick="return confirm(\'are you sure ?\');">'; Quote Link to comment Share on other sites More sharing options...
shanthi Posted May 31, 2010 Author Share Posted May 31, 2010 Thank you its working Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.