/*
myphp( "insql.php", database, query, element)
If the result set of 'query' contains the record 'elements' returns 1.
Otherwise returns 0.
*/
/*
Only executed the first time
*/
if ( !isset ( $init ) )
{
$init = 1;
/* Build the result set */
mysql_connect ( "localhost", "root", "" );
mysql_select_db ( $PARAM[1] );
$result = mysql_query ( $PARAM[2] );
while ( $riga = mysql_fetch_row ( $result ) )
{
$record[$riga[0]]=1;
}
mysql_free_result ( $result );
mysql_close();
}
/* Search in the result set !!!! */
if ( $record[$PARAM[3]] == 1 )
$RET=1;
else
$RET=0;