claro Posted October 24, 2011 Share Posted October 24, 2011 I can get the values of my array now, but when I put it in my queries, it fail. .Can you guys help me.. if (isset($_POST['submit'])) { $n=0; foreach ($_POST['course'] as $course) { $bigar[$n][1] = $course; $n++; } $n=0; foreach ($_POST['program'] as $program) { $bigar[$n][2] = $program; $n++; } foreach ($bigar as $part) { $course = $part[1]; $program = $part[2]; //echo $course; //echo $program; $stud = mysql_query ("SELECT * FROM vw_report_instructor WHERE user_Program = '$program' AND course_Id = '$course' ") or die (mysql_error()); if (mysql_num_rows($stud)) { while ($row = mysql_fetch_array ($stud)) { echo "<tr><td>".$row['user_Fname']." ".$row['user_Lname']."</td>"; echo "<td>".$row['course_Title']."</td>"; echo "<td>".$row['se_Yearlevel']."</td>"; echo "<td>".$row['user_Program']."</td></tr>"; } } else { echo "<table><br/><br/>"; echo "<p style = 'text-indent: 29em;'>no match found</p>"; echo "</table>"; } } Quote Link to comment https://forums.phpfreaks.com/topic/249728-i-found-it-butshowing-array-in-phpmysql/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.