Alright,
I have a database filled with section titles (1-10). To not have to deal with the hassle, I have people fill in 1 section at a time, in order (1, 2, 3, etc...).
Now, I have an 'Add Section' button at the top of the page for the user to add to the next open section (meaning, if sections 1 and 2 are full, they can add to 3).
For the add section button, I have the following anchor code:
<a href="update_section.php?sec=<?php if(!sec2_title){echo '2';} if(!$sec3_title){echo '3';} if(!$sec4_title){echo '4';} if(!$sec5_title){echo '5';} if(!$sec6_title){echo '6';} if(!$sec7_title){echo '7';} if(!$sec8_title){echo '8';} if(!$sec9_title){echo '9';} if(!$sec10_title){echo '10';}?>
First off, this doesn't work, because if sections 1, 2, and 3 are filled, it will echo '45678910'...there has to be a better way to go about with this problem, but I just can't seem to figure it out.
Thanks.
-influx