Re: $_POST trouble with html form
| From: | Adam Bregenzer | Date: | Sun, 08 Feb 2004 19:04:14 +0000 |
| Subject: | Re: $_POST trouble with html form | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177165@lists.php.net to get a copy of this message | ||
On Sun, 2004-02-08 at 13:58, Paul Furman wrote:
> OK thanks, I made this:
>
> <?php
> # jpeg-comment-public.php
> include ("C:/_Paul/web/phplib/action/jpeg-comment.php");
> ?>
>
> but now the hidden one isn't aware of any variables.
>
> "Forbidden
> You don't have permission to access
> Notice: Undefined variable: thumb_num in
> C:/_Paul/web/phplib/action/jpeg-comment.php on line 4
Where are these variables coming from? The action in your form should
be a url that points to the script you want to process the form. In
that script you access the form variables by $_POST['variable_name'].
IE:
form.html:
<form method="post" action="process.php">
<input type="text" name="comment" />
</form>
process.php:
<?php
echo $_POST['comment'];
?>
--
Adam Bregenzer
adam@bregenzer.net
http://adam.bregenzer.net/