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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.