Jump to content

combobox selection problem


plodos

Recommended Posts

<form>
<select name="contact">

<option value="List">List</option>
<option value="Plen">Plen</option>

</select>


<!-- if the variable "List" is sent then display the field -->

<?php if(isset($_GET['List'])){?>

<td>Code</td>

<td>
<input name="add list" type="text" id="add list" value="<?php echo $_GET['add list'];?>" size="28"/></td> 

<?php ;}?>

</form>

 

If the user select the "List" from the combobox, From will add "add list" input field, this must be visible/appeared in the form...

 

If user select "Plen", there is no need to show "add list" field...

 

You understood what I mean :)

 

But this code is not working, I didnt do it....How can do it?, Who knows the true code..Pls help me

Link to comment
Share on other sites

thnx for urgent reply....but I test it, nothing is changed. Still same problem.....

 

<form>
<select name="contact">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">4</option>
<option value="4">4</option>
</select>

<?php if(isset($_GET['1'])){?>

<td>Code</td>

<td><input name="add list" type="text" id="add list" value="<?php echo $_GET['add list'];?>" size="28"/></td> 

<?php } ?>
<!-- ****************************************** -->
<?php if(isset($_GET['2'])){?>

<td>Modeeee</td>

<td><input name="add list asd" type="text" id="add list asd" value="<?php echo $_GET['add list asd'];?>" size="28"/></td> 

<?php } ?>

.....
....
....
....

 

When the user select something from the combobox, Form otomaticly will add extra field or will change the field...

I need that...but How :S

Link to comment
Share on other sites

<form>
<select name="contact">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">4</option>
<option value="4">4</option>
</select>

<?php if($_GET[contact]=="1"){?>

<td>Code</td>
<td><input name="add list" type="text" id="add list" value="<?php echo $_GET['add list'];?>" size="28"/></td> 

<?php } ?>
<!-- ****************************************** -->
<?php if($_GET[contact]=="2"){?>

<td>Modeeee</td>
<td><input name="add list asd" type="text" id="add list asd" value="<?php echo $_GET['add list asd'];?>" size="28"/></td> 

<?php } ?>
.....
....

 

And

<?php if($_GET[contact]=="1"){?>

I used this code, nothing is changed...

Who knows the solution way....:S

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.