
22/07/2012, 07:56
|
| | Fecha de Ingreso: agosto-2011 Ubicación: Santo Domingo
Mensajes: 487
Antigüedad: 13 años, 6 meses Puntos: 31 | |
Respuesta: Insertar datos si no existen intenta con esto
echo "Ingredientes necesarios:".
"<ol>";
while ($i < $n)
{
$ingredientes=$ingrediente[$i];
if ($ingredientes=='')
{
echo "<li>{$ingredientes} {$cantidad[$i]} {$idUnidad[$i]}</li>";
mysql_query("SELECT * FROM ingredientes");
if (exist($ingrediente[$i])) {
echo "el ingrediente". $ingredientes." ya existe por lo que no se ha introducido<br> ";
}else{
mysql_query("INSERT INTO ingredientes (nombreIngrediente) VALUES ('".$ingredientes."')");}
}
$i++;
}
echo "</ol>";
__________________ El talento se educa en la KARMA y el carácter en la tempestad.
Gabriel De Los Santos |