Reply to Re: Heeeeeeeeeeeeeeeeeeeeeelp ! why this programme doesn't work?

Your name:

Reply:


Posted by Carl Anatorian on 06/14/06 13:25

Mladen Gogala 写道:
> On Wed, 14 Jun 2006 21:09:17 +0800, Carl Anatorian wrote:
>
>> I want to it to show the text I enter in the input when I press the
>> 'submit' botton.But it doesn't work.
>
> Because PHP picks "name" attribute, not "id" attribute. Try with this:
> <html>
> <body>
> <?php
> if(isset($_POST['tt'])) {
> echo $_POST['tt']."<br/><br/><br/>";
> }
> ?>
> <form action=<?=$_SERVER['PHP_SELF']?> method="POST" >
> <input type="text" name="tt" />
> <input type="submit" value="submit" name="submit" />
> </form>
> </body>
> </html
>
Another one :
<?php
if($_COOKIE['hello'] != "world") {
$result = setcookie("hello","world",60*10);
}
?>
<html>
<body> <?php
if(isset($_COOKIE['hello'])) {
echo "hello !";
}
?>
</body>
</html>

I think it will show "hello !" when I access it the second time, but it
never.Why? I don't disable my browser's cookies.

[Back to original 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

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