Jump to content

sending POST withought a form


PC Nerd

Recommended Posts

hi,

 

Im looking for a way to send data to a page as POST, but withought having to use a form.  Eg GET is in the URL, but i want the URL to be withought all that data. Is it possible to send the POST this way, or isit only ann option with forms?

 

thanks

Link to comment
Share on other sites

you could.... use a form like this

<form>
<input type="hidden" name="somename" value="somevalue">
<input type="image" src="images.php?id=<?php echo $id; ?>">
</form>

 

And then create a page called I don't know images.php that will generate an image that looks like a link using GD.

 

God speed little doodle.

 

 

Link to comment
Share on other sites

ok, thankx

 

im not sure what your type = 'image' means,. ive never used it in a form before.

 

all i want to do is send data from page a to page b, exactly like using GET, but i want it to be POST.  Its simply to "clean" the URL of the page.

 

 

thanks

Link to comment
Share on other sites

www.php.net/cURL

 

You may want to look into curl, although that is for mainly retrieving data from a site.

 

Another way is to use a hidden form which is submitted via javascript.

 

Finally why not just use Sessions?

 

Those are the only ways I know.

Link to comment
Share on other sites

if you want to use the idea of get method but you dont want to show the query string you canhave the  headerfile that after passing the query string you will redirect the the user from the page without the qstring u dont want to show 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.