Re: javascript and php
| From: | Matthew Leverton | Date: | Thu, 06 Jul 2000 19:52:13 +0000 |
| Subject: | Re: javascript and php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5272@lists.php.net to get a copy of this message | ||
PHP happens first, then JavaScript. The only way PHP (or any other server
side script) can interact with JavaScript is if you _reload_ the page.
<script type="text/javascript">
if (confirm('do you want to delete?') == true) {
location.href = 'delete_from_db.php';
}
else {
document.write('No info is delete');
</script>
--
Matthew Leverton - matthew@aeroinc.net -
http://www.allegro.cc
-----Original Message-----
From: Mathieu Dubé <mat@syspark.com>
To: php-general@lists.php.net <php-general@lists.php.net>
Date: Thursday, July 06, 2000 2:44 PM
Subject: [PHP] javascript and php
>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.
>
> Thanx
>
>--
>Mathieu Dubé mat.dube@videotron.ca
>Visit:www.mamalinux.com
> www.quebecgroove.com
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>