Get form value from URL variable opencart admin login

Viewed 25

I'm trying to achieve this, When I pass a variable in admin url login page like this

admin/index.php?route=common/login?email=test@test.com

The url value "email" gets in the username input field

I'm using opencart 3 and I changed the login to be with email instead of user name

1 Answers

You can pass variables in the URL using the below format.

base_url or domain?variable_1=value_1&variable_2=value_2.........&variable_n=value_n You can access the value of each variable $_GET['variable_1'],$_GET['variable_2']....$_GET['variable_n']. if you are using email input field in form tag method should be GETenter image description here

Related