Having had some sleep since my last reply (1am ish iirc) I''ve had a chance to look things over with a fresh pair of eyes.
Firstly as guido says foreach is preferable but not compulsory. Admittedly I don't use foreach much myself but do a count and a for loop like yourself.
I've seen a few things in your code which I'd like to get clear in my head first:
//No comments.. so what are you using auto_increment for?
$r = mysql_query("SHOW TABLE STATUS LIKE 'exhibit' ");
$row = mysql_fetch_array($r);
$Auto_increment = $row['Auto_increment'];
$exid = $Auto_increment;
The other thing I've noticed is that you have your template divs inside the form like this:
<!-- Template -->
<!--THIS IS BEING SUBMITTED!-->
<div id="newlinktpl" style="display:none">
<b>Artist name:</b> <input type="text" name="aname" size="60" value="test"><br/>
<input type="hidden" name="exhibitid" value="<?php echo "$exid"; ?>">
When you submit the form they're also being submitted adding an extra item to your loops. To prove it I added values to the text box inputs in those templates and then printed each sql statement in the loop when submitting on my local machine - Each value in the template came through with the rest of the form.
Basically when you submit your form the templates are being submitted with blank values giving you one extra item. Move the templates outside of the form and I think you'll loose the problem. EG:
<!--Put the actual form here-->
<!--Put the templates here-->
I can't replicate where the 1 is coming from at the end of your sql because when running your script locally it doesn't happen to me.
Move the templates out of the form tags, give it another go and get back to me with your results.