Exemple #1
0
        <!--categories-->
        <p><br /><br />
        What subjects are you comfortable teaching?</p>
        <br />
        <?php 
$usrid = $sf_user->getRaykuUser()->getId();
$usrdataq = mysql_query("SELECT * FROM tutor_profile WHERE user_id='" . $usrid . "'") or die(mysql_error());
$usrdata = mysql_fetch_array($usrdataq);
?>
        <input type="hidden" name="usrid" id="usrid" value="<?php 
echo $usrid;
?>
" />
        <div class="categories">
            <?php 
$courses = CoursesPeer::getAllForCategoryStatus(1);
$e = 1;
$course = $usrdata['course_id'];
$course = explode("-", $course);
foreach ($courses as $oneCourse) {
    if (in_array($oneCourse->getId(), $course)) {
        $checked = 'checked';
    } else {
        $checked = '';
    }
    echo '<label>';
    echo '<input name="catcheck[]" type="checkbox" value="' . $oneCourse->getId() . '" ', $checked, ' />';
    echo '<input type="hidden" name="category" id="category" value="' . $oneCourse->getCategoryId() . '" />';
    echo $oneCourse->getCourseName();
    echo '</label>';
    if ($e % 2 == 0) {