Jump to content

PHP POST&GET Combined


miffe

Recommended Posts

I want to make a form and instead of using a button with the standard submit... use a graphic instead that will send some variables in the URL (to be GET'ted at the next page) and also send the variables in the post...I could likeways just use hidden boxes with the variables and no need to use the URL so all is sent through post, but I would like the know the real way of how to do this please..thanks- miffe

Link to comment
Share on other sites

What exactly do you want then? Both GET and POST can be used at the same time :) Just create a form that POSTs the data to the next page, but in its action some GET variables defined. Example:

<form name="myForm" action="someprocessor.php?data1=something" method="post"><input type="text" name="data2" value="" /></form>

Would result in both $_GET['data1'] and $_POST['data2'].Or to stay variable: $_REQUEST['data1'] and $_REQUEST['data2']

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...