Skip to content
Advertisement

pass parameters in url via php

i am tying to pass some parameters in my URL via php. Below is my code i have tried.

JavaScript

i guess there is some errors with the qoutes. how to solve it?

Advertisement

Answer

Instead of window.location.href which will return the current URL from the address bar, you can use window.location.assign() which will open a new document for a given address.

Check below:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement