<?php
$str=$_GET['q'];
$sql="$str";
echo $sql;
include "conect.php";
$rez=mysqli_query($link,$sql);

echo"<table><tr> <td>Nr. crt</td><td>Numele</td><td>Prenumele</td><td>Semigrupa</td></tr>";
$i=1;
while($row=mysqli_fetch_array($rez))
	{
		echo"<tr><td>".$i."</td><td>".$row['nume']."</td><td>".$row['prenume']."</td><td>".$row['s_grupa']."</td></tr>";
		$i++;
	}
echo"<table>";



?>