Make PHP url with unique format

Viewed 26

I am confused about how to go to a specific url after I click a button,

I made button that goes to a page containing a form (php file) so it will go to form.php

www.domain.com/form.php

Because there are many types of forms I want to make it simple and populate the page with another file. I remember that I learned something like this so I can call one php file into another file.

www.domain.com/form.php?package=standard

Is there any link or tutorial that I can follow to help me do this?

Thanks

1 Answers

put your button design to an a tag like this:

<a href="www.domain.com/form.php?package=standard" class="btn btn-primary">Im a button</a>

clicking the button will now redirect you to the link. if you want to redirect in a new tab put target="_blank" on your a tag like this:

 <a href="www.domain.com/form.php?package=standard" class="btn btn-primary" target="_blank">Im a button</a>

but if you want to retain the button tag, call the link using javascript or jquery.

Related