28, May 2012

Post to a page - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Post to a page
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Post to a page  (Read 1116 times)
Magus computerista
General's Aide
***
Gender: Male
Posts: 129
86 credits
Members referred : 0



« on: Sep 20, 2005, 08:01:13 pm »

Is there any function that can used to post some variables to a page?
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Sep 20, 2005, 08:05:03 pm »

The only way to post variables is by using CURL. I suppose that you want to redirect the user to a page that will use these post vars.

To do this here is the way. Create a page with this code :

Code:
<?php
 $page_to_post 
'site.com/url';
?>

<body onload=frm1.submit();>
<form method=post action="<?=$page_to_post?>" name=frm1>
<?php
foreach ( $_REQUEST as $var => $val )
{
 echo 
'<input type="hidden" name="$var" value="$val">';
}
?>

</body>

So any time you want to redirect the users, just redirect them to this page using the variables you want

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Magus computerista
General's Aide
***
Gender: Male
Posts: 129
86 credits
Members referred : 0



« Reply #2 on: Sep 20, 2005, 08:07:07 pm »

Hmm. So easy to implement, but so hard to think of.

Thanks a lot Nikolas

Smiley
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=411
Tags : curl Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Post to a page
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 02:18:04 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.