Click to See Complete Forum and Search --> : Assistance Required
Ironmann00
08-21-2003, 03:22 PM
Hello. I just started getting into the PHP langueage. I am currently attempting to create user and and form mail handling databases. I am trying to create a login, registration, logout, form, mail, and validation scripts. I am intimidated and overwhelmed. I am not sure where to begin. Can somebody please tell me how to get a start?
A few questions:
1. Should I use Mysql_query to submit the databases?
2. What is the best way to set a database up?
3. What is PHPmyadmin and how can I utilize it.
Thanks in advance. I will be posting more questions regarding my project in this thread. Please Check back. Once again, Thank you.
PunkSktBrdr01
08-21-2003, 04:15 PM
I found a good login tutorial for PHP and MySQL. It might help.
http://www.sitepoint.com/article/319/
Ironmann00
08-22-2003, 10:12 AM
Where is a good place to learn how to create a "Retrieve Your Password" script?
PunkSktBrdr01
08-22-2003, 10:52 AM
What do you mean by "retrieve your password"?
Ironmann00
08-22-2003, 12:11 PM
Sorry about not being clear. I am looking for how to mail a "lost password" to a member in an automatic and secure fashion.
One more thing,
There is a line of code that reads (from the login script):
<?php exit; } $username = mysql_result($result, 0, 'fullname'); ?>
I broke up 'fullname' into 'firstname' and 'lastname'. It looks like this now:
<?php exit; } $username = mysql_result($result,0, 'firstname' && 'lastname'); ?>
Would that work?
PunkSktBrdr01
08-22-2003, 04:59 PM
Well, for the lost password, you could use the mail() function to email the password to the member. This option doesn't work if PHP is in safe mode, though. The other way to do it is to have a member select a question (dad's birthday, fav sports team, etc...) and answer when they sign up, and when they lose their password, they must answer the question correctly to get their password. To answer your second question, you should use:
$firstname = mysql_result($result,0, 'firstname');
$lastname = mysql_result($result,0, 'lastname');
or:
$row = mysql_fetch_object($result);
$firstname = $row->firstname;
$lastname = $row->lastname;
Hope it helps!
Ironmann00
09-02-2003, 06:12 PM
I would like information, that was submitted using the $_POST method, to be added and saved to a database. Then I would like to take the information and insert it into an HTML page. I would like to do so by inserting the information to an array and then setting a single variable to the array. The HTML page will contain that variable. Thus displaying the info on the page. New information submitted using the form should be created in a new HTML page. I am just not sure how to accomplish this using a single variable and how to create a new page for every submission. Please help me. Sorry about asking so many questions. Thanks in advance for your help.