markspec87 Posted July 20, 2006 Share Posted July 20, 2006 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 :) Quote Link to comment https://forums.phpfreaks.com/topic/15148-passing-variables-to-another-page/ Share on other sites More sharing options...
ChaosXero Posted July 20, 2006 Share Posted July 20, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/15148-passing-variables-to-another-page/#findComment-61020 Share on other sites More sharing options...
markspec87 Posted July 20, 2006 Author Share Posted July 20, 2006 it isnt using a form.example: www.terra-army.com/whois/whois.phpIm 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 Quote Link to comment https://forums.phpfreaks.com/topic/15148-passing-variables-to-another-page/#findComment-61049 Share on other sites More sharing options...
Picatta Posted July 20, 2006 Share Posted July 20, 2006 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.netpooppie.org AVAILABLE << buy.php?domain=pooppie.orgpooppie.info AVAILABLE << buy.php?domain=pooppie.infoAnd 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] Quote Link to comment https://forums.phpfreaks.com/topic/15148-passing-variables-to-another-page/#findComment-61052 Share on other sites More sharing options...
markspec87 Posted July 20, 2006 Author Share Posted July 20, 2006 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 :) Quote Link to comment https://forums.phpfreaks.com/topic/15148-passing-variables-to-another-page/#findComment-61086 Share on other sites More sharing options...
DaveLinger Posted July 20, 2006 Share Posted July 20, 2006 <?php$domain = $_GET['id'];echo "Buying $domain";?> Quote Link to comment https://forums.phpfreaks.com/topic/15148-passing-variables-to-another-page/#findComment-61088 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.