Salve,
ho una domanda da porvi che la mia testa non ci arriva.
Devo inserire 3 campi di testo del database ma non so come fare, ho provato a fare qualcosa ma non capisco il concetto giusto!
Magare sbaglio tutto in questo script!!
C'é qualcuno che mi sa dare una dritta??
Codice:
<?php
$nomeFotoPiccola = $_POST['fpiccola'];
$nomeFotoGrande = $_POST['fgrande'];
$nomeCommento = $_POST['commento'];
$query = "INSERT INTO tb_curiosity (cur_id, cur_fotopiccola, cur_testo, cur_fotogrande) VALUES ('','$nomeFotoPiccola','$nomeFotoGrande','$nomeCom mento')"
mysql_select_db($database_hb9fax) or die ("Database non selezionato");
mysql_query($query);
?>
<html>
<title>Inserisci Dati Curiosity nel database</title>
<link href="css/master.css" rel="stylesheet" type="text/css">
<body>
<table width="470" height="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" bgcolor="#84A5D3"><form name="form1" method="POST">
<table width="470" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>
Nome foto piccola, esempio: nomefoto.jpg
<input name="fpiccola" type="text" id="fpiccola" size="40">
</p></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>
Nome foto grande, esempio: nomefoto_g.jpg
<input name="fgrande" type="text" id="fgrande" size="40">
</p></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td width="30"></td>
<td width="410">
Commento :
<textarea name="commento" cols="50" rows="10" id="commento"></textarea>
</p></td>
<td width="30"></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td><div align="center">
<input type="submit" name="Submit" value="Inserisci nel database">
</div></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td><div align="center">Close Windows</div></td>
<td></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>