basically i want to make a simple page and it has 2 field boxes, value 1 and value 2. then i went a submit button that opens a page going to www[.]website[.]com/value1=x&value2=x how could i go about making something like that. thanks in advance.
<form action="linktothepage.php" method="get"> <input type="text" name="value1" /> <input type="text" name="value2" /> <input type="submit" /> </form> Code (markup): Php is not needed until you want to get the values back to the page <? $value1 = $_GET[value1]; $value2 = $_GET[value2]; echo $value1.$value2; ?> Code (markup): I could more in-depth if tell me the page names
alright, this is all i really need. i got it figured out but all i need is this. $variable = $_GET[variable]; header( 'Location: http://google.com/$variable' ) ; how do i correctly put variable, say index.html in there. cause when i do it this way, it literally goes to google.com/$variable
try this <? $variable = $_GET['variable']; header( 'Location: http://google.com/'.$variable ) ; ?> Code (markup): a link would be http://site.com/page_with_code.php?variable=index.html it would take you to google.com/index.html
what i want is a way to go to .. site.com/page=1&author=1&randomcode i tried your example header( 'Location: http://google.com/'.$variable ) ; like so header( 'Location: http://google.com/page='.$variable '&blahblahsomerandomcodehere&author='.$variable '&randomcode' ) ; but.. that didn't work.
I lost you, you keep changing what your trying to do! Last effort $page = $_GET[page]; $author= $_GET[author]; $random= $_GET[random]; header( 'Location: http://google.com/?page='.$page.'&author='.$author.'&randomcode='.$random.' ) ;