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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.