OK, here's my sample code:
<form action="result.php" method="POST">
<textarea name="input" class="form">Image 1 URL
Image 2 URL
Image 3 URL</textarea>
</form>
My goal is to set each "Image URL" as a different entry, e.g.
img_1 = "Image 1 URL";
img_2 = "Image 2 URL";
img_3 = "Image 3 URL";
I also want to be able to determine after the user submits the form how many lines they used so I can use that later.
I have no idea how to do this.
To make it clearer, my goal is to make a script that...
1. The user registers (MySQL registration/login script is done).
2. The user logs in to the authenticated page.
3. The user types the Image URLs (one on each line; maximum of 20 images).
4. The user clicks OK.
5. The script saves the image URLs (with an incrementing ID) to the database under their username.
6. The script creates (via fwrite) a small script that allows the user to add an iframe to their site that will generate a random image from their selection each time the page reloads.
7. The user can relogin and edit the existing image URLs and add/delete them.
I don't know much about MySQL, so help is very much appreciated.