Jump to content

PHP/HTML dropdown help


dlassen

Recommended Posts

Hi,

 

I am fairly new at this and was hoping to get some help on this problem:

 

I have a couple of forms on the same page: 1) a dropdown with 2 selections using the "POST" method followed by 2) a search form.

 

When I run the html, the dropdown works fine - when a selection is made the target URL is called and the POST variable 'cat' can be referenced in the target php code.

 

However, when I execute a search in the second form, the target URL for the search is NOT called - instead the first URL (from the dropdown) is called. I tried to reduce the problem to the least amount of sample code needed to reproduce the issue, which is:

 

<form  method='POST' name='cat_form' action='e107_plugins/ytm_gallery/ytm.php'>
<select class='tbox' name='cat' onchange=cat_form.submit()>
<option value='1' >Home Movies</option>
<option value='2' >Other Videos</option>
</form> 

<form action='http://tngnetwork.lythgoes.net/gdxsearch.php' method='POST' name='gdx' target='_blank'>
<input class='tbox' type='text' name='surname' size='20' maxlength='100' />
<input type='submit' value=Search >
</form>

 

Thanks in advance for any help

 

Dennis

Link to comment
https://forums.phpfreaks.com/topic/72611-phphtml-dropdown-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.