You've got two problems, your SQL syntax and the value you are trying to parse from the query string.
The code should look like this:
PHP Code:
session_start();
include ("lib/dbconnect.php");
$autorID=preg_replace('/[^\d]/g','',($_GET["autorid"])); //replace and single character that's not a digit
//OR
preg_match('/^(\d+)/',$_GET["autorid"],$matches);
$autorID = $matches[1]; //grab all the digits from the start of a string to the point where there are no more digits
$autoriDS=safe_query("SELECT autori.* FROM autori WHERE autori.id='".$autorID."'"); //encapsulate $autorID in single quotes!!! (your first problem)
$autorRow=mysql_fetch_object($autoriDS);
$detalii=$autorRow->cv;
$autor=$autorRow->autor;
include ("header.php");
Bookmarks