...

View Full Version : Update Form - For Users/Members etc



floatsaround
03-22-2010, 06:53 PM
Hi all

Im having a slight problem here, hopefully you can help

I have a Mysql database for members populated with username/password/email/country

What I want is a form that members can use once logged in so they can update/change the details of the database about themselves.

I have searched high and low for a simple guide but not found any luck. Anyone able to help here?

DJCMBear
03-22-2010, 07:09 PM
Basicly all you need is a html form with the right input's for example if you have a section for country you would use a select box.

All you need to do is call the data out the database for the current user and set each value to the table row.

You may need to use stripslashes so it allows the data to show right, and on submit just check if each input value as been changed if it has then do a mysql update to update that users information.

Rowsdower!
03-22-2010, 09:16 PM
Just a quick note:

Read up on SQL injection and other malicious input attacks before opening up your database to editing. There is no "magic bullet" to prevent all database attacks and you also need to take into account other types of attacks, such as the possibility of a user inputting something as simple as malicious javascript inside of a block of text that they are submitting for their username or profile data. Such an attack could send cookie information and personal details of your users offsite for exploitation.

Anyway, security is an enormous issue with many facets but I just wanted to plant that seed in your mind as you begin. Always ALWAYS sanitize your users' input before processing it. Making it look nice in display should be a secondary objective.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum