Any body help me.
I am getting Notice: A session had already been started - ignoring session_start() in C:\xampp\htdocs\ramu\Online Admission\multicand.php on line 78

<table class="table table-condensed">
        <thead>
            <tr>
                <th>S No</th>
                <th>Student Name</th>
                <th>Standard</th>
                <th>branch</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
                    <?php
$candarr=explode(",",$cand_id_mul);
$count=count($candarr);

for($i=0;$i<$count;$i++){
$candunique=$candarr[$i];


$rt=mysql_query("select * from  candidate where cand_id='$candunique'")or die(mysql_error());
$count_rt=mysql_num_rows($rt);
while($row_rt=mysql_fetch_array($rt))
{

?>

            <tr>
                <td><?php echo $i;    ?></td>
                <td><?php echo $row_rt['first_name'];  ?></td>
                <td><?php echo $row_rt['standard'];  ?></td>
                <td><?php echo $row_rt['branch'];  ?></td>
                <td>
    <ul class="pager">
<li class="previous">
<?php 
session_start();
$_SESSION['candunique']=$candunique;


  ?>
    <li><a href='preview.php?cand_id=<?php echo $candunique ?>' onClick="return confirm('Are you sure you want to View?')">View</a></li>
</li>
</ul>

            </tr>
                            <?php } }?>

        </tbody>
    </table>

I have modified my code,
I am passing only last id in database,
i want click on view linkd means particular id should be goes to preview page. any body help me

<table class="table table-condensed">
        <thead>
            <tr>
                <th>S No</th>
                <th>Student Name</th>
                <th>Standard</th>
                <th>branch</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
                    <?php
$candarr=explode(",",$cand_id_mul);
$count=count($candarr);

for($i=0;$i<$count;$i++){
$cand_id=$candarr[$i];


$rt=mysql_query("select * from  candidate where cand_id='$cand_id'")or die(mysql_error());
$count_rt=mysql_num_rows($rt);
while($row_rt=mysql_fetch_array($rt))
{

?>

            <tr>
                <td><?php echo $i;    ?></td>
                <td><?php echo $row_rt['first_name'];  ?></td>
                <td><?php echo $row_rt['standard'];  ?></td>
                <td><?php echo $row_rt['branch'];  ?></td>
                <td>
    <ul class="pager">
<li class="previous">
<?php 

$_SESSION['cand_id']=$cand_id;

  ?>
    <li><a href='preview.php?cand_id=<?php echo $cand_id; ?>' onClick="return confirm('Are you sure you want to View?')">View</a></li>
</li>
</ul>

            </tr>
                            <?php } }?>

        </tbody>
    </table>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.