|
yeah thanks it seems the problem has been solved
|
|
|
|
|
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.
|
|
|
|
|
Well I'm afraid we cannot guess what is on line 143; or any other line. Please show the code, especially the line where the error occurs.
|
|
|
|
|
Line 143 is the last line "". This is my code.
<!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>
<script type="text/javascript">
function bk(){
location.assign(document.referrer);
}
var state = true;
function getstate(){
return state;
}
</script>
</head>
<body onload="print()">
= $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> SEMESTER RESULT SESSION </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;">
=$result-fetch_array()){
?>
<table>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
</tr>
= $res2-fetch_array()){
?>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</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"> </td>
</tr>
<tr>
<td>No of fail:</td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><input type="button" name="button" id="button" value="Print" onclick="print()" /></td>
</tr>
</table>
error;
//}
}
}
}
}echo $mysqli->error;
}
?>
</body>
</html>
|
|
|
|
|
At a guess you have a mismatched brace or HTML tag.
|
|
|
|
|
The braces are Matched correctly.
|
|
|
|
|
I can only suggest that you go through the code and remove sections one at a time until the error disappears. You will then be able to see which section is the cause and correct it.
|
|
|
|
|
Ok thanks I found the problem.
|
|
|
|
|
this is the problem.
<?php
$sql = "SELECT * FROM course_tb WHERE level LIKE '".$level."' AND semester LIKE '".$sem."'";
if($result = $mysqli->query($sql)){
if($result->num_rows > 0){
while($rw = $result->fetch_array()){
?>
<?
}}}
?>
whenver i try to loop through $result->fetch_array() it returns the Parse Error.
|
|
|
|
|
I am not sure about the extra ?> and <? , perhaps it should be:
<?php
$sql = "SELECT * FROM course_tb WHERE level LIKE '".$level."' AND semester LIKE '".$sem."'";
if($result = $mysqli->query($sql)){
if($result->num_rows > 0){
while($rw = $result->fetch_array()){
}
}
}
?>
See http://www.w3schools.com/php/php_looping.asp[^].
|
|
|
|
|
You have used a short PHP opening tag "<? " inside the loop instead of the full tag "<?php " - if short_open_tag is disabled in your php.ini , then this will cause a parse error.
|
|
|
|
|
Thank your suggestions worked out.
|
|
|
|
|
guys;
I just searched Google for pseudo-elements and pseudo-classes and i found examples on them. (:before, :first-line, :first-letter, :target, :lang, :checked, and :first-child).
my question is: if in jquery selectors ':myfilter' means that the elements should be filtered according to myfilter filter, so how can I select a pseudo-element using jquery.
Help people,so poeple can help you.
|
|
|
|
|
The :first-child [^], :checked [^], :target [^] and :lang() [^] selectors are all supported by jQuery:
http://api.jquery.com/category/selectors/[^]
:first-line and :first-letter aren't directly supported, but you might be able to find ways to work around it. For example, this SO answer[^] has a function to return the first line of an element, but it involves a lot of DOM manipulation.
:before doesn't exist in the DOM, so there's really no way to manipulate it using jQuery.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks, Richard.
This is disappointing, In google chrome inspect element, you can see the pseudo-elements :before and :after presented as separate nodes like ::bafore and ::after. but i couldn't fetch them using .chldren, .childNodes, nor with JQuery.
Help people,so poeple can help you.
|
|
|
|
|
Description: Get the immediately preceding sibling[^] of each element in the set of matched elements, optionally filtered by a selector.
You can go sleep at home tonight if you can get up and walk away
|
|
|
|
|
Dear friends,
I'm trying to transfer data between input type elements (from textbox to dropdownlist)follow the steps below ...
1. from the first row, key data "aaa" then click "+" button.
2. from the second row, key data "bbb" then click "+" button.
3. click "refresh key drivers" button.
4. problem : the display in dropdownlist is "aaa" and "aaa" (I want it to be "aaa" and "bbb"). How should I solve from source code ?
Here is captured screen and source code :
http://www.sendspace.com/file/14vp73
|
|
|
|
|
No one is going to download your code & work it for you. Better include the screenshot link & post relevant code in your question.
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
ٍSir;
you are duplicating the textbox each time with the same id, which is invalid.
then you retrieve the value of the first element in the document with that id, this would return the same value each time.
instead you can give the textbox an unique id each time or use document.getElementsByName() (you should then add the attribute name instead id in the textbox tag).
Help people,so poeple can help you.
|
|
|
|
|
Hi,
I have a deployment environment that contains 2 server A and B both are configured to use a load balance system. Now the connection has been upgraded to SSL and we need to install certificate to both system. Can you please help me informing,
1. Do I need to have same certificated installed in both system (A and B) or different certificate in both (A contains a certificate and B contains another
certificate)
Thanks in advance.
Thanks,
Arindam D Tewary
|
|
|
|
|
You should be using different certificates.
As well - each certificate should be created with that server name.
What load balancer? Big IP?
Are you using sticky sessions? (cookie persistence included?)
|
|
|
|
|
Thanks Rene. I am yet to get some information from actual environment (information such as some more details about load balancer and if in our target environment we have sticky session or not. I will get back as soon as I get some of this information.
Thanks,
Arindam D Tewary
|
|
|
|
|
Dear Friends,
My application is developed using VC++. This application, create shared memory using C++.
My Requirement is:
1. PHP read and write this shared memory.
2. displaying those values in browser.
your suggestion highly appreciate. Kindly help on this.
Thanks and Regards,
S Shanmuga Raja
|
|
|
|
|
I'm VERY new to Web API and Web development in general.
I have a GetClient method in my controller.
[HttpGet]
public Response GetClient(int entityId)
{
return BO.GetClient(entityId);
}
It returns a Response object:
[DataContract]
[Serializable]
public class Response
{
[DataMember]
public object Data { get; set; }
[DataMember]
public Result Result { get; set; }
[DataMember]
public string Message { get; set; }
private Exception _Exception;
[DataMember]
public Exception Exception
{
get { return _Exception; }
set
{
if (_Exception != value)
{
_Exception = value;
Message = _Exception.Message;
Result = Result.Failure;
Data = null;
}
}
}
}
When I call it I get back a null Response object. If I paste the ResponseUri into a browser it comes back with:
{"Data":{"ClientName":"MyClient","IsDirty":false,"RowState":4,"Id":1,"UniqueId":"00000000-0000-0000-0000-000000000000","IsActive":true,"IsDeleted":false,"CreatedByEmployee":null,"CreatedDate":null,"ModifiedByEmployee":null,
"ModifiedDate":null},"Result":0,"Message":"","Exception":null}
So it looks like some kind of serialization problem. I have no idea how to fix this,. Any thoughts on what to do:
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
Kevin Marois wrote: When I call it I get back a null Response object.
How are you calling it? Are you specifying the same accept headers as the browser?
Try using Fiddler[^] to capture the working and broken requests to see what's different.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|