Hi, Everyone, I am trying to add a php variable to my form input action.
When I click the button to submit the form, the php var is not being added to the action url.

I have tried using ".." / '..' to try to add the php var to the form action

<form role="form" action="http://website.com/dir/page.php?bptspt=<? echo $order; ?>" method="post">

Any help would be appreciated, thanks in advance.

Recommended Answers

Have you tried to echo the variable to make sure there is a resulting value before the form?

E.G. <p><? echo $order; ?></p><form role="form"...

Jump to Post

All 2 Replies

Have you tried to echo the variable to make sure there is a resulting value before the form?

E.G. <p><? echo $order; ?></p><form role="form"...

do you have short tags enabled

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.