how do I?

From: Date: Thu, 06 Sep 2001 04:51:49 +0000
Subject: how do I?
Groups: php.general 
Request: Send a blank email to php-general+get-66153@lists.php.net to get a copy of this message
Hi, I am trying to write a dynamic help module based on a mysql database. I am using Javascript and PHP to do this. This is part of my script (both java and php) <script language="JavaScript"> <!-- function info(theline) { w w=window.open("","test","screenx=10,screeny=10,width=350,height=80,,scrollbars=no"); w.document.open(); w.document.writeln("<PRE>"); w.document.writeln("File Name: " + thename); w.document.writeln("Description: " + theline); w.document.writeln("</PRE>"); w.document.close(); } //--> </script> <p align="center"></font><a href="offerte.html" onMouseOver="info(<? $xline=__LINE__; require("user.php"); require("error.php"); $newuser = new user(); $nerror= new error(); $xfile=explode("/", __FILE__); $num=sizeof($xfile); $fname=$xfile[$num-1]; // Sql Statement $searchStmt = "select * from help where fnumber=$xline and fname='$fname'"; //execute the statement for help if(!$result=mysql_query($searchStmt, $newuser->link)) { $xerror = $nerror->error1(202); print($xerror); exit(); }else{ $num=mysql_num_rows($result); if ($num==0) { $xerror = $nerror->error1(300); print($xerror); exit(); } else { $row=mysql_fetch_object($result); } } $xdetail = nl2br($row->hdetail); echo "$xdetail"; ?>);"> This script works if I have a single line the hdetail field, but if I put multiply lines in the hdetail field nothing shows up. I added nl2br but nothing work, if you view the source in netscape it is there with the </br>. I am sure I am doing something wrong, but where I don't know. Can some one correct me? TIA Adrian

« previous php.general (#66153) next »