newbie question

Reply

Join Date: Nov 2007
Posts: 10
Reputation: bjg5858 is an unknown quantity at this point 
Solved Threads: 0
bjg5858 bjg5858 is offline Offline
Newbie Poster

newbie question

 
0
  #1
Dec 2nd, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,142
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 531
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: newbie question

 
0
  #2
Dec 2nd, 2007
you are doing the right thing
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 10
Reputation: bjg5858 is an unknown quantity at this point 
Solved Threads: 0
bjg5858 bjg5858 is offline Offline
Newbie Poster

Re: newbie question

 
0
  #3
Dec 2nd, 2007
Cheers...
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,142
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 531
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: newbie question

 
0
  #4
Dec 2nd, 2007
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.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 10
Reputation: steven509 is an unknown quantity at this point 
Solved Threads: 1
steven509 steven509 is offline Offline
Newbie Poster

Re: newbie question

 
0
  #5
Dec 2nd, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 10
Reputation: bjg5858 is an unknown quantity at this point 
Solved Threads: 0
bjg5858 bjg5858 is offline Offline
Newbie Poster

Re: newbie question

 
0
  #6
Dec 3rd, 2007
Probably a silly question but why is it neccesary to encrypt the passwords if the web server is secure.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 10
Reputation: steven509 is an unknown quantity at this point 
Solved Threads: 1
steven509 steven509 is offline Offline
Newbie Poster

Re: newbie question

 
0
  #7
Dec 3rd, 2007
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 ^^
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: newbie question

 
1
  #8
Dec 3rd, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC