View difference between Paste ID: K4Q1yifE and sWsX7rrv
SHOW: | | - or go back to the newest paste.
1-
<html>
1+
<?php
2-
	<head>
2+
	include 'connect.php';
3
	
4-
	</head>
4+
5
	$pass =$_POST["password"];
6-
	<body>
6+
7-
		<?php
7+
8-
	@import("connect.php");
8+
	$query="SELECT user FROM  utente WHERE user='$user' AND password='$pass'";	
9
	$risultato = mysql_query($query);
10
	$row= mysql_num_rows($risultato);
11
	
12
	if($row==1)
13-
	$risultato=mysql_query("SELECT * FROM utente");
13+
	{
14-
	if(!$risultato) echo"Errore nella select";
14+
		echo"Log in effettuato";
15
		
16-
		{
16+
	}
17-
			//$sqlcmd= "INSERT INTO utenti VALUES";
17+
18-
			//$sqlcmd.="('$user','$pass')";
18+
	{
19-
			$query = "SELECT user FROM utente ";
19+
		echo"utente non connesso ";
20-
			$result = mysql_query($query); 
20+
	}
21-
			$row = mysql_fetch_array($result); 
21+
22-
			if($row["user"] == "$user")
22+
23-
			{
23+
			
24-
				echo ("Utente connesso");
24+
	//mysql_close(utenti);	
25-
			}		
25+
?>