I have table for users and that table contains record of the user. So one user can have multiple records. Thankfully in my case one person can have not more than 3 records.
The table name is courses and the records include details (this makes it 6 elements in each row)of the courses that the faculty can edit.
example:
when i pull the record to display the code i use is
$connect...
$query= "select * from table courses where name = 'faculty_name'";
$result= mysql_query($query);
$row = mysql_fetch_array($result)
now how do i insert the values for instance there are 2 rows for the faculty in a different variable.
like
$row1_courseno
$row1_coursename
$row1_info1
$row1_info2
then
next row is in diff variable
$row2_courseno
$row2_coursename
$row2_info1
$row2_info2
$length = sizeof($row) gave me 8
so when i tried
$row1_courseno = $row[0]
$row1_coursename =$row[1]
$row1_info1 = =$row[2]
$row1_info2 =$row[3]
$row2_courseno = $row[4]
$row2_coursename =$row[5]
$row2_info1 =$row[6]
$row2_info2 =$row[7]
It is not inserting row two elements in $row2_coursename it just reads the first row and inserts the same value.
can any one help me how to go about it?
thanks in advance