hi, i am a teacher. i have a list of students in my MySQL table. How to retrieve their names one by one, and while doing that there will be a text box to put their marks in.
geo007
0
Newbie Poster
Recommended Answers
Jump to PostThis should get you started in the right direction.
<select> <?php $result = mysql_querey($query,$con); while($row=mysql_fetch_assoc($result)){?> <option value="<?=$row["student_id"];?>"><?=$row["student_id"];?> - <?=$row["student_name"];?></option> } ?> </select>
Jump to PostTo start out with your error checking should look something more like
$con = mysql_connect("localhost","root",""); mysql_select_db("exam", $con) or die('could not connect: '.mysql_error());
Next I honestly hope you're merely omitting the password out of mysql_connect() as most put in asterisks or x's to represent they are adding it …
All 5 Replies
aralll
0
Newbie Poster
geo007
0
Newbie Poster
Nyight
10
Junior Poster in Training
geo007
0
Newbie Poster
Nyight
10
Junior Poster in Training
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.