Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-07-2007, 04:26 AM   #1 (permalink)
tableman
Junior Member
 
Join Date: Aug 2006
Posts: 9
Default pass integer from url to another url

I am trying to get $_GET['subid'] to transfer a variable six digit integer from one url to another.

The process is like this:

A link on a site not mine is clicked opening my page whose url looks like this:

http://abcwebsite.php?subid=xxxxxx

where xxxxxx represents a variable integer of 6 varying digits with no spaces or other characters, but I don't control what the digits are.

Then a link on my page is clicked and another website page not mine opens looking like this:

http://xyzwebsite.htm?source=

source= needs to take on the value of subid.

When I try this:

Code:
<?php header ("location:http://xyzwebsite.htm?login=apin&source=". (int)$_GET['subid']); ?>

the url shows source=0.

When I try this:

Code:
<?php header ("location:http://xyzwebsite.htm? login=apin&source=".(htmlentities)$_GET['subid']); ?>

the page will not open.

When I try this:

Code:
<?php header ("location:http://xyzwebsite.htm? login=apin&source=".$_GET['subid']); ?>

the url shows no value for source=.

When I try this:

Code:
print '<meta http-equiv="refresh" content="0;URL=http://xyzwebsite.htm?login=apin&source=?'.(int)$_GET ['subid'].'">';

the url shows source=%3F0

On the same page, the following is working fine to capture the value of subid for inclusion in an email:

Code:
<input type="hidden" name="subid" value="<?php echo htmlentities($_GET['subid']); ?>" />

I just can't get anything to work for url to url.
tableman is offline   Reply With Quote
Sponsored Links
Old 04-09-2007, 07:30 PM   #2 (permalink)
shedokan
Junior Member
 
Join Date: Apr 2007
Posts: 36
Default Re: pass integer from url to another url

maybe you can download a script that creates it automatic you can find one here:
Click counter and download counter

this script also have a counter that you can see how much time the url was accesed try it I have tried it it work fine and easy to install and no database is needed and also you can back up it
shedokan is offline   Reply With Quote
Old 04-09-2007, 11:40 PM   #3 (permalink)
shedokan
Junior Member
 
Join Date: Apr 2007
Posts: 36
Default Re: pass integer from url to another url

or you can use a script that uses for make tiny url's but it's also a good script or redirect from one url to another
shedokan is offline   Reply With Quote
Old 04-10-2007, 12:27 AM   #4 (permalink)
shedokan
Junior Member
 
Join Date: Apr 2007
Posts: 36
Default Re: pass integer from url to another url

http://www.shedokan.web-space.ws/short_url/?QUPRQ

Sorry I forgot to put the link
shedokan is offline   Reply With Quote
Old 04-18-2007, 04:41 AM   #5 (permalink)
tableman
Junior Member
 
Join Date: Aug 2006
Posts: 9
Default Re: pass integer from url to another url

Thanks for your input, shedokan.

I tried the link you posted, but it did not open.

The solution turned out to be that I had to send the value to the separate php file first:

<a href="http://abcwebsite/separate.php/?subid=<?php echo ($_GET['subid']); ?>

Then the value can be sent to the next url from abcwebsite/separate.php:

<?php header ("location:http://xyzwebsite.htm? login=apin&source=".$_GET['subid']); ?>

Now it works from url to url.
tableman is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 11:04 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums