Re: Problem of varibles between webpages

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

 



> Hello,
>
> For table form format ( sample ),
>
> <form method="" action="">
> <table>
> <tr><td>Your Name : </td><td><input name="name" size=30
> maxlength="60"></td></tr>
> <tr><td>Address¡G</td><td><input name="address" size=30
> maxlength="60"></td></tr>
> </table>
> </form>
>
> "name" and "address" is varible, so how can we pass these two varible
> without register_globals function ( actually it is disable ) to another
> webpage ?
>
> Many thank for your help !
>
> Edward.

Your method and action are blank.

<form method="post" action="whatever_page.php">

You need a submit button.

<input type="submit" name="add" value="Submit">

Submit will pass the vars to whichever page action is set to. The vars
will be in the $_POST array, basically $_POST['name'] and
$_POST['address'].

Whatever page action calls, you can have php check that the submit button
was executed like:

<?php
if (isset($_POST['add')):
  // whatever you want to do with $_POST['name'] and $_POST['address']
endif;
?>

-- 
--Matthew Sims
--<http://killermookie.org>

-- 
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