Chris
shares 17 years ago
And how can I make that activate when someone clicks on a link?
Have the link go to the PHP file that has that in it. If you want it to happen when someone clicks a link without loading a new page, then..
I'm guessing it something similar to this Proxy form submit, but I'm not sure how it works.
pastie.org/225177
Oh, yeah, and that brings up another question. I see that you use single quotes instead of double quotes inside the page() funtion
But what do you do to represent single quotes, like in javascript?
Do you mean nesting quotes? Use backslashes. " \"quoted text\" "
So, would I structure this function like index.php or like class.redirect.php?
What exactly are you trying to do?
Just what you told me to do. But it looks like, from http_post_data, that I'm going to have to have a function that receives variables.
How would I PHP file I can send data to?
No, I mean, what are you trying to do with this PHP file? It doesn't have to be extremely complicated to accept POST data.
You know the twitter link? I want to do that, but for Plurk. And I can only do that with POST data
Then what does PHP have to do with anything? You can do that with AJAX.
Alright, so I put that code in a plurk() function inside script tags, and then called that with onClick in the <a> tag.
But, still not working. Is there anything wrong with that function or the way I did it?