Jump to content

Archived

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

markspec87

Passing variables to another page

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 :)

Share this post


Link to post
Share on other sites
Are you using a form? If so, when they post the form a variable called '$_POST['domain']' should be accesible from the page you post to.  If that doesnt work, can you give a little more detail/post significant code?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
that file doesnt exist i put that there becuase thats what im looking to do.

You say "And then have buy.php extract the get key domain"

how do i do that? thats what i want to know :)

Share this post


Link to post
Share on other sites

×

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.