...connect to db
$a_id = $_GET['a_id'];
$query = "SELECT * FROM article INNER JOIN image ON (image.a_id=article.a_id) WHERE a_id='$a_id'";
...rest of code
I get the error: "Column: 'a_id' in where clause is ambiguous"
use WHERE image.a_id
mysql doesn't analyze the query in such depth to realize image.a_id=article.a_id makes it irrelevante which a_id to use in the WHERE clause.