MySQL – Call a View inside a Stored Procedure

Let’s say, I have a table as follows

tbl_1

id             name                 status               usertype                         flag ================================================================================================ 1              Name 1                  1                    2                               0 2              Name 2                  1                    3                               0 3              Name 3                  1                    1                               0 4              Name 4                  1                    4                               0 5              Name 5                  1                    5                               0  

HTML PAGE

<select id="type" name="type">    <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option>  </select> 

My requirement is that I need to get all the data from table where the usertype is selected from the html page by the user (could be 1, 2, 3,4,5, etc.)

I want to create a view, and call that inside stored procedure

I cannot pass an argument inside of a View. So, I was told to create a stored procedure, and call the view inside it. The problem is, I don’t know how to do it.