Page 1 of 1

[HELP] Just a little question about PHP/DB's

Posted: Sat Jul 24, 2010 2:08 pm
by Andy11548
Hello.

I seem to be having a problem with Php. I'm fairly new to it, but have set myself a task to code a fully functional Php Website. So far I have made a Log In page that works and a Registration page that works.

Now i'm trying to create a Contact Us page that works.

I want it to be like

<?php echo "$name" ?>
<?php echo "$username" ?>

Blah blah blah. So that it appears like
"Name: Andy ********"
"Username: Andy"
"Email: Andy@example.com"

"Subject: [drop down menu]"

ect.

Anyway. Is there a way I've got it to work with "Username: "$username"" but I can't get it to detect the session and retrive the session data from the Database for Name or Email.

If anyone could help me I would be greatly apprectiated.

Thanks,
"$username" :P

Re: [HELP] Just a little question about PHP/DB's

Posted: Sat Jul 24, 2010 2:29 pm
by oscardog
Might want to paste in your code(using code tags) so we can correct it.

Also creating a login/registration page when you're new to PHP is probably not the best idea as it is likely to have some security flaws in it. May want to read a tutorial on creating a secure login/registration to make sure you've covered all the bases.

Re: [HELP] Just a little question about PHP/DB's

Posted: Sat Jul 24, 2010 2:38 pm
by Andy11548
oscardog wrote:Might want to paste in your code(using code tags) so we can correct it.

Also creating a login/registration page when you're new to PHP is probably not the best idea as it is likely to have some security flaws in it. May want to read a tutorial on creating a secure login/registration to make sure you've covered all the bases.
The only thing i've secured are the passwords with md5 encryption and it also strip_tags so that people can't make stupid names. It also retrives the information from the database, and when you enter the password to log in, it encrypts that, and compares it to the encrypted password in the database. If they match, it logs you in :).

Anywayz. I'm not even sure how I did this with the $username thing. Could you not just explain what to do? I can work out where to put it ect. I'm not that much of a idiot ;).