<select name="school_name"> <option value="<?php echo $row[0];?>"> <?php $all= new student(); $all->selectSchool();?> </option> </select> //php class public function selectSchool() { $sch=mysqli_query($this->conn,"select * from school "); while ($row = mysqli_fetch_array($sch)) { echo $row[1]; } }
Quote:The idea is that there are two tables for students data and the other for school data. When entering student data we select a school from the school table. > there are two problems how to save these choices in the application table and the other problem The names of the schools to be selected > appear in the same row.
Quote: echo "<option> $row1[1] </option>";
echo "<option> $row1[1] </option>";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)