++$port_id
that's the syntax you want....
echo "<a href='imageonly.php?portid=" . ++$port_id . "'>NEXT</a>";
Also, note that your query is vulnerable to SQL injection and you should take measures to prevent that by building your query with [man]sprintf[/man] and casting your inputs as specific types of values (integer, string, boolean).