Jump to content

Update multi record one submit


ctcp

Recommended Posts

<?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 ..

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.