Stifler Posted March 31, 2006 Share Posted March 31, 2006 I have a text box for the domain name and a drop down box for the TLD (domain extension)I want to pass on the text box value and the drop down value onto the next page that the person gets sent to which is a URL.the URL will look something like this[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]/order/orderwiz.php?submit_domain=register&domains[]=register|DOMAIN|TLD&submit=DOMAIN = domain name being registeredTLD = top level domain Ex: .com, .net, .org[/quote]Therefore both variables will have to be into the url..How would I go about coding this? Would I need 1 page to forward to the final result? or would I be able to put the php on the page with the form and have it directly forward to the results page.Thankyou for the help :D (ahead of time) Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 31, 2006 Share Posted March 31, 2006 Something like this?[code]<?phpif(isset($_GET['dname']) && isset($_GET['dtld'])){ $dname = $_GET['dname']; $dtpl = $_GET['dtld']; echo "Your domain name is: <b>" . $dname . $dtpl . "</b><br /><br />";}?><form name="dOrder" action="<?php $_SERVER['PHP_SELF']; ?>" method="get">Domain Name: <input type="text" name="dname" /> tld: <select name="dtld"><option value=".com">.com</option><option value=".co.uk">.co.uk</option><option value=".biz">.biz</option><option value=".net">.net</option><option value=".org.uk">.org.uk</option></select></form><input type="button" name="submit" value="Order Domain" onClick="document.dOrder.submit()"/>[/code] Quote Link to comment Share on other sites More sharing options...
Stifler Posted March 31, 2006 Author Share Posted March 31, 2006 [!--quoteo(post=360443:date=Mar 31 2006, 01:54 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Mar 31 2006, 01:54 PM) [snapback]360443[/snapback][/div][div class=\'quotemain\'][!--quotec--]Something like this?[code]<?phpif(isset($_GET['dname']) && isset($_GET['dtld'])){ $dname = $_GET['dname']; $dtpl = $_GET['dtld']; echo "Your domain name is: <b>" . $dname . $dtpl . "</b><br /><br />";}?><form name="dOrder" action="<?php $_SERVER['PHP_SELF']; ?>" method="get">Domain Name: <input type="text" name="dname" /> tld: <select name="dtld"><option value=".com">.com</option><option value=".co.uk">.co.uk</option><option value=".biz">.biz</option><option value=".net">.net</option><option value=".org.uk">.org.uk</option></select></form><input type="button" name="submit" value="Order Domain" onClick="document.dOrder.submit()"/>[/code][/quote]well the URL that it forwards to takes the information they put into the form and processes it into the order form.so how would i get the variables $dname and $dtpl put into where i put it - in the code below and then forward to the fully parsed URL[code]/order/orderwiz.php?submit_domain=register&domains[]=register|$dname|$dtpl&submit=[/code] Quote Link to comment 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.