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

Posted by Utopar on 12/23/07 13:26

On Dec 22, 12:38 pm, Carla Fong <carla.xspamx.f...@verizon.net> wrote:
> Utopar wrote:
> > 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();
> > ?>
>
> Ah, I think I see....
>
> So, when I put that <?php TestPhp();?> inside the action= quotes, I'm
> not calling the function as a result of the action click, we're just
> inserting whatever text that function returns into the 'action'
> parameter at the time the 'action' item is first parsed - is that right?
>
> Thanks for the insight
>
> Carla
> Just when I figured out how to put the toothpaste back in the tube, they
> put stripes on it!- Hide quoted text -
>
> - Show quoted text -

You have it.

 

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

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