Buongiorno, mi volevo scusare con tutti per il post precedente con richiesta aiuto,ma non avevo letto il regolamento,speriamo adesso di non ricascarci.
Sto realizzando un programma per la gestione delle camere di un'agriturismo ( 5 camere).
Ho creato 2 database uno camere (id,camera,stato) e l'altro dati cliente.
Ogni id della tabella camere mi rappresente il numero delle camere quindi mi sono generato una tabella con solo 5 record. Ho fatto un form e dentro ho messo una tabella 2 righe e 5 colonne dove ad ogni casella vorrei assegnare una camera,inoltre mi assume due immagini a seconda del valore che assume il campo stato Y o N.
E' possibile assegnare ad ogni casella un'Id (della tabella camere)?oppure mi devo creare 5 tabelle una per ogni camera e di consegueza 5 recordset?
Spero di essere stato chiaro
grazie e ciao a tutti
<?php require_once('Connections/programma.php'); ?>
<?php
mysql_select_db($database_programma, $programma);
$query_Recordset1 = "SELECT * FROM camere";
$Recordset1 = mysql_query($query_Recordset1, $programma) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento senza titolo</title>
</head>
<body>
</p>
<form id="form1" name="form1" method="post" action="">
<table width="323" height="127" border="1">
<tr>
<td width="100"><?php if (stato==y) { echo "<img src=\"libero.jpg\"width=\"40\" height=\"40\"/>";
}
else { echo "<img src =\"occup.jpg\"width=\"40\" height=\"40\"/>";
}
?>
<?php echo $row_Recordset1['id']; ?></td>
<td width="38"></td>
<td width="39"></td>
<td width="42"></td>
<td width="70"></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</p>
</p>
</form>
</p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>