Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Location
    Orlando, FL
    Posts
    1,063

    PHP mysql query then output

    I am not a PHP/mySQL guru. I basically know enough to get by, but I need some help pointing me in the right direction. Here is what I am trying to do:

    I am going to require users to login and then based on their login, give them access to specific URLs. I already have a PHP/mySQL configuration to process the logins. I am assuming I just need another table where I can add URLs to each row and associate them with a user.

    I am not sure how to display the URLs from such that field. It may be multiple URL's, and this will be done on a small scale so I don't need much automation. I will be maually adding the URLs for each user via phpmyadmin or inserting them from a PHPadmin page.

    Is my logic correct? I am open to any sugguestions and/or feedback as this isn't my speciality.

  2. #2
    Join Date
    Jun 2009
    Location
    UK: Oxford
    Posts
    1,256
    If you could explain a little more on why each needs a specific URL, we might be able to trim off the bits your over doing. By the sounds of it, you could end up doing allot of work when you don't need to be.

    More info!
    Garbott Ltd - Professional web development & consultancy services
    Oxford.Hosting - Prestigious shared, cloud, dedicated and gaming hosting solutions.

  3. #3
    Join Date
    Aug 2009
    Location
    Orlando, FL
    Posts
    1,063
    Quote Originally Posted by jwebhost View Post
    If you could explain a little more on why each needs a specific URL, we might be able to trim off the bits your over doing. By the sounds of it, you could end up doing allot of work when you don't need to be.

    More info!
    Thats what I figured. I am basically going to sell video tutorials and they will live on vimeo. I am going to restrict the videos so they will only embed from my domain. I then want users to login and be able to view the video(s) they purchased. The URLs will be simple PHP pages with a specific vimeo video. I guess I would also need a way to protect each page they cannot be queried directly without logging in. What does this entail?

  4. #4
    Join Date
    Jun 2009
    Location
    UK: Oxford
    Posts
    1,256
    Well, you can do a KEY_LIST table with a layout of ID, USER_ID, KEY and in the video table have VIDEO_ID, VIDEO TITLE, VIDEO_URL, ACCESS_KEY and thus the 2 are relating on the key column.

    This way, more then one person can access it but is still remains secure with a required access key and required registered user_id. And you can do it so if the user name DOES not have the key, they cannot view it (this way, they can't sell on the key!).

    Hope this helps.
    Garbott Ltd - Professional web development & consultancy services
    Oxford.Hosting - Prestigious shared, cloud, dedicated and gaming hosting solutions.

  5. #5
    Join Date
    Aug 2009
    Location
    Orlando, FL
    Posts
    1,063
    Quote Originally Posted by jwebhost View Post
    Well, you can do a KEY_LIST table with a layout of ID, USER_ID, KEY and in the video table have VIDEO_ID, VIDEO TITLE, VIDEO_URL, ACCESS_KEY and thus the 2 are relating on the key column.

    This way, more then one person can access it but is still remains secure with a required access key and required registered user_id. And you can do it so if the user name DOES not have the key, they cannot view it (this way, they can't sell on the key!).

    Hope this helps.
    Thanks that is what I was looking for.

Similar Threads

  1. PHP/mySQL query help
    By PhilJ in forum Programming Discussion
    Replies: 8
    Last Post: 10-05-2010, 05:42 PM
  2. PHP/MySQL Query, replace output?
    By RW-Steven in forum Programming Discussion
    Replies: 2
    Last Post: 04-28-2009, 02:44 AM
  3. php mysql query help
    By Flipe.NET in forum Programming Discussion
    Replies: 2
    Last Post: 01-22-2007, 09:56 PM
  4. PHP mySQL Query
    By Kalyse in forum Programming Discussion
    Replies: 4
    Last Post: 06-28-2006, 08:30 AM
  5. Query output with php
    By NorthWest in forum Programming Discussion
    Replies: 2
    Last Post: 01-29-2006, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •