Jump to content

Passing variables to another page


markspec87

Recommended Posts

I have a whois checker that stores the domain in $domain.

When they click order i want the php page to pass the variable $domain to the order page so it can be display. "you are purchased the domain $domain"

I know this is probably really simple but i dont know how to do it.

thanks :)
Link to comment
https://forums.phpfreaks.com/topic/15148-passing-variables-to-another-page/
Share on other sites

it isnt using a form.

example: www.terra-army.com/whois/whois.php

Im trying to get it so when they click available, it takes them to the ordering page and passes on the domain they want registered (stored in $domain)

source code for script - www.terra-army.com/whois/whois.txt
You can try making the 'available' button redirect to another php script, with some get data that contaisn the url.  Like
pooppie.com      TAKEN
pooppie.net        AVAILABLE << buy.php?domain=pooppie.net
pooppie.org        AVAILABLE << buy.php?domain=pooppie.org
pooppie.info      AVAILABLE << buy.php?domain=pooppie.info

And then have buy.php extract the get key domain.

EDIT:
Looking at the sourcecode, doesn't it already do that?

[code=php:0]       
echo "<tr><td>$domain</td><td><p class='available'><a href='/orderdomain.php?id=$domain'>AVAILABLE</a></p></td></tr>";
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.