MySQL only allows one column in a table to be defined as auto-increment.
You could define a 2-step process, I suppose:
// assume id1 is the primary key and auto-incremented:
mysql_query("INSERT INTO table (id1, id2, data) VALUES (NULL, 0, 'some data')");
$number = mysql_insert_id();
mysql_query("UPDATE table SET id2=$number WHERE id1=$number");