RE: Help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> Hi
>       I developed a html form in which I have text box and combo
> box. Now my
> problem is I have to pass the values of this page to another
> page. How can i
> pass the values/variables to next page using href
> Kindly help me
> Thanks
> Suma

As you've posted to a PHP list I will assume your second page is a PHP page.

Set your FORM action to the second page ie:

<FORM name="myForm" method="POST" action="page2.php">
  <INPUT type="TEXT" name="field1">

Then within page2.php all the form fields will be available in the $_POST
array.

$field1 = $_POST['field1'];

You can also use GET in place of POST.

As for using href, well this isn't a form option as far as I am aware. If
you wish to subsequently pass variables using href:

<a href="pagex.php?var1=val1&var2=val2">Link Text</a>

--OR--

<?php
	echo "<a href=\"pagex.php?var1=$var1&var2=$var2\">Link Text</a>";
?>

HTH
Graham

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux