Thank you very much for your answers, they helped me a lot!
I am wondering what I am doing wrong: I cannot get any values ββfrom the SQL statement.
My database table structure: 
My phpcode:
include('config.php'); $id = $_GET['id']; $query = "SELECT * FROM upload WHERE id = '$id'"; echo $query."<br/>"; $result = mysql_query($query) or die('error'); print_r($result); echo $result['id'];
When testing, I get the following:
"SELECT * FROM upload WHERE id = '1'
Resource ID No. 2 "
But there is an identifier with a value of "2", but why is it not displayed in my html? Only with the expression βwhileβ do I get the desired results:
while($results = mysql_fetch_array($result)) { echo $results['filetitle']; }
Is this while expression necessary with a single result? I mean, there can only be one identifier.
source share