Jump to content

$_POST via link

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Is it possible to make a POST in PHP by pressing a link instead of a button? and then get that POST?
I tried doing this via a link but of course it didn't work.. anyone knows how to make it? Currently my website is running on $_GET but with it I can only get these:-
http://forum.codecal...n-friendly.html <- Click to see thread

but if I will be able to make a POST via a link I will be able to obtain 100% SEO friendly links.

Please help, and thanks!

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
Not that I know of, you might be able to use JavaScript to pass along values or use cookies to store information, but as far as using a link to pass along POST variables and not GET variables, I'm pretty sure it cannot be done.

#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Well then I was right, it is not possible, because I tried it but it didn't work.. but I thought that I had the code wrong, as I'm still a newbie in PHP.

Thanks I will have a look at the JavaScript thing, but I don't like using cookies.. most people disable them.

EDIT:- saw the Javascript code.. it's done either via submit or via the url (Like $_GET).. not what I actually want. but now I will try with htaccess... if unsuccessful I have to surrender and use cookies...

#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
When you say make a post do you mean get variables from a link? I'm not sure I understand but it sounds like you figured it out with GET, right?

#5
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
No, I don't want to use GET, my website uses GET already but I want it to use POST.. obviously to obtain SEF links.. but I'm trying in htaccess... when my testing site comes up again, as it's down at the moment and I don't want to mess with the original website.

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Anyways my testing site is still down, so I messed with the original website and at least I succeeded. And I used GET but the method used does not show the GET in the html thanks to htaccess.