need some mysql and php pointers

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
leegreaves
Forum Newbie
Posts: 7
Joined: Sun Sep 27, 2009 7:34 pm

need some mysql and php pointers

Post by leegreaves »

Im a newbie and need some pointers

I recently started a website up (tho its still mainly in the construction stages and not fully up n running). Ive inititially created a startup database, but now for the hard part. Ill need to link various pages on my site to the database and i need some simple pointers about wot i need to consider when it comes to writing up the php code to link it all together. What should i consider when it comes to, ive racked my brains over this cos im very inexperienced with php code, would it be better to find code snippets from a site and change it to work with my site or should i write it from scratch? I did ask in another forum post on here about getting a lot of help but i feel that is a bit much to ask for, I know i could download scripts and use those for my project but, if i come across any hurdles i would be lost as to sorting them out, does anyone know where i could go to and find out how to do this totally from scratch. Ive got an idea in my head how i want it to work, itll be like any other site, a user registers their info, this info is inserted to the database as a new entry; so when they revisit its just a simple login procedure (i do have a login script on the home page but i cant even get that to work properly). Damn ppl reading this must be thinking what a sad muppet...BUT...if theres anyone out there who knows a site i can go to to find out how to do this totally then be my guest and let me know
User avatar
lord_webby
Forum Commoner
Posts: 44
Joined: Wed Aug 19, 2009 9:01 am

Re: need some mysql and php pointers

Post by lord_webby »

http://www.tizag.com/mysqlTutorial/

Best to use other's code to a certain extent. That should cover pretty much everything you need to do with php/mysql.
User avatar
lord_webby
Forum Commoner
Posts: 44
Joined: Wed Aug 19, 2009 9:01 am

Re: need some mysql and php pointers

Post by lord_webby »

leegreaves
Forum Newbie
Posts: 7
Joined: Sun Sep 27, 2009 7:34 pm

Re: need some mysql and php pointers

Post by leegreaves »

would u consider it a bit foolish for a newbie like myself to jump right in at the deep end!!! lol

anyway, the 2nd of the tutorial links u gave me there ive already come across thru a search...unfortunately i felt that it only covered a little of what i needed to acquire in my goals. This is only due to the fact that what i am trying to achieve with my site involves more processes than that is covered in it. oh well never mind
User avatar
lord_webby
Forum Commoner
Posts: 44
Joined: Wed Aug 19, 2009 9:01 am

Re: need some mysql and php pointers

Post by lord_webby »

it may look like the deep end - but in terms of php and mysql that's about as shallow as you're going to get.

If you want more on php however:
http://www.w3schools.com/PHP/DEfaULT.asP

I'm guessing you've already got to grips with html? What site are you trying to build?
leegreaves
Forum Newbie
Posts: 7
Joined: Sun Sep 27, 2009 7:34 pm

Re: need some mysql and php pointers

Post by leegreaves »

im building a members only site which requires a user to login in with the usual username and password (which is encrypted md5 style in my database). Once ive got the login to work then i can add a session alive statement to ensure that they dont get logged out each time they goto a different page on the site.
User avatar
lord_webby
Forum Commoner
Posts: 44
Joined: Wed Aug 19, 2009 9:01 am

Re: need some mysql and php pointers

Post by lord_webby »

This should help but don't store as cookies - store as session variables instead. It will prevent a lot of security issues. Make sure everything is encrypted when stored.

Passwords should be salted before hashing.

http://php.about.com/od/finishedphp1/ss ... n_code.htm
Post Reply