Prueba asi mejor:
Código PHP:
$last_id = " SELECT LAST_INSERT_ID()";
$last_id_sql = mysql_query($last_id) or die(mysql_error());
$row2 = mysql_fetch_row($last_id_sql);
echo $row2[0];
$Clear = Clear($last_id_sql);
// Cerramos la conexion
$Disconex = Disconex();
Saludos.