Location: PHPKode > projects > LAMP School > comuni/mod_com.php
<?php

	@include ("../php-ini.php");
    @include("../funzioni.php");
	
	// istruzioni per tornare alla pagina di login 
	session_start();	
    $tipoutente=$_SESSION["tipoutente"]; //prende la variabile presente nella sessione
	if ($tipoutente=="")
	   {
	   header("location: ../login/login.php"); 
	   die;
	   }
	
	$Connessione=mysql_connect("$db_server","$db_user","$db_password");
        if (!$Connessione)
           print("<h2>connessione errata</h2>");
	$DB=mysql_select_DB($db_nome);	
         
         if (!$DB)
           print("<h2>database non selezionato</h2>");
	   $Sql="SELECT * FROM comuni WHERE idcomune=$_GET[idcom]";
		
	   $Res=mysql_query($Sql);
	    if (!($Res=mysql_query($Sql)))
		print("Query fallita");   	
	($dato=mysql_fetch_object($Res));
	print" <html>
			<head>
			<title> Trovato> </title>
			</head>
			<body>
				<form  name='form5' action='aggiorna.php' method='GET'>
				<table border=0 width='100%'>
		<tr>
		   <td align ='center' bgcolor='$bgcolor_titolo'><strong><font size='+1'>VISUALIZZAZIONE COMUNE</font></strong></td>
		</tr>
		</table cellspacing='15'> <br><br>
			     <center> <table>
		    
		               	<tr> <td> <input type = 'hidden' size='20' name='idcomuni' value='$dato->idcomune'> </td> </tr>
		               	<tr> <td><b> Denominazione<font color='#ff0000'>*</b> </td> <td> <input type = 'text' size='20' name='denominazioni' value='$dato->denominazione'> </td> </tr>
		               	<tr> <td><b> CAP <font color='#ff0000'>*</b></td> <td>  <input type = 'text' size='20' name='cap'  value='$dato->cap'> </td></tr>
    			       	<tr> <td> <b>Codistat <font color='#ff0000'>* </b> </td> <td> <input type = 'text' size='20' name='codice'  value='$dato->codistat' maxlenght='4'> </td></tr>
		              	<tr> <td><b> Provincia <font color='#ff0000'>*</b></td> <td> <input type = 'text' size='20' name='prov'  value='$dato->provincia'> </td></tr>
        				<tr> <td><b> Sigla Provincia <font color='#ff0000'>*</b> </td> <td> <input type = 'text' size='20' name='sigla'  value='$dato->siglaprovincia' maxlenght='2'> </td></tr>
				        <tr> <td><b> Regione <font color='#ff0000'>*</b> </td> <td> <input type = 'text' size='20' name='reg'  value='$dato->regione'> </td></tr> 
						<tr> <td> <b> Stato Estero</b> </td> <td> <input type = 'text' size='20' name='stato'  value='$dato->statoestero'> </td></tr>	
						<table>
						<tr> <td>
						<center> <input type='submit' value='Modifica'> </center>
						<br>
							 </form> </td> </tr>
							 </table>
							 </table>
							 <table>
							 <tr> <td>
						     <center> <form name='form9' action='lis_com.php'>
		                     <input type='submit' value='<<Indietro'>
							 <br><br> 
							 <center> <font color='#ff0000'>* </font> (Campi obbligatori)
							 </form> </center>		
						</td> </tr>
						</table> </center>
			</body>
		</html>";
mysql_close($Connessione); 
?>




Return current item: LAMP School