Jump to content

double column


spanner206

Recommended Posts

hi once again im in need of help what i need is a double column one with a drop down box called type of business and one hidden one with the id, to me it would seem easier to simply code all of the options in html but the options for type of columns has been coded onto the website, i got a code sent over to me but errors are occurring so just wondering if anybody has any ideas.

		<td>Type of Business:</td>
<select name="typeofbusiness" id="typeofbusiness">
						<?php 
						$count = count($_SESSION['typeofbusiness']);
						for ($i = 0; $i < $count; $i++) {
							if($_SESSION['id'][$i]!=$_SESSION['Id']){
?>
						  <option value="<?php echo $_SESSION['id'][$i];?>" <?php if (isset($_REQUEST['typeofbusiness'])&&$_REQUEST['typeofbusiness']==$_SESSION['id'][$i]) { echo'selected="selected"'; }?>><?php echo $_SESSION['typeofbusiness'][$i];?></option> 
<?php
						 }
						 }
?> 
( ! ) Notice: Undefined variable: _SESSION in C:\wamp\www\AddLeads\addeadstemplate.php on line 248 Call Stack # Time Memory Function Location 1 0.0000 186688 {main}( ) ..\addeadstemplate.php:0

 

any help will be greatly appreciated. 

Link to comment
Share on other sites

yh my boss sent it to me heres the original code all i changed was change the name from agent to typeofbusiness.

<select name="agentIndex" id="agentIndex">
						<?php 
						$count = count($_SESSION['agents']);
						for ($i = 0; $i < $count; $i++) {
							if($_SESSION['agentsid'][$i]!=$_SESSION['current_Agent_Id']){
?>
						  <option value="<?php echo $_SESSION['agentsid'][$i];?>" <?php if (isset($_REQUEST['agentIndex'])&&$_REQUEST['agentIndex']==$_SESSION['agentsid'][$i]) { echo'selected="selected"'; }?>><?php echo $_SESSION['agents'][$i];?></option>
<?php 
}

Link to comment
Share on other sites

Well thats for listing the agents.

 

Just renaming the variablesisn't enough. You need to make sure you are setting data to the $_SESSION['typeofbusiness'] variable in order for your code to do anything to it.

 

What is it you are trying to do with the Type of Business field

Edited by Ch0cu3r
Link to comment
Share on other sites

what my boss wants is for there to be 2 different columns one id column which is hidden and one for the values e.g. in type of business there would be something like trade or somet like that he wants this done because the values are already on his websites which have id's so i can just call the the values by there ids but im just getting confused.

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.