php - how to let each user page show different information based on input on the user page


I want to create a diff user input form for different types of information. What must happen is depending on what input form the user selects information is displayed accordingly on the user page.I have different types of input forms based on what the user chooses(music form and teaching form)

(for example a page for music users and a page for learning users depending on the input each the user profile page must be displayed differenty according to that input, like one page will have one picture and the other user profile page will have 10 pictures displayed in line for example.

Each field has its own table in database depending on type of user.(music table and teaching table) How would i do this logic?




you should set user role in session when he login and if there isn't login page you should use drop down with your forms and use onchange event on this dropdown.

and then check your cases and output as user type.

you can try that :

if($_SESSION['user_role'] == 1)

include 'form1';
}else if($_SESSION['user_role'] == 2)
include 'form2';

and so on ..

where user_role set in login validation from DB as role should be as field in your table .

People are also looking for solutions to the problem: php - Values are not inserting on mysql database from android device


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.