$result = mysql_query("SELECT id,content FROM table WHERE id={$id}",$db); $row = mysql_fetch_row($result); echo $row[0]; //The value of id echo $row[1]; //The value of content $content = $row[1]; //Store it into something we can identify easily