Esiste un modo per avere direttamente la pagina linkata al result?
Mi spiego meglio: da una query lanciata da un form ottengo una pagina con un result corrispondente a tre campi della tabella, uno di questi è un link. L'utente cliccando sul link apre una scheda di approfondimento.
Nel caso che il risultato è univoco è inutile avere il passaggio intermedio. C'è la possibilità di rimandare direttamente alla scheda?
Grazie in anticipo a chiunque vorrà darmi una mano.
Questo il code:
LA PAGINA HTML
<form action="cercaRESULT.php" method="POST" name="search" target="_blank"><input name="searchstring" type="text" class="CERCA" size="16" />
<input name="search" type="submit" class="GO" value="go" />
</form>
LA PAGINA PHP
<?php
$searchstring=$_POST['searchstring'];
if ($searchstring)
{
$sql=("SELECT * FROM libri WHERE titolo LIKE'%$searchstring%' or autore LIKE'%$searchstring%' or isbn LIKE'%$searchstring%'");
$db = mysql_connect("xxxxxx", "xxxxx", "xxxxx");
mysql_select_db("xxxxxxx",$db);
$result = mysql_query($sql,$db) OR DIE(mysql_error()) ;
$number = mysql_numrows($result);
if ($number ==0) {
echo "
<TABLE ><TR><TD class=TITOLOtab> Non ci sono risultati nella tua ricerca.</TD></TR></TABLE></br>";
}
while($myrow = mysql_fetch_array($result))
{
echo "
<TABLE ><TR><TD class=AUTOREtab> ::::: ".$myrow["autore"]." - <TD class=TITOLOtab>".$myrow["titolo"]." </TD> <TD class=URLtab><a href=\"#\" onclick='window.open(\"schede/".$myrow["url"]."\", \"\", \"width=700,height=310\");return false;'> scheda </a></TD></TABLE></br>";
}
}
else
{
?>
</html>
<?php
}
?>