kjanceski Posted June 12, 2007 Share Posted June 12, 2007 Hi. From this code i'm sending a value of a variable $con to javascrit script <?php Header("content-type: application/x-javascript"); $conn=mysql_connect("","",""); $sqlQuery="select * from forum"; mysql_select_db("",$conn); $query=mysql_query($sqlQuery); $r=mysql_num_rows($query); if ($r<30 ) { $g=$r-1; $d=-1; } else { $g=$r-1; $d=$g-31; } for ($i=$g;$i>$d;$i--) { $ime=mysql_result($query, $i,0); $poraka=mysql_result($query, $i,1); $vreme=mysql_result($query, $i,2); $con=$con.'Poraka od:'.$ime.'<br>Vreme:'.$vreme.'<br>Poraka:'.$poraka.'<br><br>'; } $con=trim($con); $con = str_replace("\n", "", $con); $con = str_replace("\r", "", $con); echo 'var content="'.$con.'";'; ?> But when i open the page as a result i have message Object Window. This script i have tried at home on my WAMP server and work properly but when i upload it I have this stupid message. If you have the answer or any suggestion please help. Quote Link to comment Share on other sites More sharing options...
Goose Posted June 12, 2007 Share Posted June 12, 2007 First off, indentation is awesome. Second, what is the exact message you are receiving? What is the PHP output of this file? Is your server running the same version of Windows and PHP that your local computer is running? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.