Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Like Tree2Likes

Thread: Same index page but different users!

  1. #1
    Junior Member
    Join Date
    Mar 2021
    Posts
    8
    Member #
    62570

    Same index page but different users!

    I am a rookie html/css user so have mercy on me!

    I have the following web page created for a video broadcaster:

    index page.JPG

    I need the same page to look like this when a video viewer calls the page:

    index page viewers.jpg

    Notice missing buttons for viewers. And I would need the "Start" to be removed. Join only!

    How would you accomplish this?

    Thanks,

    Ray
    Last edited by rayj2021; Mar 10th, 2021 at 02:14 PM.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,865
    Member #
    5580
    Liked
    731 times
    Ray, typically there is PHP scripting that processes the users logins and changes what appears on pages based on userís status. Does your website use PHP for the user logins?
    What scripting happens when buttons are pressed and how do they login?
    Last edited by mlseim; Mar 10th, 2021 at 04:21 PM.

  4. #3
    Junior Member
    Join Date
    Mar 2021
    Posts
    8
    Member #
    62570
    Thanks for the response.

    At this point I don't have any authentication. I do use PHP to upload video's to the server.

    Ray

  5. #4
    Member Cutler's Avatar
    Join Date
    Feb 2021
    Posts
    31
    Member #
    62526
    Liked
    5 times
    You can make a conditional if statement for assigning classes. Then add a ".userLoggedIn" class to the buttons and have "display: none;" on the styling or any additional changes required.

    I'm always prone to toggle class. You could however, just make a whole other set of content for the logged in user and use an if statement to determine which one you display.
    $1/year Portfolio Hosting with Promo Code: WEBDESIGNFORUMS

    Agency: Marshalled Makers
    Hosting: Marshalled Makers Hosting

  6. #5
    Junior Member
    Join Date
    Mar 2021
    Posts
    1
    Member #
    62575
    As for me would be better looking for professional help for example https://mlsdev.com. The main advantages of a custom software development company are that it provides a tailor-made solution to organizations.
    Last edited by martincorteze; Mar 13th, 2021 at 03:09 AM.

  7. #6
    Junior Member
    Join Date
    Mar 2021
    Posts
    8
    Member #
    62570
    Thanks for the response.

    At this point I don't have any authentication. I do use PHP to upload video's to the server.

    Ray

  8. #7
    Junior Member
    Join Date
    Mar 2021
    Posts
    8
    Member #
    62570
    Quote Originally Posted by martincorteze View Post
    As for me would be better looking for professional help. The main advantages of a custom software development company are that it provides a tailor-made solution to organizations.
    Understood. But I am basically dabbling in html/css and webrtc video. I have no schedule, but if I can accomplish my goals, I may turn it loose on the public!

  9. #8
    Junior Member
    Join Date
    Mar 2021
    Posts
    8
    Member #
    62570
    I guess my question is how to distinguish between two different types of users. One user would be a video broadcaster and all of the rest would be the viewers of the broadcast video.

  10. #9
    Junior Member
    Join Date
    Mar 2021
    Posts
    8
    Member #
    62570
    Quote Originally Posted by Cutler View Post
    You can make a conditional if statement for assigning classes. Then add a ".userLoggedIn" class to the buttons and have "display: none;" on the styling or any additional changes required.

    I'm always prone to toggle class. You could however, just make a whole other set of content for the logged in user and use an if statement to determine which one you display.
    Being a newbe with css I would not know where to start with your suggestion.

  11. #10
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,865
    Member #
    5580
    Liked
    731 times
    The point is, when someone visits your web page, you have no way of knowing if they are logged in or not.

    If you want people to "join", you need to have a way for them to join. That means you need a PHP membership script where they can "join" ... or "register" to be a member. Once they are members and log-in, you will now know if the person is logged in or not logged in and display pages accordingly.

    Members would be assigned either as a "viewer" or "broadcaster", or "admin", etc.

    Even with others here giving you ideas on how to "show" or "not show" different things on the screen, you still need to know if the person viewing your page is logged-in or not logged-in.

    So getting back to PHP. You said you use PHP to upload videos. Is that on a page that is "secret" to you? You're not letting anyone that visits your site to upload videos are you?

    EDIT:
    And just so you know how it works ...
    With a PHP script, when a person enters their username and password, the PHP script finds them in a database and determines if the login has correct username and password. If it does, it creates a SESSION "ID" which is stored on the server and stored as a small cookie (SESSION KEY) on the user's computer. Now you will be able to use a few SESSION variables to know what role the user is (viewer, broadcaster, etc). No matter what page the user visits, you will always be able to see their information. When they logout, the SESSION expires. Or, when they close their browser, the SESSION expires. And by "you", I mean your web page, which is a PHP script itself. Instead of index.html, you have index.php

    When index.php is viewed (executed), it is a PHP script that processes everything and displays the web page.

    This page you are on now (web design forums) is a PHP script. You have logged in and these pages are dynamically generated by PHP. As a WDF Staff member, I can do things you cannot do. It knows what my user role is. I'm seeing the pages differently than you see them.

    There is no other way to do this unless you use PHP, Perl or some other server-side scripting. Javascripting will not work (and is also not secure).

    Since you have no PHP scripting experience, you can either hire someone to help you, or it might be possible that your webhost already has a feature that they provide for their customers using their own web page creation software. Like a "web builder".
    Last edited by mlseim; Mar 11th, 2021 at 07:11 PM.
    rayj2021 and Cutler like this.



Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:50 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com