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!
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
my code here works..but the query doesnt..........
the alert happens but the query wont work..
<form>
<input type=button value="Approve"
onClick="if(confirm('Are you sure you want to approve?'))
{ <?php $queryupdate; ?>
alert ('Registration has been approved.');
window.location='main.php'
}
else
{
alert ('Hindi inapprove.');
window.location='home.php'
}" >
</form>
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
By the way, other than the syntactical errors, I hope that your php $queryupdate, whatever it is, is just echo-ing more Javascript into the page. If you think that you can put function calls, etc. there that will execute when the html object is clicked (because its inside the onClick handler), then you're wrong. PHP cannot respond to client-side calls, it's a server side language whose job is finished once the page loads.