Hello all,
I have run into a bit of problem and was wondering if anyone can help.
Basically i have a master detail page that displays a list of all the photo galleries stored in a table of a database. I've added a column in the table that contains a form to submit to another page a number for the number of images to be added to the gallery. I've added a link to an edit page that uses the id, but when i use the id in the action section of the form it doesn't change with each record. I know that isn't explained very well, so here's the code:
<?php do { ?>
<?php $gallery = $row_rs_get_galleries['id_gallery']; ?>
<tr>
<td><?php echo $row_rs_get_galleries['title_gallery']; ?></td>
<td><?php echo $row_rs_get_galleries['date_gallery']; ?></td>
<td>
<form name="picknumber" id="picknumber" method="post" action="addimages.php?id=<?php echo $gallery; ?>">
<select name="pickno">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<input type="submit" name="submit" id="submit" value="Go" />
</td>
<td><a href="editgalleryinfo.php?id=<?php echo $gallery; ?>">Edit</a></td>
</tr>
<?php } while ($row_rs_get_galleries = mysql_fetch_assoc($rs_get_galleries)); ?>
Basically when $gallery variable is echoed in the edit link the id changed i.e. 1, 2, 3 etc. But when used in the action of the form for each row of the table it stays the same as the id of the first record.
Hope that all makes sense, any help would be greatly appreciated