adamwstl
adamwstl

Reputation: 338

How to Pass URL param in form on submit?

I have

<form name="feedback" method="post" onsubmit="return checkform()" action="engine.php?ad=">

and I need to append a variable to

engine.php?ad=, which is

<?=$_GET['page'];?> in php (pass a URL param to the next page using this.)

How would I go about adding that?

I also have it in javascript if needed.

Upvotes: 0

Views: 308

Answers (1)

SLaks
SLaks

Reputation: 887275

Like this:

<form name="feedback" 
      method="post" 
      onsubmit="return checkform()" 
      action="engine.php?ad=<?php echo htmlentities($_GET['page']); ?>">

Upvotes: 1

Related Questions