You are here: Re: [newbie] How to avoid FFox's "The page you are trying to view..."? « PHP Programming Language « IT news, forums, messages
Re: [newbie] How to avoid FFox's "The page you are trying to view..."?

Posted by Vincent Delporte on 12/11/06 20:45

On Mon, 11 Dec 2006 21:36:16 +0100, Vincent Delporte
<justask@acme.com> wrote:
>Yup, looks like that's the solution. Thanks guys for the great help.

So here's what it looks like:

-------------
<?php

//very first connection?
if(!isset($HTTP_COOKIE_VARS["PHPSESSID"])){
//Already shown form or not?
if ( $_SERVER['REQUEST_METHOD']=='GET' ) {
?>
<form action=<?php echo $PHP_SELF; ?> method=POST>
<input type=submit name=mybutton value="Click
me!">
</form>
<?php
} else {
session_start();
//here, handle form
header("Location: " . $PHP_SELF);
}
} else {
print "Form has been shown and handled, and sessionID created:
done!";
}

?>
-------------

Next, I'll take a look at the different templating systems (CakePHP,
Savant, Smarty, etc.) to separate logic and display.

Thanks.

 

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

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