Welcome Guest, Not a member yet? Register   Sign In
[solved]Strange problem with my retrieval record function:
#3

[eluser]brucebat[/eluser]
Thankyou for your time!

Ok heres the view but I have a feeling it is not that because why would the 3rd record displayed on the view work and the rest don't?


Code:
<?php
                            //if there are nor records associated with that user then inform user
                            if ($user_records == 0)
                            {
                                echo '<tr>';
                                echo '<th>','No Records','</th>';
                                echo '</tr>';
                            
                            }
                            else
                            {
                                foreach ($user_records as $row)
                                {
                                    //create a table row
                                    echo '<tr>';
                                        //procedure id
                                        echo '<td>';
                                            echo $row->procedure_id;
                                        echo '</td>';
                                        
                                        //file link
                                        //if no file
                                        if ($row->edocument == NULL)
                                        {
                                            echo '<td>';
                                                echo "No file";
                                            echo '</td>';
                                            
                                            
                                        }
                                        //print link for file
                                        else
                                        {
                                            echo '<td>';
                                                echo '<b>',anchor('../records/'.$row->edocument, 'View File'), '</b>';
                                            echo '</td>';
                                        }
                                            
                                        //view record
                                        echo '<td>';
                                            echo form_open ('control_panel/view_record');
                                            echo '&lt;input name="procedure_id" type="hidden" value="', $row-&gt;procedure_id,'">';
                                            echo form_submit('view','View');
                                            echo form_close();
                                        echo '</td>';
                                        
                                        //update record
                                        echo '<td>';
                                            echo form_open ('control_panel/update_record');
                                            echo '&lt;input name="procedure_id" type="hidden" value="', $row-&gt;procedure_id,'">';
                                            echo form_submit('update','Update');
                                            echo form_close();
                                        echo '</td>';
                                        
                                        //standard users cannot delete only admins!
                                        
                                    echo '</tr>';
                                
                                }
                                
                            }
                            
                            ?&gt;


Messages In This Thread
[solved]Strange problem with my retrieval record function: - by El Forum - 07-31-2011, 12:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB