could somebody help me please!!??
i am creating an on line enrolment system for my uni project.
a user has selected a course and then has to log in on the same page.
the user is then taken to a page where their name is displayed but i also want the chosen course to be taken to the next page and displayed too.
my coding is below, and i can take course details over but only the first course in my db, not the chosen course!!!
i have tried $colname_rsCourse = "%";
and $colname_rsCourse ="";
but i still get the first course.
can somebody please help?
$colname_rsCourse = "1";
if (isset($_GET['coursename'])) {
$colname_rsCourse = (get_magic_quotes_gpc()) ? $_GET['coursename'] : addslashes($_GET['coursename']);
}
mysql_select_db($database_connEnrolment, $connEnrolment);
$query_rsCourse = sprintf("SELECT * FROM courses WHERE Name = '%s'", $colname_rsCourse);
$rsCourse = mysql_query($query_rsCourse, $connEnrolment) or die(mysql_error());
$row_rsCourse = mysql_fetch_assoc($rsCourse);
$totalRows_rsCourse = mysql_num_rows($rsCourse);
(im using php mysql and dreamweaver)
thanks in advanced 🙂