S
SMYERS
Hi...
Here is my issue and I hope someone can help me here!!!
I am putting together a logging application, I created a layered dhtml
popup to position over the parent window. When I call up the details
of a certain record, in the sql database its type is TEXT and on the
php side im using echo nl2br($variable);
When I do that it will inside the scrolling div display 1 line of
information NO PROBLEM, but lets say I edit the record and put 2 or
more lines in it... NOPE comes up totally blank, inface the include
doesnt even seem to load with it... I can strip it all out and do a
simple echo no problem there so I know the file im including IS
loading...
Funny thing is, I can echo the same text 100x no problem, the div will
scrolll...
I have searched google all over to no luck, find everything but what I
am looking for!
Any help would be greatly apreciated...
Thanks
Sample code:
SQL:
| entrytext | text | YES | MUL | NULL
DHTML:
<SCRIPT LANGUAGE="JScript">
var engedPopup = window.createPopup();
function engeditlogs()
{
var engedPopBody = engedPopup.document.body;
engedPopBody.style.backgroundColor = "white";
engedPopBody.style.border = "solid black 0px";
engedPopBody.innerHTML = "<div style=\"border : solid 0px #ff0000;
background : #ffffff; color : #000000; padding : 4px; width : 469px;
height :244px; overflow : auto;\" \><FONT face=verdana
size=1><b>Current Details:</b><br><br><? include('eng-edit.php');
?></FONT></div>";
engoPopup.show(505, 188, 470, 250, document.body);
}
</SCRIPT>
(This gets called in the php code... and have verified this is being
called properly...)
After that gets called it includes the file you see above and this is
that files code:
PHP:
$id=$_GET[id];
$incidentno=$_GET[editincident];
$editincident=$_GET[editincident];
$clstatus=$_GET[clstatus];
echo "Engineering Log $incidentno<br><br>";
mysql_connect("localhost", "root","nissanz");
mysql_select_db("supportdb");
$query ="SELECT entrytitle, entrytext, entrydate, soid,
incidentno, oc";
$query.=" FROM securityrep WHERE incidentno=$incidentno";
$result=mysql_query($query);
while
(list($entrytitle,$entrytext,$entrydate,$soid,$incidentno, $oc) =$
mysql_fetch_row($result)) {
echo "<br>Operator ID: <strong>$soid</strong> - ";
echo "Call Status: <strong>$oc</strong><br>";
echo "Date Entered: <b>$entrydate</b><br>";
echo "Problem: <b>$entrytitle</b><br>";
echo "<br>";
echo "<b>Details of problem:</b>";
PROBLEM----> // echo nl2br($entrytext);
Ok, if i uncomment that, and the record contains ONLY 1 single line, it
will display, if it has more then 1 lines 2 or more even, it will now
display the contents of this include AT ALL.
Sorry for the long post and thanks again!
Here is my issue and I hope someone can help me here!!!
I am putting together a logging application, I created a layered dhtml
popup to position over the parent window. When I call up the details
of a certain record, in the sql database its type is TEXT and on the
php side im using echo nl2br($variable);
When I do that it will inside the scrolling div display 1 line of
information NO PROBLEM, but lets say I edit the record and put 2 or
more lines in it... NOPE comes up totally blank, inface the include
doesnt even seem to load with it... I can strip it all out and do a
simple echo no problem there so I know the file im including IS
loading...
Funny thing is, I can echo the same text 100x no problem, the div will
scrolll...
I have searched google all over to no luck, find everything but what I
am looking for!
Any help would be greatly apreciated...
Thanks
Sample code:
SQL:
| entrytext | text | YES | MUL | NULL
DHTML:
<SCRIPT LANGUAGE="JScript">
var engedPopup = window.createPopup();
function engeditlogs()
{
var engedPopBody = engedPopup.document.body;
engedPopBody.style.backgroundColor = "white";
engedPopBody.style.border = "solid black 0px";
engedPopBody.innerHTML = "<div style=\"border : solid 0px #ff0000;
background : #ffffff; color : #000000; padding : 4px; width : 469px;
height :244px; overflow : auto;\" \><FONT face=verdana
size=1><b>Current Details:</b><br><br><? include('eng-edit.php');
?></FONT></div>";
engoPopup.show(505, 188, 470, 250, document.body);
}
</SCRIPT>
(This gets called in the php code... and have verified this is being
called properly...)
After that gets called it includes the file you see above and this is
that files code:
PHP:
$id=$_GET[id];
$incidentno=$_GET[editincident];
$editincident=$_GET[editincident];
$clstatus=$_GET[clstatus];
echo "Engineering Log $incidentno<br><br>";
mysql_connect("localhost", "root","nissanz");
mysql_select_db("supportdb");
$query ="SELECT entrytitle, entrytext, entrydate, soid,
incidentno, oc";
$query.=" FROM securityrep WHERE incidentno=$incidentno";
$result=mysql_query($query);
while
(list($entrytitle,$entrytext,$entrydate,$soid,$incidentno, $oc) =$
mysql_fetch_row($result)) {
echo "<br>Operator ID: <strong>$soid</strong> - ";
echo "Call Status: <strong>$oc</strong><br>";
echo "Date Entered: <b>$entrydate</b><br>";
echo "Problem: <b>$entrytitle</b><br>";
echo "<br>";
echo "<b>Details of problem:</b>";
PROBLEM----> // echo nl2br($entrytext);
Ok, if i uncomment that, and the record contains ONLY 1 single line, it
will display, if it has more then 1 lines 2 or more even, it will now
display the contents of this include AT ALL.
Sorry for the long post and thanks again!