Hi,
I got a problem, maybe in my syntax when i pass from a form some variables. when i click search from terzo.php and the script send me in xxx.php the page is completely empty
i explain better; i got a form where a user can search a film and a page where he can watch the results;
the first page is named terzo.php and contain the form; the linked page is xxx.php
i post the code of xxx.php (the page that receive the variable from terzo.php) after this code a got a while that extract the data perfectly working and tested so i think that the problem is in the code of this query:
$film= "SELECT *
FROM `FILM`
WHERE durata = '" . $_POST['durata_film'] . "'
AND nome_film = '" . $_POST['nome_name'] . "'
AND anno_prod = '" . $_POST['nome_year'] . "'
AND genere_film = '" . $_POST['nome_type'] . "'";
$result = mysql_query($film) or die(mysql_error());
while ($row = mysql_fetch_array($result))
{
...... all running (i tested the code with a normal query)
i post now the code of the terzo.php where the form is:
<form action="xxx.php" method="post">
<table align="center" width="800">
<tr>
<td align="left" width="30%">
Titolo: <br>
<input type="text" name="movie_name"><br>
Genere: <br>
<input type="text" name="movie_type">
</td>
<td align="left" width="30%">
Durata:<br>
<input type="text" name="durata_film"><br>
Movie Year:<br>
<select name="movie_year">
<option value="" selected> Selected a Year..</option>
<?php for($year = date("Y"); $year>=1970; $year--) {
if($year == $anno_prod) { $selected = "selected"; } else { $selected = ""; } ?>
<option value="<?php echo $year; ?>"<?php echo $selected; ?> >
<?php echo $year; ?></option>
<?php } ?>
</select>
</td>
</tr>
</table>
Someone hep me i cant go forward form a day.....
why???
Thanks in advance
Daniele