General developer forum

How to get login form and How to get course names in front page?

 
Picture of Rajakumar Jillella
How to get login form and How to get course names in front page?
 

I'm using Moodle 3.2 version.

I have tried to get the course names in front page.

But, mysql queries are not working in front page.

Here is my code.


<?php

mysql_connect("localhost", "root", "");

mysql_select_db("mydbname");

$data =mysql_query("SELECT * FROM mdl_course WHERE id != 1");

while($course = mysql_fetch_row($data)){

echo $result = $course['fullname'];

}

?>



How can i get list of courses except first course.

 
Average of ratings: -