All,
I have a small select box for deleting a page, and I need to include the pos(which is position when it gets submitted) - So I can update the database position of the pages.
How can I put the pos in this too when it gets submitted?
<?php //This dropdown is for page deleting!!
$query="SELECT id, linklabel, pos FROM pages ORDER BY pos ASC";
$result = mysqli_query($myConnection, $query);
?>
<form action="../page_delete_parse.php" onsubmit="return confirm('- Are you sure you want to delete this page?')" method="post" />
<select class="boxstyles" name='linklabel' />
<?php
// printing the list box select command
while($row=mysqli_fetch_array($result)){//Array or records stored in $row
echo "<option value=\"$row[id]\">$row[linklabel]</option>";
// Option values are added by looping through the array
}
?>
</select>
<input type="submit" name="formSubmit" value=" Delete "/>
</form>
<?php
mysqli_free_result($result);
?>
And also, I think my code looks messy, if someone can help me organize it, so I only have the mysql parts in the top and then just drop the variables in the form when needed.
Ive tried to clean it up, but i managed to make in not work :-)
Klemme