This topic is locked

how to add a confirmation box prior executing an script

8/12/2008 8:56:56 AM
PHPRunner General questions
C
ckapote author

I have the following script before adding a new record , to search for dublicates .

I need to provide a confirmation box to allow dublicates if user is press 'yes' or to return false

the script if the user press 'no'. please help.
global $conn;

$strSQLExists = "select * from _tblcertificatespro where Vessel='".$values["Vessel"]."' and Certificate='".$values["Certificate"]."'";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{
return false;

}

else

{
return true;

}

J
Jane 8/13/2008

Him
unfortunately you can't add confirm dialog in the Before record added event.

Javascript code is executed after PHP code.