|
Posted by Vince Morgan on 10/30/06 23:30
"Jonathan N. Little" <lws4art@centralva.net> wrote in message
news:61aba$4546152a$40cba7a4$11000@NAXS.COM...
> Look Vince if you want a form to actually submit the data the URL will
> change to whatever is in the ACTION property. That is just how forms
> work. If you don't go to the ACTION's url then the data is not
> transmitted. Now as I said you can give the appearance that the form is
> static by posting to yourself.
>
> //quagmire.php
> <?php
> if( isset($_POST['times']) ){
> $visits=$_POST['times'];
> $visits++;
> $msg="Welcome back, you have visited $visits time[s]";
> }
> else {
> $visits=0;
> $msg="Welcome to the Quagmire, press the Submit button";
> }
>
> ?>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> <html>
> <head>
> <title>Quagmire</title>
> </head>
> <body>
> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"
> enctype="application/x-www-form-urlencoded">
> <p><?php echo $msg; ?></p>
> <div>
> <input name="times" type="hidden" value="<?php echo $visits; ?>">
> <input type="submit">
> </div>
> </form>
> </body>
> </html>
>
>
> --
> Take care,
>
> Jonathan
> -------------------
I'm sorry I was more than a little slow getting the idea here. Your example
behaves exactly as required and I apologize for not getting the picture
earlier. Thank you very much indeed for the patience and taking the time to
provide an example Jonathan.
Highest regards,
Vince Morgan.
Navigation:
[Reply to this message]
|