Re: PHP Syntax Help - Check?

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

 



On Thu, Feb 25, 2010 at 4:22 PM, Rick Dwyer <rpdwyer@xxxxxxxxxxxxx> wrote:
> OK... external function... that would explain why I could not locate it.
>
> Let me get right to the problem I am having with this code as someone may be
> able to help directly.
>
> I have a link on a page that opens a contact form.  The link is
> mypage.php?my_id=5
>
> So on mypage.php, I capture this value with:
> $my_id=$_GET['my_id'];
>
> I understand this much.  But when the end user submits this contact form
> they do so to formcheck.php and if formcheck.php sees a required field is
> blank, it throws it back to mypage.php with an alert.  BUT, I lose the value
> of the variable $my_id.  SO, I created a hidden field on mypate.php with
>  value="<?php echo $my_id; ?>" and on formcheck.php, I added $my_id =
> $_Post['my_id'];
>
> However, when formcheck.php returns me to mypage.php, $my_id is still blank.

Use the right varialble for the method you're using, so if you're
posting, use $_POST, if you're getting use $_GET..

Going by your example, $_GET is what you should probably be using,
this is usually the default method if no method is specified on the
form tag.

Cheers

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