Welcome Guest, Not a member yet? Register   Sign In
How to show something on the right from a link on the left using Ajax
#6

[eluser]the_unforgiven[/eluser]
That works but am using a foreach statement and its getting the id but it';s showing all data from DB

Code:
<div id="events" class="scroll-pane">

    &lt;?php
    $query = $this->db->query('SELECT * FROM mcd_events');

    foreach ($query->result() as $row)
    {
    
    ?&gt;
        <h3>Date:&lt;?php echo date("F j, Y",strtotime($row->created_on)) ?&gt;</h3>
        
        <p><br /><a >id ?&gt;" id="linkid">&lt;?php echo $row->title ?&gt;</a></p>
        
    &lt;?php } ?&gt;

</div>
</div>
&lt;!-- content left --&gt;

&lt;!-- content right --&gt;
<div id="content-right">
    
    <h2>Events/Rideouts</h2>
    
    <div id="display">
    &lt;?php
    $query = $this->db->query("SELECT * FROM mcd_events ");

    foreach ($query->result() as $row)
    {
    
    ?&gt;
        <p>&lt;?php echo $row->description ?&gt;</a></p>
        
    &lt;?php } ?&gt;
    </div>
    <div class="clear"></div>
</div>


Messages In This Thread
How to show something on the right from a link on the left using Ajax - by El Forum - 06-30-2011, 05:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB