Jump to content

darylesha

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

darylesha's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I currently have a page with a repeated region that has information from a table with a checkbox proceed each line. My objective is for the admin (on the frontend) to be able to check multiple boxes and when they press the submit button, the information that is stored in the database should be copied to a new database and deleted from the existing database. What I currently have is this: mysql_select_db ($database, $Trial); $query = "SELECT * FROM contactinfo"; $Record = mysql_query($query, $Trial) or die(mysql_error()); $row = mysql_fetch_assoc($Record); totalrows = mysql_num_rows($Record); <form id= "form" name="form" method="post" action=""> <?php do { ?> <input type = "checkbox" name= "checkbox" id= "checkbox" /> <?php echo $row['ID']; ?>, <?php echo $row['FNAME'], ?> <?php echo $row['address']; ?> <?php } while ($row = mysql_fetch_assoc($Record) ?> <input type="submit" name="button" id="button" value="submit"/> I am not sure how to check whether the checkbox is checked and then where to insert the code (before or after the submit button). I have a basic algorithm but I have no ide how to implement it in PHP. I also know what the SQL statement would be. I have searched and read plenty of books but I just don't know how to put the info together. Any help would be greatly appreciated
  2. Thanks again for your help. I am probably gonna use the DELETE because there are just specific rows that I would like to delete.
  3. I am new to php coding and website design. I was wondering if anyone could help me figure something out. Okay so I have a dynamic website that prints the info in the database out with checkboxes next to it. When a user checks the boxes and press the submit button, the record should be deleted from the database and then they should be stored in another database that assigns a different primary key ( not in that order). Also I would like for the user to be redirected back to the same page and for the records that were deleted, not to show up. I'm figuring that I need to use a if...else statement as well as some type of loop. Any other help would be greatly appreciated!
×
×
  • 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.