Re: javascript and php

From: Date: Thu, 06 Jul 2000 19:48:17 +0000
Subject: Re: javascript and php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5274@lists.php.net to get a copy of this message
At 15:37 6-7-2000 -0400, you wrote:
Hi,
        I'd like to know how(if) can php interprets javascript confirm boxes
what i want to do is execute a delete query in php on a mysql db if the confirm is yes
        If somebody could tell me where i could find info on that topic i'd be
quite happy.
You can use javascript to check the box, or you can check the box yourself. Either way, the fact that it is checked will be sent to the executing script, i.e. script.php?check= or script.php?check=yes if it's checked (I don't really recall what the default value is when checked, I believe it differs per browser) Either way, you can use the following PHP code in such a case: if ($check) { echo "Checkbox was checked"; } else { echo "Checkbox wasn't checked"; } (Just check if 'check', the name you gave the checkbox, has a value). I hope this helps you out. Jeroen Latour

« previous php.general (#5274) next »