ctcp Posted July 4, 2009 Share Posted July 4, 2009 <?php $maxRows_Recordset1 = 20; $pageNum_Recordset1 = 0; if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = $_GET['pageNum_Recordset1']; } $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1; mysql_select_db($database_files, $files); $query_Recordset1 = "SELECT * FROM crackz WHERE id = id ORDER BY `date` DESC"; $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1); $Recordset1 = mysql_query($query_limit_Recordset1, $files) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1']; } else { $all_Recordset1 = mysql_query($query_Recordset1); $totalRows_Recordset1 = mysql_num_rows($all_Recordset1); } $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1; ?> <?php do { ?> <form id="form1" name="form1" method="post" action=""> Name <label for="textfield2"></label> <input name="textfield" type="text" id="textfield2" accesskey="50" value="<?php echo $row_Recordset1['name']; ?>" size="50" /> </form> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> <?php mysql_free_result($Recordset1); ?> <form action="" method="post" name="form1" id="form1"> <label for="form1"></label> <input type="submit" name="form1" id="form1" value="Submit" > </form> i make this but not work how to ? i whana update 20 records whith one submit ... thanks for help .. Quote Link to comment Share on other sites More sharing options...
npsari Posted July 4, 2009 Share Posted July 4, 2009 Hello there, I am not sure I can see the upade bit in your code From what I know, this is the update bit... mysql_query("UPDATE table_name SET value = '$new_value' WHERE id = '$id' "); Is this what you are trying to do? Sorry if I am wrong. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.