este codigo creo esta mejor asi:
Código PHP:
<?php
include('db.php');
$sql = "SELECT status FROM reg_pedidos where no= '$no' ";
$result = mysql_query($sql);
if ($status2[" $result "])
{
include('db.php');
$sql="select * from reg_pedidos where no='$no' ";
$result= mysql_query($sql);
while($row = mysql_fetch_array($result))
{
include('../logs/trapproved.php');
}
mysql_free_result($result);
} else {
include('db.php');
$sql="select * from reg_pedidos where no='$no' ";
$result= mysql_query($sql);
while($row = mysql_fetch_array($result))
{
include('mod_ped_2.php');
}
mysql_free_result($result);
}
?>
pero aun no me funciona el aviso de error.