Re: Form containing 2 menus not returning anything

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2004-10-23 at 10:01 -0400, Ken Tozier wrote:
> I created an html form comprised of two menus but when the action 
> method for the form calls my "handler.php" script, neither of the menu 
> variables contain anything. Could someone point out what I'm doing 
> wrong?
> 
> Thanks,
> 
> Ken
> 
> ----------------------------------------
> 
> Here's the relevant html:
> <form action="handler.php" method="post" name="select_view_form">
> 	<table width="90%" border="0" cellspacing="0" cellpadding="0" 
> align="center">
> 		<tr>
> 			<td class="labelTextBold" width="100px">Publication:</td>
> 			<td class="labelText">
> 				<select name="publication" onChange="MenuSubmit();">
> 					<option value="none">none</option>
> 					<option value="1">Ashland TAB</option>
> 					<option value="2">Canton Journal</option>
> 			</td>
> 		</tr>
> 		<tr>
> 			<td class="labelTextBold" width="100px">View:</td>
> 			<td class="labelText">
> 				<select name="view" onChange="MenuSubmit();">
> 					<option value="none">none</option>
> 					<option value="1">Pub Status</option>
> 					<option value="2">Pub Notes</option>
> 				</select>
> 			</td>
> 		</tr>
> 	</table>
> </form>
> 
> And here's the PHP handler script:
> <?php
> 	if ($view)
> 	{
> 		echo $publication."\n".$view;
> 	}
> 	else
> 	{
> 		echo "no values supplied";
> 	}
> ?>
> 

Not sure where you learned how to handle form posts, but you might want
to spend some time reading the PHP site, specifically looking at how
global variables work.

Try changing $view to $_POST['view'];

-Robby

-- 
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | robby@xxxxxxxxxxxxxxx
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux