I have the following code which should work but when I search for the date every time it just displays the else condition "Sorry! We didn't find any data for your search". I can not figure out why this is not working.
if (!empty($row_searchdata['StudentID'])){ echo $output = '<h3>Data Found</h3>'; $output .= '<form name="selected" id="selected" action="'.$editFormAction.'" method="POST">'; $output .= '<input type="hidden" name="memberid" value="'.$row_studentlogin['memberID'].'">'; $output .= '<table class="table table-responsive table-condensed table-bordered table-striped table-hover">'; $output .= '<tr>'; $output .= '<th class="col-md-3 col-xs-3">Full Name</th>'; $output .= '<th class="col-md-2 col-xs-2">City/Village</th>'; $output .= '<th class="col-md-4 col-xs-4">Course</th>'; $output .= '<th class="col-md-2 col-xs-2">Subject</th>'; $output .= '<th class="col-md-1 col-xs-1">Select</th>'; $output .= '</tr>'; do { $output .= '<tr>'; $output .= '<input type="hidden" name="studentid" value="'.$row_searchdata['StudentID'].'">'; $output .= '<td class="col-md-3 col-xs-3">'.$row_searchdata['FullName'].'</td>'; $output .= '<td class="col-md-2 col-xs-2">'.$row_searchdata['CityName'].'</td>'; $output .= '<td class="col-md-4 col-xs-4">'.$row_searchdata['CourseDescriptionLong'].'</td>'; $output .= '<td class="col-md-2 col-xs-2">'.$row_searchdata['Subject'].'</td>'; $output .= '<td class="col-md-1 col-xs-1"><input name="selectrec" type="checkbox" value=""></td>'; $output .= '</tr>'; } while ($row_searchdata = mysql_fetch_assoc($searchdata)); $output .= '</table>'; $output .= '<input type="submit" class="btn btn-primary pull-right" name="submitbtn" value="Next">'; $output .= '<input type="hidden" name="MM_update" value="selected">'; $output .= '</form>'; } else { echo '<h3>Sorry! We didn\'t find any data for your search</h3>'; }; |
|
|