Jump to content

Finding Lowest Number


swamp

Recommended Posts

Hey,

 

I've got a field called position, the default is currently 1. You can change the position using up + down form controls.

 

Whem I submit a new row to the database through a form I want the field position to default to the lowest current position and be one less than that...

 

Eg

 

<input type="hidden" value=<?php echo $lowest_position - 1 ?>">

 

and:

 

$lowest_position - LOWEST CURRENT POSITION - 1;

 

 

Link to comment
https://forums.phpfreaks.com/topic/124017-finding-lowest-number/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.