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
https://forums.phpfreaks.com/topic/115332-combobox-selection-problem/
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

<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

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.