Nick Garland Posted October 19, 2007 Report Share Posted October 19, 2007 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 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. Quote Link to comment Share on other sites More sharing options...
Simon Posted October 19, 2007 Report Share Posted October 19, 2007 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. Quote Link to comment Share on other sites More sharing options...
tomturd Posted October 19, 2007 Report Share Posted October 19, 2007 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. Quote Link to comment Share on other sites More sharing options...
Nick Garland Posted October 20, 2007 Author Report Share Posted October 20, 2007 Ive done enterting and extracting data from a data base using SQL before, its just the PHP part mainly as I do not know the syntax but I do programming and I have been told the structure is similar to C. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.