Ciao a tutti e buone vacanze.
Ho un problema con un form, mai successo ma c'è sempre una prima volta, vi spiego
in una pagina dveicoli.php ho un form che dovrebbe inviare una mail a tizio..
scrivo l'html in questo modo
HTML:
<form name="invio_mail" method="post" action="invio_mail.php">
<table cellspacing="0" cellpadding="0" border="0">
<tr><td width="130" height="5"></td></tr>
<tr>
<td height="20" class="font_2">INDIRIZZO E_MAIL</td>
<td width="30"></td>
<td><input type="text" name="mail" class="text_1"></td>
</tr>
<tr>
<td height="20" class="font_2">COGNOME/NOME</td>
<td width="30"></td>
<td><input type="text" name="cognome" class="text_1"></td>
</tr>
<tr>
<td valign="top" height="20" class="font_2">INFORMAZIONI</td>
<td width="30"></td>
<td><textarea name="richiesta" class="textarea_1"></textarea></td>
</tr>
<tr>
<td height="40"></td>
<td width="30"></td>
<td><input type='image' value='invia_mail' img src='images/invio_richiesta.jpg' /></td>
</tr>
</table>
</form>
premetto che nella pagina index.php ho un altro form
PHP:
<?php
require 'connessione/Config.php';
require 'connessione/Connect.php';
// ciclo $a
$query_costruttore=mysql_query("Select * From costruttori ORDER BY desc_costruttore")
or die("errore nella query Costruttori;".mysql_error());
?>
<div align="center">
<form method="GET" action="index.php">
<input type="hidden" name="lehekulg" value="ricveicoli" />
<table background="images/testata.jpg" cellpadding="0" cellspacing="0" width="900" height="471" border="0">
<tr>
<td></td>
</tr>
</table>
<table background="images/bottom_testata.jpg" cellpadding="0" cellspacing="0" width="900" height="47" border="0" bordercolor="#003300">
<tr>
<td width="510"></td>
<td width="105" class="font_1">Seleziona Marca</td>
<td width="130">
<?php
print"
<select name='cmb_costruttore' class='select_1'>";
for($a=0; $a<mysql_num_rows($query_costruttore);$a++)
{
$a_elenco_costruttore=mysql_fetch_assoc($query_costruttore);
print"
<option value='".intval($a_elenco_costruttore['id_costruttore'])."'>
".$a_elenco_costruttore['desc_costruttore']."
</option>";
}
print"
</select>";
?>
</td>
<td><input type="image" value="cerca" img src="images/t_cerca.jpg" /></td>
<td width="20"></td>
</tr>
</table>
<table background="images/corpo.jpg" cellpadding="0" cellspacing="0" width="900" height="500" border="0" bordercolor="#CC3300">
<tr>
<td valign="top" width="40"></td>
<td valign="top" width="550">
<?php
if(isset($_GET['lehekulg']))
{
$pagina = $_GET['lehekulg']. '.php';
if (file_exists($pagina))
{
include($pagina);
}
else
{
include('veicoli.php');
}
}
else
{
include('veicoli.php');
}
?>
</td>
<td valign="top">
<table background="images/menu.jpg" cellspacing="0" cellpadding="0" width="237" height="362" border="0" bordercolor="#00CC00">
<tr>
<td height="13"></td>
<td></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="index.php?lehekulg=veicoli"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="quad"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="pit"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="moto"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="scooter"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="noleggio"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="azienda"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20" height="37"></td>
<td><a href="login"><img src="images/tasto_menu.gif" border="0"></a></td>
<td width="40"></td>
</tr>
<tr>
<td width="20"></td>
<td></td>
<td width="40"></td>
</tr>
</table>
</td>
</tr>
</table>
<table background="images/bottom.jpg" cellpadding="0" cellspacing="0" width="900" height="79" border="0">
<tr>
<td></td>
</tr>
</table>
</form>
La domanda è: come faccio ad indirizzare il form che invia la mail alla pagina che invia la mail.php
Grazie a tutti