Re: Control GET data

From: Date: Tue, 06 Jun 2006 19:40:12 +0000
Subject: Re: Control GET data
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237501@lists.php.net to get a copy of this message
Why are you forcing the input into the GET variable or the URL string? Why not just use the post from the form variable?? As for you question... the answer is yes: make the submit button a button and onclick="javascript_function()" Javascript_function() { val1 = document.getElementbyId("lastname").value; val2 = document.getelemntById("first_name").value var url ="somepage.php?name="+val2+"_"+val1; window.location = url; } again...if you have a form, use the post variables! -Brad|****| Steffen Mazanek wrote:
Hello, I want to provide two input text fields lastname and firstname and if the user pushes the submit button the generated url should be ...?name=firstname_lastname. Is this possible and how? Thank you for helping a php newbie. Steffen Mazanek


« previous php.general (#237501) next »