You are here: Re: passing radio button value « All PHP « IT news, forums, messages
Re: passing radio button value

Posted by J.O. Aho on 04/01/07 07:19

Thad wrote:
> PHP page 1: I have two radio buttons...
> ---snip---
> <input type="radio" name="image_choice" value="lp13-web-wild165c"
> style="width: 35px;"/>LP-13<br />
> <input type="radio" name="image_choice" value="lp14-web-wild289c"
> style="width: 35px;"/>LP-14<br />
> ---snip---
>
> PHP page 2: Problem...on page 2, how would I show which button was pressed?
>
> Would it be....
> ---snip---
> <?php echo $_SESSION['image_choice'];
> ?>
> ---snip---

$_SESSION is used for values you have stored in the "session cookie", while
things from a form is usually seant and then stored in $_POST (or $_GET, and
both $_GET and $_POST can be accessed from $_REQUEST).


> What I am looking to get as a result is lp13-web-wild165c or
> lp14-web-wild289c to be printed to the screen.

<?php echo $_REQUEST['image_choice']; ?>


--

//Aho

 

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

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