Jump to content

Nothing showing, what am I doing wrong here?


nicoscodes

Recommended Posts

Hey guys,

Nothing is showing up, just getting a blank white page, any suggestions?

<?php
include("include/konnect.php");
$sql=mysql_query("SELECT * FROM ask");
while($row=mysql_fetch_array($sql))
{
$msg=$row['msg'];
$mes_id=$row['mes_id'];
$up=$row['up'];
$down=$row['down'];

echo "

<div id='main'>

<div class='box1'>
<div class='up'><a href='' class='vote' id='".$mes_id."' title='Up' name='up'>".$up."</a></div>
<div class='down'><a href='' class='vote' id='".$mes_id."' title='Down' name='down'>".$down."</a></div>
</div>

<div class='box2' >
".$msg." <br><br><div class='fb-comments' data-href='http://example.com/page.php?id=".$mes_id."'  data-num-posts='2'></div><br><br>
";
}
 ?>
$sql=mysql_query("SELECT * FROM ask") or die("MySQL Failure: " . mysql_error());
if (mysql_num_rows($sql) == 0)
    die("There were no rows returned");

while($row=mysql_fetch_array($sql))

Add that to your code and what do you find?

The konnect.php file contains database connection (not using PDO):

<?php
$conn = mysql_connect('localhost', 'user', 'pass') or trigger_error("SQL", E_USER_ERROR);
$db = mysql_select_db('data',$conn) or trigger_error("SQL", E_USER_ERROR);

mysql_set_charset('utf8',$conn);
?>

I have been troube shooting but cannot find where this error is coming from, would it be the host? the host supports PHP5 and I running locally on MAMP with no issues. I appreciate your help and thanks, what is my next course of action is the error log is giving me: Call to undefined function phpinclude()

 

it would have been helpful if you included the file name and line number information from the logged error message.

 

however, its likely that your new-line character(s) from your development system are not being recognized and your source code is being interpreted as <?phpinclude(...);

 

what operating system is the live server using?

I have spent the last 3 weeks practically going insane. I have pretty much given myself anuerisms and had countless sleepless nights. 3 clients websites have been down and not functional because of this carriage return.

You are a fucking god and I want to thank you so much.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.