Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2011
    Thanked 0 Times in 0 Posts

    Update or Delete profile in php

    I've coded a small site where you can create profiles via php and save them onto a database but i want to add an option to be able to delete your profile if you wish. Heres a screenshot which may help! Thanks


  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,668 Times in 2,637 Posts
    You simply add a delete button to the form, and then detect the deletion process and argument and issue a DELETE call.
    I can't help but notice the link at the bottom. You're not seriously spawning new directories for each profile are you? If you are, you'll need to use the unlink() commands to delete the filesystem files, but I'd suggest using a db or filesystem file to control the data. PHP is a dynamic language; creating actual directories is old school.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts