--- Seth Willits <[EMAIL PROTECTED]> wrote:
> This might be staring straight at me, but I can't seem to figure out  
> how to reference form parameters in php code. For example:
> 
> 
> <?php
>       if ($formName["fieldName"] == "this") {
>               // do this
>       } else {
>               // do that
>       }
> ?>

I can't interpret exactly what you are trying to do, but here are some quick
examples:

get_form.html:
--------------
<form action="foo.php" method="get">
<input type="text" name="first_name">
<input type="submit">
</form>

foo.php:
--------
<p>The name supplied is <? echo $_GET['first_name']; ?>.</p>

post_form.html
--------------
<form action="bar.php" method="post">
<input type="text" name="first_name">
<input type="submit">
</form>

bar.php:
--------
<p>The name supplied is <? echo $_POST['first_name']; ?>.</p>

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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

Reply via email to