You are here: Re: post to self? « All PHP « IT news, forums, messages
Re: post to self?

Posted by Adam on 09/12/06 14:32

On Sat, 02 Sep 2006 20:08:30 GMT, Jon Pike wrote:

>if test.php is this file:
>
>
><?php
> $lang = $_POST["lang"];
> print $lang;
>?>
>
>
>
><form method=post action=test.php>
><input type=image src=engFlag.jpg name="lang" value=en>
><input type=image src=fraFlag.jpg name="lang" value=fr>
></form>
>
>
>
>Why won't it print $lang; after having one of the images clicked?

Lack of double quotes?

<form method="post" action="test.php">
<input type="image" src="engFlag.jpg" name="lang" value="en">
<input type="image" src="fraFlag.jpg" name="lang" value="fr">
</form>

... and .. I think you need single quotes inside the parentheses:

$lang = $_POST['lang'];

Adam.

 

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

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