Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    14
    Thanks
    2
    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

    http://i.imgur.com/ikOqjre.png

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 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'); 


  •  

    Posting Permissions

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