Hey, Mita Kuuluu? I'm not exactly sure what you mean, but basically you want to edit and move around the values?
the 'no' field is basically an order? to do the edit page you can use a combination of HTML forms and the mysql results... and to move them up or down, you can have a link that has the id in the url so itd be like ?id=2&action=up if(!isset($_GET['action'])){ //display item list }elseif($_GET['action'] == 'up'){ //move item up $result = mysql_query("SELECT no FROM admin WHERE id={$_GET['id']}") or die('Invalid Query: ' . mysql_error()); $previousnum = mysql_fetch_assoc[$result]; $newnum = $previousnum - 1; $result = mysql_query("SELECT id FROM admin WHERE no={$previousnum}") or die('Invalid Query: ' . mysql_error()); $moveid = mysql_fetch_assoc[$result]; $result = mysql_query("UPDATE admin SET no={$previousnum} WHERE id={$moveid}") or die('Invalid Query: ' . mysql_error()); $result = mysql_query("UPDATE admin SET no={$newnum} WHERE id={$_GET['id']}") or die('Invalid Query: ' . mysql_error()); }elseif($_GET['action'] == 'down'){ //move item down }elseif($_GET['action'] == 'edit'){ //edit item if(!isset($_GET['step'] || $_GET['step'] == 1){ //display HTML form with data pulled from the database based on $_GET['id'], submit it to itself, and add &step=2 }elsif($_GET['step'] == 2 || $_GET['step'] == 'save'){ //save data back to database based on $_POST information from form and $_GET['id'] } } and you should be able to adapt that to the down one for yourself (just change the -, to a +) there might be a better way (and more secure) to do it, but i jus made that then, so give it a go anyways... hey hey, -- Luke "Tommi Virtanen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi! | | How I can do following: | | 1. | | i have page which list (admin) | | id menuname pagename no | 1 First First page 1 edit (link to edit-page) | 2 Second Second page 2 edit | 3 Third Third page 3 edit | | I can edit all field in edit-page, also no -field. | How I can edit only no -field, and so that when I want to | move id 2 to first page (and then id 1 move to second page. | | Eg. | | id menuname pagename no | 1 First First page 1 up down edit (link to edit-page) | 2 Second Second page 2 up down edit | 3 Third Third page 3 up down edit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php