Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Update or Delete profile in php
04-19-2013, 02:37 PM #1
- 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
04-19-2013, 03:02 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,662 Times in 2,631 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.
Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');