Certain web pages only accessible to owner and not customer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Certain web pages only accessible to owner and not customer

Im creating an eCommerce website. I have a page that enables the business owner to upload products to the shop. I only want this page to be accessible to the owner as i only want him to upload products. How do i go about this? The page itself works, all i want to know is how do i make this page accessible to the owner only.

11th Feb 2018, 7:11 PM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar
4 Answers
+ 4
You can check if the ipaddress matches the owner $_SERVER['REMOTE_ADDR']
21st Jul 2018, 4:56 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
You could do this with PHP sessions. Do you have login form in your site?
11th Feb 2018, 9:50 PM
Toni Isotalo
Toni Isotalo - avatar
0
I do not want to use a login form. I was wondering if there is another way to do it.
12th Feb 2018, 8:46 AM
Mogammad Shameer Losper
Mogammad Shameer Losper - avatar
0
Well one way is to ask admin password when trying to access that page.
12th Feb 2018, 8:48 AM
Toni Isotalo
Toni Isotalo - avatar