March 10, 201016 yr I have a database that keeps the information of my group members. I have a script that can be used to delete any member's information from the database, but the member's image still remain in the upload folder of my website. how do i delete the member's information and his image from my database and upload folder. regards
March 10, 201016 yr I have a database that keeps the information of my group members. I have a script that can be used to delete any member's information from the database, but the member's image still remain in the upload folder of my website. how do i delete the member's information and his image from my database and upload folder. regards Just use the unlink function in php <?php //File name and location to delete $filetodelete = "filedirectory/filename.txt"; unlink($filetodelete); ?> Please +1 me if this helped
March 11, 201016 yr Just out of interest, what is all this +1 stuff people tend to be requesting a lot lately? They're begging for a credit for giving a useful answer (that little green button with a + at the bottom right); I don't really approve of begging, but it can't be stopped.
March 11, 201016 yr They're begging for a credit for giving a useful answer (that little green button with a + at the bottom right); I don't really approve of begging, but it can't be stopped. Theres actually a difference between begging and just asking nicely saying please give me a +1 if this helped is just asking nicely for them to +1 you if your answer has helped not begging
March 11, 201016 yr OK I apologise in your case, but some people do seem to demand a +. Nah its ok trust me i have seen that alot on here i just ment that some people do just ask nicely for the +1
July 18, 201016 yr Author be it begging or asking politely, i think he/she deserves it, as least i didn't pay him/her for his/her contribution.
July 18, 201016 yr You'll need to use the PHP unlink function: delete.php example: example: <?php $id = ... $query = mysqli_query("SELECT ..... WHERE id=$id"); unlink('./uploads/'.$query['file']); mysqli_query("DELETE FROM ... WHERE id=$id"); .. redirect off-topic.. The + button isn't hard to find, therefore I find it quite annoying when people append it to their post; I don't know, it just seems petty.
Create an account or sign in to comment