ciao!
dovrei aggiungere ora il campo "datapartenza" come già fatto per il campo "datarrivo"
il campo l' ho già aggiunto nella tabella prenotazioni con valore DATE ovviamente
devo aggiungere un nuovo explode come nell' esempio di seguito ?
<?php
if (isset($_POST['nome'])){
include("dati.txt");
$link = mysql_connect($db_host, $db_login, $db_pass) or die (mysql_error());
mysql_select_db($database) or die (mysql_error());
list($giorno, $mese, $anno) = explode('/', $_POST['datarrivo']);
$datarrivo ="$anno-$mese-$giorno";
list($giorno2, $mese2, $anno2) = explode('/', $_POS['datapartenza']);
$datapartenza ="$anno-$mese-$giorno";
$dati = "INSERT INTO prenotazioni VALUES ('', ";
$dati .= "'" . addslashes($_POST['nome']) . "', ";
$dati .= "'" . addslashes($_POST['cognome']) . "', ";
$dati .= "'$datarrivo', ";
$dati .= "'$datapartenza',";
$dati .= "'" . $_POST['fax'] . "')";
mysql_query ($dati) or die (mysql_error());
Header("Location: ". $link_to_redirect);
}
?>
<html>
<head>
<meta name=Proprietà content=Apache3000>
<meta name=ProgId content=PHP Pratico>
<title>Form RUBRICA</title>
</head>
<body>
<TABLE border=0 width=100% cellpadding=3>
<tr>
<td width=100% colspan=2>
<p align=center>Inserisci Prenotazione
<form method=POST action=<? $PATH_INFO ?>>
</td>
</tr>
<tr>
<td width=18%>Nome</td>
<td width=82%><input type=text name=nome size=20></td>
</tr>
<tr>
<td width=18%>Cognome</td>
<td width=82%><input type=text name=cognome size=20></td>
</tr>
<tr>
<td width=18%>Data Arrivo</td>
<td width=82%><input type=text name=datarrivo size=20></td>
</tr>
<tr>
<td width=18%>Data Partenza</td>
<td width=82%><input type=text name=datapartenza size=20></td>
</tr>.........
__________________
Aiutooooo sono una neofita!!!!