Confirm window in PHP!

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!

Moderator: General Moderators

Post Reply
Miss.Apache
Forum Newbie
Posts: 10
Joined: Sun Dec 14, 2003 11:49 am

Confirm window in PHP!

Post 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,
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

does the function work at all?
PHP doesn't know Javascript, so you can't do that from what i know.
Post Reply