Welcome Guest, Not a member yet? Register   Sign In
Help with generating db driven dropdown search function
#2

[eluser]pickupman[/eluser]
First tip. Use the code button in the menu just above where you make a post to help read your code. I noticed you may have a small typo, maybe it's from pasting into the forum, but take a look below.
Code:
//View ( partial code)
<select name =“Authors” >
<option value=“all”>- By Authors-</option>
&lt;?php foreach ($Authors as $key => $items){ ?&gt;
  <option value=”&lt;?=$items[‘First_Name’] . ’ ‘. $items[‘Last_Name’]?&gt;”&lt;?php echo set_select(‘Authors’,$items[‘First_Name’] . ’ ‘. $items[‘Last_Name’]);?&gt;>&lt;?=$items[‘First_Name’] . ’ ’ . $items[‘Last_Name’]?&gt;</option>
            &lt;?php } ?&gt;
</select>
Try changing to
Code:
&lt;?php foreach($Authors as $items){?&gt;
  <option value="&lt;?=$items['First_Name']. ' ' .$items['Last_Name'];?&gt;" &lt;?php echo set_select('Authors',$items['First_Name']. ' ' .$items['Last_Name'];?&gt; > &lt;?=$items['First_Name']. ' ' .$items['Last_Name'];?&gt;</option>
&lt;?php } ?&gt;

You usually and undefined index would typically mean a field you are trying to reference in the array key does not exists. ie('First_Name / Last_Name') Make sure they are in the table you are pulling them from.


Messages In This Thread
Help with generating db driven dropdown search function - by El Forum - 04-19-2010, 03:43 PM
Help with generating db driven dropdown search function - by El Forum - 04-19-2010, 09:54 PM
Help with generating db driven dropdown search function - by El Forum - 04-20-2010, 10:38 AM
Help with generating db driven dropdown search function - by El Forum - 04-20-2010, 12:14 PM
Help with generating db driven dropdown search function - by El Forum - 04-28-2010, 09:56 AM
Help with generating db driven dropdown search function - by El Forum - 04-28-2010, 07:18 PM
Help with generating db driven dropdown search function - by El Forum - 05-08-2010, 12:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB