Reputation: 378
I have a page which is sending the variable idClient to another page.
Lets say on the step1.php i fill the idClient input and submit it via GET.
It goes to step2.php?idClient=1, then i'am hidding it:
<input type="hidden" id="idClient" value="<?php echo $_GET['idClient']; ?>">
But after that, when i submit that second page to another, it doesn't send the idClient variable.
Can anyone give me a hint?
Upvotes: 0
Views: 360
Reputation: 349
Try this:
<input type="hidden" id="idClient" name="idClient" value="<?php echo $_GET['idClient']; ?>">
use POST
to access idClient
Upvotes: 1
Reputation: 978
<input type="text" id="idClient" name="idClient" value="<?php echo $_GET['idClient']; ?>">
Upvotes: 0
Reputation: 160833
You have to change id="idClient"
to name="idClient"
.
id
attribute is only used in the client side, and will never passed to the server side.
Upvotes: 2