Click here to Skip to main content
15,890,123 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: how to deal with bool? Pin
Daniel Lieberwirth (BrainInBlack)4-May-14 10:25
professionalDaniel Lieberwirth (BrainInBlack)4-May-14 10:25 
Questionwhich distribution is best for my online project? Pin
Jassim Rahma2-May-14 12:57
Jassim Rahma2-May-14 12:57 
AnswerRe: which distribution is best for my online project? Pin
Peter Leow2-May-14 14:41
professionalPeter Leow2-May-14 14:41 
Questioncheck email is real or not? Pin
saeed rajabi30-Apr-14 5:02
saeed rajabi30-Apr-14 5:02 
AnswerRe: check email is real or not? Pin
Daniel Lieberwirth (BrainInBlack)4-May-14 10:30
professionalDaniel Lieberwirth (BrainInBlack)4-May-14 10:30 
GeneralRe: check email is real or not? Pin
xiaoqiangdiandian27-Jun-14 20:54
xiaoqiangdiandian27-Jun-14 20:54 
GeneralRe: check email is real or not? Pin
Daniel Lieberwirth (BrainInBlack)27-Jun-14 23:53
professionalDaniel Lieberwirth (BrainInBlack)27-Jun-14 23:53 
Questionneed help with php parse error Pin
Izu Great19-Apr-14 9:43
professionalIzu Great19-Apr-14 9:43 
i am working on a project and on a page i get this error.

Parse error: parse error in C:\wamp\www\RMS\comresult.php on line 143

line 143 is the last line of my code.

Please i need help.

Here is my code:

XML
<?php
include("conn.php");
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome :: Result Portal</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
    background-color: #FFF;
}
</style>
<!--[if IE]>
<script src="ie/dist/html5shiv.js"></script>
<script src="ie/dist/html5shiv-printshiv.js"></script>
<![endif-->
<script type="text/javascript">
function bk(){
location.assign(document.referrer);
}
var state = true;

function getstate(){
    return state;
    }
</script>
</head>

<body onload="print()">
<?php
                    if(isset($_GET['lev'],$_GET['sem'],$_GET['prog'],$_GET['sess'])){
        $level = $mysqli->real_escape_string(trim($_GET['lev']));
        $sem = $mysqli->real_escape_string(trim($_GET['sem']));
        $prog = $mysqli->real_escape_string(trim($_GET['prog']));
        $sess = $mysqli->real_escape_string(trim($_GET['sess']));

    $sql = "SELECT * FROM course_tb WHERE level LIKE '".$level."' AND semester LIKE '".$sem."'";
    if($result = $mysqli->query($sql)){
        if($result->num_rows > 0){

        $sel = "SELECT DISTINCT regno FROM st_result_data WHERE level LIKE '".$level."' AND semester LIKE '".$sem."' AND programme LIKE '".$prog."'";

        if($res = $mysqli->query($sel)){
            if($res->num_rows > 0){

                //$sel2 = "SELECT * FROM st_result_data WHERE regno LIKE '".$row['regno']."' AND level LIKE '".$level."' AND semester LIKE '".$sem."' AND programme LIKE '".$row['programme']."'";
            //if($res2 = $mysqli->query($sel2)){
                //if($res2->num_rows > 0){
                ?>
                    <table width="700" border="0" cellpadding="0" >
  <tr>
    <td align="center" style="border-bottom: 1px dashed #CCC;"></td>
  </tr>
  <tr>
    <td height="27" style="border-bottom: 1px dashed #CCC;">
      <table width="600" border="0" align="center" cellpadding="0">
        <tr>
          <td align="center"><h4><?php echo $level." | ".$sem; ?> SEMESTER RESULT <?php echo $sess; ?> SESSION <?php echo $prog; ?></h4></td>
        </tr>
      </table>
      <span id="regerr"></span></td>
  </tr>
  <tr>
    <td height="27" style="border-bottom: 1px dashed #CCC;"><table width="650" border="0" align="center" cellpadding="0">
      <tr>
        <td style="border-bottom: 1px dashed #CCC;">Regno</td>
        <td style="border-bottom: 1px dashed #CCC;">Name</td>
        <td style="border-bottom: 1px dashed #CCC;">
        <?php
        while($row=$result->fetch_array()){
            ?>
            <table>
            <tr>
            <td><?php echo $row['courseCode']; ?> </td>
            </tr>
            <tr>
            <td><?php echo $row['creditLoad']; ?> </td>
            </tr>
            </table>
            <?
        }
        ?>
        </td>
        </tr>
      <?php
      //while($rw2 = $res2->fetch_array()){
      ?>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <?php
      //}
      ?>
    </table></td>
  </tr>
  <tr>
    <td style="border-bottom: 1px dashed #CCC;"><table width="600" border="0" align="center" cellpadding="0">
      <tr>
        <td width="177">No of courses:</td>
        <td width="417">&nbsp;</td>
      </tr>
      <tr>
        <td>No of fail:</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><input type="button" name="button" id="button" value="Print" onclick="print()" /></td>
  </tr>
</table>
                    <?php

                //}else{

                //}
            //}else{
                //echo $mysqli->error;
            //}

            }
        }
                    }
        }echo $mysqli->error;
    }
                    ?>

</body>
</html>

AnswerRe: need help with php parse error Pin
Richard MacCutchan19-Apr-14 21:24
mveRichard MacCutchan19-Apr-14 21:24 
Questionphp receive sms Pin
greato716-Apr-14 0:30
greato716-Apr-14 0:30 
AnswerRe: php receive sms Pin
Richard MacCutchan16-Apr-14 5:58
mveRichard MacCutchan16-Apr-14 5:58 
Questionreading word/pdf documents Pin
Padma4u7-Mar-14 0:46
Padma4u7-Mar-14 0:46 
QuestionPHP Permissions issue with FTP_PUT Pin
Rottwild24-Feb-14 1:41
professionalRottwild24-Feb-14 1:41 
Questioni need script that record audio and video of the user and give me the uploaded file link Pin
TheSniper10520-Feb-14 1:52
professionalTheSniper10520-Feb-14 1:52 
Questionhow to edit "alias" and "directory" in httpd.conf in Wampserver 2.4? Pin
babak11105-Feb-14 1:29
babak11105-Feb-14 1:29 
QuestionPHP Google calendar Pin
JR21229-Jan-14 20:29
JR21229-Jan-14 20:29 
AnswerRe: PHP Google calendar Pin
JR2122-Feb-14 22:14
JR2122-Feb-14 22:14 
GeneralRe: PHP Google calendar Pin
JR21224-Feb-14 4:38
JR21224-Feb-14 4:38 
GeneralRe: PHP Google calendar Pin
OriginalGriff3-Mar-14 22:51
mveOriginalGriff3-Mar-14 22:51 
Questioni have php class and read file from ftp server and work fine on local machine but i hosted on godaddy then not read file from ftp server Pin
Ajeet Lodhi26-Jan-14 23:29
Ajeet Lodhi26-Jan-14 23:29 
Questioninserting excel data to php myadmin database Pin
Member 1055130526-Jan-14 18:09
Member 1055130526-Jan-14 18:09 
AnswerRe: inserting excel data to php myadmin database Pin
Kornfeld Eliyahu Peter26-Jan-14 20:50
professionalKornfeld Eliyahu Peter26-Jan-14 20:50 
Questionhow run redirection in the background Pin
Jassim Rahma26-Jan-14 10:10
Jassim Rahma26-Jan-14 10:10 
AnswerRe: how run redirection in the background Pin
Graham Breach26-Jan-14 23:45
Graham Breach26-Jan-14 23:45 
QuestionObtain Facebook Access-Token Pin
Jassim Rahma26-Jan-14 8:38
Jassim Rahma26-Jan-14 8:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.