MY SQL DATABASES

liunx

Guest
ok here is my issue, im making a site that needs to have php script replicas of, Myspace, Ebay, autotrader and loads more.<br /><br />now i have all the php scripts for this however each><img src='http://www.webdesignerforum.co.uk/style_images/1/post_snapback.gif' alt='*' border='0' /></div><div class='quotemain'><!--quotec-->Yes, it's possible. You ensure that all the sections use the same user database. The site is under target="_blank">http://www.plus2net.com/php_tutorial/php_login_script.php<!--content-->
cookies or session variables will keep a member logged in.<br /><br /><br />EDIT:oops misread the last post <img src="http://www.webdesignerforum.co.uk/style_emoticons/default/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /><!--content-->
what you can use is a database something like this:<br /><br />id<br />username<br />passwordhash (remember to md5 passwords - not just store them as plaintext)<br />permissions<br /><br />for the permissions you can then use a CHMOD style numbering:<br />0 - no perms<br />1 - ebay<br />2 - MySpace<br />4 - Autotrader<br />8 - Facebook<br />16 - Bebo<br /><br />to set the perms, say I have "MySpace" and "Facebook", my perm number is 10, and><img src='http://www.webdesignerforum.co.uk/style_images/1/post_snapback.gif' alt='*' border='0' /></div><div class='quotemain'><!--quotec-->cookies or session variables will keep a member logged in.<br />EDIT:oops misread the last post <img src="http://www.webdesignerforum.co.uk/style_emoticons/default/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br />ok so i think i get that. so with that theory in mind does this mean that you could use the same my_sql database for each seperate section of a site?<br /><br />Edit - jsut re-read the last post this is a lil over my head now, luckly my mate is a desiner and knows more than i so i shall ask him to read what you have said thanks for the input<!--content-->
<!--quoteo(post=10853:date=Sep 19 2007, 03:52 PM:name=JSweete)--><div class='quotetop'>QUOTE(JSweete @ Sep 19 2007, 03:52 PM) <img src='http://www.webdesignerforum.co.uk/style_images/1/post_snapback.gif' alt='*' border='0' /></div><div class='quotemain'><!--quotec-->ok so i think i get that. so with that theory in mind does this mean that you could use the same my_sql database for each seperate section of a site?<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br />yes<!--content-->
What you might find you can do is create your own login script (there are loads of tutorials on this) which queries your user database and sets the relevant server variables and cookies. You would have to make sure you remove any login and log out buttons from the scripts you have. <br /><br />I've used this method a few times when a client wanted to log in to a forum and a website from the main page of the site and it does work. It's not the most elegant solution but if you're new to the whole coding thing then it might be your best option.<br /><!--content-->
 
Back
Top