Hello!!

What I was able to do was this....

On every form page I have, I have a checkbox that is labeled "Ok To 
Save", that the user would check or not......

I would then pass that variable to the next page and check to see if the 
value was true or not...

If it is true then it would continue to insert the data into the 
database...

If not then it would display the pop up messages....

The code looks something like this on the parse page.....(in my case it 
is the insert3.php file)

<?php

if (empty($save)){
?>
<script language="JavaScript">
        <!--
        function MM_popupMsg(msg) { //v1.0
          alert(msg);
        }
        //-->
        </script>
        </head>
        <body bgcolor="#FFFFFF" text="#000000" onLoad="MM_popupMsg('Hello!! 
You Forgot to check---OK TO SAVE??---. This check is for when you 
accidently hit return or enter...This will keep a Database 
Happy!!!\n\nThank you....ADMIN')">

<?
        echo ("Click you back button please!!! We Have a Problem!!\n");
        echo ("</body>\n");
        echo ("</html>\n");
        exit();
}


require ("functions/java.inc");
        echo ("</HEAD>\n");
        echo ("<BODY BGCOLOR=#FFFFFF LINK=#FFFFFF VLINK=FFFFFF ALINK=00FF00 
Text=#000000>");
        
?>

It will popup a messages about not checking that checkbox....And tell 
you have an error...

I too messed around trying to just using PHP, but I gave up using just 
PHP, Javascript plays nice with PHP anyway!!



Dan











On Monday, April 1, 2002, at 12:57 PM, [EMAIL PROTECTED] wrote:

> <shrug> I was close. :)
>
> -----Original Message-----
> From: Jason Wong [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 01, 2002 10:53 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Pop up are you sure...
>
>
> On Tuesday 02 April 2002 01:30, Jonathan Hilgeman wrote:
>> You're so negative, Jason. :)
>
> No, my answer was just short and to the point ;-)
>
>> Long answer, Dave, it wouldn't be wise to do this via Javascript.
>
> My long answer was going to be: it's possible to do it in PHP, but then 
> it
> would not look like a pop-up window, and it requires a trip back to the
> server.
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> Love is being stupid together.
>               -- Paul Valery
> */
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to