This topic is locked

Function Before add.

9/8/2008 2:54:11 AM
PHPRunner General questions
M
maxcolo author

Hi,

I wont prevent to insert in the table "utenti_registrati" the field nome,email,cap. the code is:
[codebox]function BeforeAdd(&$values)

{

global $conn;

$strSQLExists = "select * from utenti_registrati where nome='".$values["nome"]."' and email='".$values["email"]."' and cap='".$values["cap"]."'";

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

$data=db_fetch_array($rsExists);

if($data)

{

echo "Duplicate Entries, Try Again";

return false;

}

else

{

return true;

}

}[/codebox]
but not prevent nome and cap, but only email.........why.

Where is my error

Best regards

J
Jane 9/8/2008

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.