Page 1 of 1

Confirm window in PHP!

Posted: Thu Dec 25, 2003 12:10 pm
by Miss.Apache
Hello,

i tried to use the confirm window in PHP code, but i had a problem!

------

this is what i want:
when the user click on the compile boutton i'll copmile his program and display the output from compiler,
now.. i want to ask him if he want me to send this output to the data base or if he wants to modify his proram?

------


i defined this function but it contains an error :
function go_there()
{
if ((<script> confirm(\"Do you really want to submit your program ?\");</script>)== false)
return false;
else
return true;
}

i call it like this:

if (go_there()) { // save in database}

and

if !go_there() { //return back}

----

any advices on this? how could i correct ti?



thanx,

Posted: Thu Dec 25, 2003 12:32 pm
by vigge89
does the function work at all?
PHP doesn't know Javascript, so you can't do that from what i know.