Location: PHPKode > projects > LAMP School > comuni/eli_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) or die ("connessione non riuscita"); 
   $db=mysql_select_db($db_nome) or die ("connessione al db fallita"); 
$sql='select * from comuni where idcomune='.$idcom;
if(!($result=mysql_query($sql)))
   print("query fallita $sql");
 else
  {
  $data=mysql_fetch_object($result);
  print("<table border=0 width='100%'>
		<tr>
		   <td align ='center' bgcolor='$bgcolor_titolo'><strong><font size='+1'>ELIMINA COMUNI</font></strong></td>
		</tr>
		</table> <br><br>");  
		print"<center> SI DESIDERA ELIMIARE I SEGUENTI DATI? </center>";
	print "<center><table border='1'>";
   print " <center> <table cellspacing='15'>";
   print " <tr> <td> ";
   print ("<center> <table cellspacing='15'>");
    print"<tr><td><input type ='hidden' name='idcomuni' size='10' value='$idcomune'></td></tr>";
             print"<tr><td align='right'>Denominazione:</td> <td> <b>$data->denominazione  </b> </td></tr>";
             print"<tr><td align='right'>CAP:</td><td><b> $data->cap </b></td></tr>";				  	
             print"<tr><td align='right'>Codistat:</td><td><b> $data->codistat </b></td></tr>";
             print"<tr><td align='right'>Provincia:</td><td><b> $data->provincia </b></td></tr>";
             print"<tr><td align='right'>Sigla provincia:</td><td><b> $data->siglaprovincia </b></td></tr>";
 			 print"<tr><td align='right'>Regione:</td><td><b> $data->regione</b> </td></tr>";
 			 print"<tr><td align='right'>Stato estero:</td><td><b> $data->statoestero </b></td></tr>";  
   
 
   
   print "</table>";
   print "</td> </tr>";
   print "</table> </center>"; 
   print "<center> <table>";
   print "<tr> <center> <td>";
   
   print("<form name='form1' action='ok_com.php?idcom=$data->idcomune'>");
   print("<input type='hidden' name='idcom' value='$data->idcomune'>");
   print ("<input type='submit' value= '  SI '>");
   print("</form> </td> </center>"); 
   print("<td></td>");
   print("<td></td>");
   print "<center> <td> <form name='frm2' action='lis_com.php'>";
   print "<input type='submit' value= ' NO'>";
   print "</form>";
  
   	
  print  "</td> </center> </tr>";
  print("</table> </center>");
  }
mysql_close($connessione);
?>   
Return current item: LAMP School