Hi, I'm starting up a new website at http://www.itwasgreg.net, which is soon to become http://www.undershot.co.uk.
The idea behind the site is that bands can add/edit/remove live dates. This will give me a list of all local gigs, which I can then look through either by band, or all of the results.
I have this database already set up, but the thing I'm now wanting to do, is to allow bands to register themselves to the site through a form, so that they can have their own password and username.
What fields do you reccomend I have in a database (MySQL) to accomodate for all possible bits of data I'll get. And how should I go about making a registration screen, and login screen? (+ scripts)
I currently have a password protected directory for the members area, where all bands have the same password and username. The problem with this is, new bands will have to email me for the password/user, and also have the possibility of messing with other bands live dates.
Cheers, Ryan.
New Website
Moderator: General Moderators
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Well at the very minimum you will need to store the username and password in the database - but i guess that you will want to also store things like bandname, contact details, style of music, number of band members, date joined, gigs played...etc.
Then you can just make a registration form - collects a username and password - save it to the database.
Then have a login form that takes the username and pass - compaire them to the details in the database and if they match then you can log them in. Keep them logged in either by using cookies or sessions and check the details each time a page is loaded - then its just a simple:
Then you can just make a registration form - collects a username and password - save it to the database.
Then have a login form that takes the username and pass - compaire them to the details in the database and if they match then you can log them in. Keep them logged in either by using cookies or sessions and check the details each time a page is loaded - then its just a simple:
Code: Select all
if($logged){
//show member page
}else{
//show login/error page
}Yeah, I've been looking into sessions, and I can't seem to be getting them to work, becuse when I try to display the information I've stored, well, it doesn't.
I use the script below to store the sessions:
And this one to read the cookies, are these right?:
I use the script below to store the sessions:
Code: Select all
session_start();
header("Cache-control: private"); // IE 6 Fix.
$_SESSIONї'band'] = $band;
$_SESSIONї'password'] = $password;Code: Select all
session_start();
header("Cache-control: private"); // IE 6 Fix.
echo $_SESSIONї'band'];- llanitedave
- Forum Commoner
- Posts: 78
- Joined: Thu Jan 15, 2004 11:24 am
- Location: Las Vegas, NV.
I've only put the following fields in my database:
- Band
- Password
- Contact Name
- Email
- mp3_url
- mp3_name
- url
- location
I decided not to put the band members in until I manage to get the site up and running.
I've now got the login and register system functioning, I still need to put a few things on the site in the members area sense, like change password, change details. But if you're in a band, you can now join up.
How'd you all like the idea by the way? it's a bit like burbs.co.uk which is now huge, but better, in the sense that burbs has a <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> looking design, and not much detail, nevermind not having a live dated database.
The scrolly thing. I've heard about functions, but I've never really looked into them, I know 1 of you will say they're life savers, but I'm happy as I am at the mo. lol. I basically used the following concept:
I also used my own little dating scheme in the query (WHERE $today >= $date).
Cheers. (oh, if possible, check out the band serotonin which are in the database, the bands website is at http://www.serotoninweb.com)
Small post, hehe
- Band
- Password
- Contact Name
- mp3_url
- mp3_name
- url
- location
I decided not to put the band members in until I manage to get the site up and running.
I've now got the login and register system functioning, I still need to put a few things on the site in the members area sense, like change password, change details. But if you're in a band, you can now join up.
How'd you all like the idea by the way? it's a bit like burbs.co.uk which is now huge, but better, in the sense that burbs has a <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> looking design, and not much detail, nevermind not having a live dated database.
The scrolly thing. I've heard about functions, but I've never really looked into them, I know 1 of you will say they're life savers, but I'm happy as I am at the mo. lol. I basically used the following concept:
Code: Select all
<marquee behavior="scroll" direction="left" style="border: 0px;" width="460" truespeed scrollamount="1" scrolldelay="15"><? include("config.php");
$query = "SELECT field1, field2, field3 FROM table LIMIT 5";
$result = mysql_query($query);
while(list($field1, $field2, field3) = mysql_fetch_row($result))
echo("<a href="url.php?var=$field1">ї$field1 - $field2 - $field3]</a> "); ?>
</marquee>Cheers. (oh, if possible, check out the band serotonin which are in the database, the bands website is at http://www.serotoninweb.com)
Small post, hehe