I\'m working on a query tool that displays data from a MySQL database. The user is presented with a form containing a few dozen dynamically-generated checkboxes so that they
<form action="page.php?id=15" method="POST">
<input name="ref_code_cust" type="text" value="some data">
<input name="send" type="submit" value="send">
</form>
or
www.mywebsite/page.php?id=15
<form action="page.php" method="POST">
<input name="id" type="hidden" value="<?php echo htmlspecialchars($_GET['id'], ENT_QUOTES); ?>">
<input name="email" type="text" value="some data">
<input name="send" type="submit" value="send">
</form>
we need to see your code also to make it easier, especial this array thing
You cannot do a post and a get in the same form you even said that in your question.
You have to either:
Endophage:
If it's a PHP array, just store it in a session.
This worked great. Obviously, I'm showing my web development greenness here as I didn't really consider using a session.
You can set GET vars by changing URL:
<form action="foo.php?getvar=15" method="POST">
<input name="postvar">
</form>
For dynamic GET vars I believe you need Javascript.
GET parameters go in the action url, POST parameters in the form's inputs
<form method="post" action="/somepage.php?get=parameters&are=here">
<input type="text" name="postParameter" value="this value will be sent as POST">
... etc
</form>