You should be creating the records in both tables at the same time, the order is pending as soon as the order is placed, so the default value for the status should be pending, if you do it this way you can use mysql_insert_id to get the last insert number like this
$sql = "INSERT INTO orders VALUES('',)"; //the rest of your query here
if (!mysql_query($sql, $connection)) die('Error inserting to database:' . mysql_error() .'<br>Please contact the system administrator.');
$id = mysql_insert_id(); //$id is now your autoincrement number for the status table
$sql = "INSERT INTO status ('orderNumber') VALUES('$id')"; //id of this table cannot be auto
if (!mysql_query($sql, $connection)) die('Error inserting to database:' . mysql_error() .'<br>Please contact the system administrator.');
Then when you come to altering the tables you will know that the id numbers are the same across both tables.