Jump to content

Web Design / Code


Nick Garland

Recommended Posts

Hey all. Basically I am making a website for a pool society. It will have the users results from competitions, social matches etc and the ability to compare themselves to the other players blah blah etcetera. I am just creating the login script etc so on and so forth and testing that. Now I am not used to using PHP but so far its going good. Now to try and not sound like an idiot :P

I can only assume that you create the webpage itself with the header, all the menu etc and this is done in normal html, then when you go to log in, they enter the details into the form and then this calls the login script using the action method. How on the php script do I get it to log you in preferably without refreshing the page? or if the page has to refresh so it changes the log in box to a logged in box?

Also how do most people position features such as these that call scripts, I can only assume using CSS to create layouts?

Also the scipts will mainly be used for querying and stuff so I assume I write the scripts and when they choose what to view I call the appropriate script to post the information onto the page? This will sound odd but how do I get the information the script has found in the data base to appear on the page?

Hope that made some sense, thanks for the help,

Nick.

Link to comment
Share on other sites

To be fair, it sounds like you know completely nothing about back end development, so my first question would be to ask why you said you would do it?

What you want to do is really simple, for someone that knows how to use PHP and how to use MySQL, but for someone who can't get data from a database it would take weeks to learn.

I'm answering it like this because there isn't a simple answer to your question, what your asking is basically how to do a complete site.

Only thing i can suggest is picking up a PHP/MySQL book or downloading one, opening up the php.net manual and just play.

Link to comment
Share on other sites

Step 1: install apache/php/mysql on your computer so you don't have to keep uploading pages to a server - http://www.wampserver.com/en/ This is REALLY worth doing if you haven't already.

Then I'd recommend searching for 'web monkey php tutorial' on google and using that. Thats how I learned the basics (took about 5 hours to go through as I remember) - it'll show you how to put data into a database, and how to pull it out and display it. Its probably not the simplest way nowadays to start, BUT it gives you a good footing of knowledge that'll come in handy later. You can skip step 1 and 2 regarding installing php and mysql - as you'll have already done that.

Login system is pretty simple. Store username and password in the database. then query the database asking for a row which contains the username they entered as the username, and the password they entered as the password. If zero rows are returned, then they do not match. You then have to store the fact that they're logged in in a session, but thats a bit more difficult.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...