Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MY SQL DATABASES

Featured Replies

ok here is my issue, im making a site that needs to have php script replicas of, Myspace, Ebay, autotrader and loads more.

 

now i have all the php scripts for this however each one will require a different login??

 

 

 

is there a way (eg using the same my_sql database) or any way possible to make it so you can use just one login for the whole site??

 

 

 

thanks in advance and please speak easy language as im still picking up webdesign as im going along.

 

James

Yes, it's possible. You ensure that all the sections use the same user database. The site is under one domain, yes?

 

When you say you have "php script replicas of, Myspace, Ebay, autotrader and loads more", you mean there's various sections of your site? I'm not sure if I quite get what your setup is.

  • Author
Yes, it's possible. You ensure that all the sections use the same user database. The site is under one domain, yes?

 

When you say you have "php script replicas of, Myspace, Ebay, autotrader and loads more", you mean there's various sections of your site? I'm not sure if I quite get what your setup is.

 

 

yes sorry, as i said im fairly new to all this and so dont use technical talk lol.

 

but yeh basicly its all on 1 domain, but there are many different sections of the site requiring you to register or logon, but i want 1 single login for all, could i just use the same my_sql database?? or would that just make everything fcuk up??

 

 

thanks for the reply

 

James

If I have read this right you want a one username and password box that every member will use? or the same one to display on each page? something like that

 

The way a common login works is it compares two fields of data (normally username and password), so if you have a mySQL database with everyone's details in, each person will have a unique username (more then likely) and then their password that is stored in the database. When they input the username and their password the script that you use will pull the information from the database...it will look at the username and make sure that the password is the one used with that username. If it is the right one then it lets you log in, if not then it will give you an error saying that its the wrong username/password

 

this might help a bit

http://www.plus2net.com/php_tutorial/php_login_script.php

cookies or session variables will keep a member logged in.

 

 

EDIT:oops misread the last post :rolleyes:

what you can use is a database something like this:

 

id

username

passwordhash (remember to md5 passwords - not just store them as plaintext)

permissions

 

for the permissions you can then use a CHMOD style numbering:

0 - no perms

1 - ebay

2 - MySpace

4 - Autotrader

8 - Facebook

16 - Bebo

 

to set the perms, say I have "MySpace" and "Facebook", my perm number is 10, and only those two will result in that number.

 

if the CHMOD thing looks too complex, you can just use multiple fields with boolean values.

  • Author
cookies or session variables will keep a member logged in.

EDIT:oops misread the last post :rolleyes:

 

 

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?

 

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

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?

 

 

yes

  • 2 weeks later...

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.

 

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.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.