8, September 2008

Post to a page - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ 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

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



« on: Sep 20, 2005, 09: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: 8037
41179 credits
Members referred : 3



« Reply #1 on: Sep 20, 2005, 09: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 Visit through proxy

Last blog : MIA - Where Nick and Tim
Magus computerista
General's Aide
***
Gender: Male
Posts: 129
86 credits
Members referred : 0



« Reply #2 on: Sep 20, 2005, 09: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....

Topic sponsors:
Get a permanent link here for $1.99!


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?
Sep 08, 2008, 06:08:07 AM





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!


Forum Statistics
Total Posts: 36.302
Total Topics: 7.479
Total Members: 3.907
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: phpprofit

20 Guests, 3 Users online :

6 users online today:



Readers

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