944,016 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 921
  • PHP RSS
Dec 2nd, 2007
0

newbie question

Expand Post »
Hi I am new to php and most other things, I am trying to make a form on my website to take users details for membership purposes. This data will be stored in a mysql database. What I have at the moment is a plain html form that posts the user input to a php script which then puts the data in the database. Is there a better way of doing this (could this proccess be done with a single php script) or am doing the right thing. Any suggestions and input would be greatly appreciated.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bjg5858 is offline Offline
10 posts
since Nov 2007
Dec 2nd, 2007
0

Re: newbie question

you are doing the right thing
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is online now Online
16,525 posts
since Apr 2005
Dec 2nd, 2007
0

Re: newbie question

Cheers...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bjg5858 is offline Offline
10 posts
since Nov 2007
Dec 2nd, 2007
0

Re: newbie question

yeah its standard to have an HTML form posting data to a PHP processor page

If you are new to php and want to see an example of inserting/editing/deleting data in a mysql database and creating tables/databases then please send me a Personal Message from my profile page, and ill send you a link to a simple news management system i made. (the whole thing is under 15 pages of code, nicely formatted, no superflous stuff)
Last edited by jbennet; Dec 2nd, 2007 at 12:05 pm.
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is online now Online
16,525 posts
since Apr 2005
Dec 2nd, 2007
0

Re: newbie question

If your storing passwords in a database its always best to encrypt them in sha-1 or atleast md5.

Also make sure your validating the data from the html form, just incase.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
steven509 is offline Offline
10 posts
since Dec 2007
Dec 3rd, 2007
0

Re: newbie question

Probably a silly question but why is it neccesary to encrypt the passwords if the web server is secure.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bjg5858 is offline Offline
10 posts
since Nov 2007
Dec 3rd, 2007
0

Re: newbie question

It's possible that the server is secure but someone can still exploit a bug in your code which could display user passwords. It's always better to be safe then sorry ^^
Reputation Points: 10
Solved Threads: 1
Newbie Poster
steven509 is offline Offline
10 posts
since Dec 2007
Dec 3rd, 2007
1

Re: newbie question

Read up on password sniffing. It's great if your server is secure, but if the user is on a LAN then it's still possible to get hacked.

Good rules for any database:

1.) Never pull a password out of the database. Once it is in, it stays there. You can look for it in the query, but don't pull it out.

2.) You should never know your users actual password. This means that every password is encrypted before it gets to the database. This will make it much more difficult for a sniffer to intercept it and successfully login.
Reputation Points: 232
Solved Threads: 137
Practically a Master Poster
buddylee17 is offline Offline
665 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Email (Secrect Msg)
Next Thread in PHP Forum Timeline: update sql





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC