You are here: Re: Stupid Newbie Question « PHP Language « IT news, forums, messages
Re: Stupid Newbie Question

Posted by Utopar on 12/22/07 15:34

On Dec 21, 6:49 pm, Carla Fong <carla.xspamx.f...@verizon.net> wrote:
> Hello - I'm trying to learn HTML and PHP and have hit a wall with some
> odd behavior I can't fathom. I'm pretty good with C and this just seems
> strange.
>
> <form method=POST action="<?php TestPhp();?>">
>        <tr>
>           <td> Input Prompt:</td> <td> <input type=text name="Line_1"
>                      value = "<?php echo $_Line1; ?>" maxlength=24
> </td></tr><BR>
>

When you first display the Form, and specify action= you drop into PHP
and actually call the TestPhp() function. The function runs at that
time and updates your value =After Function.

Instead, your POST action should call the original script. You already
have a way to detect that form data is present, so within that test
call the TestPhp() function to updated the value.

<?php
// a debug statement that shows $_POST is empty prior to form action
if (empty ($_POST)) echo "POST data is empty";
else TestPhp();
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация