Search the Community
Showing results for tags 'move record'.
-
I have the following code below. I have added buttons to each entry that pops up but I need the buttons to do certain things and I'm stuck. When the Approve button is pressed I want the entire entry to go to another table called "incomplete" (no quotations) and then I want the record to be deleted from the table "needs" (no quotations), which it currently resides in. When the Deny button is pushed I want the entry to just be deleted from the table "needs" (no quotations). Tried to figure it out on my own but I have nothing. I'm new to all this and the fact that I've gotten this far makes me excited :-) $query = mysql_query("SELECT * FROM needs"); while ($rows = mysql_fetch_array($query)): $firstname = $rows['firstname']; $lastname = $rows['lastname']; $address = $rows['address']; $city = $rows['city']; $state = $rows['state']; $phone = $rows['phone']; $email = $rows['email']; $typeofneed = $rows['typeofneed']; echo "$firstname $lastname<br>$address<br>$city $state<br>$phone<br>$email<br>$typeofneed<br>"; echo "<button name='approve' type='button'>Approve</button><button name='deny' type='button'>Deny</button><br>---------------------------<br>"; endwhile;