You are here: Sending two fields via a form « PHP Programming Language « IT news, forums, messages
Sending two fields via a form

Posted by Paul Morrison on 03/19/06 19:15

Hi,

I am trying to create an option to vote on a subject. I have created a form
like so:

<form method="get" action="place_vote.php">
<b>
Please place your vote for this article<p>
<input type="radio" name="vote" value="1"> 1 &nbsp&nbsp Worst
<br />
<input type="radio" name="vote" value="2"> 2
<br />
<input type="radio" name="vote" value="3"> 3
<br />
<input type="radio" name="vote" value="4"> 4
<br />
<input type="radio" name="vote" value="5"> 5 &nbsp&nbsp Best
<br />
<br />
<input type="submit" value="Vote">
</b>
</form>

However, I also want to send the value of the title of the article from the
form. I added a new input

<input type="hidden" name="article" value=$_GET['title']>

but using the title like this done not work. I know that this GET call does
work because further up in the code I do the following and it works fine:

<?php
include ("phpFunctions.inc");
$title = $_GET['title'];
echo("<title>Article: $type</title>");
?>

The problem is that it sends article=%24title rather than the correct title.
I dont know why this wont work, so any help would be much appreciated!

Cheers,

Paul

 

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

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