Ciao, non riesco a trovare cosa non va in questo codice, in pratica in un db vi è una tabella in cui sono registratte le info di ciascun utente, ad ogni utente è assegnato un numero (ticket) quando l'utente ins. dal form tale ticket dovrebbere comparire tutte le info.
codice:
<?php
........
if ($_POST[cercaTicket])
{
$ticket = $_POST["ticket"];
$cerca_t = mysql_query("SELECT * FROM info WHERE ticket='".$ticket."'");
$num = mysql_num_rows($cerca_t);
if ($num == 0)
{
echo "Ticket non presente";
header("Refresh: 2; URL=Ricerca.php");
break;
}
else
echo "ciao";
}
?>
......
<table align='center'>
<tr>
<td>Ticket</td><td><input name="ticket" size='6'></td><td><form><input type="submit" name="cercaTicket" value="Invio"></form></td>
</tr>
</table>
........