HTML Help Forum HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

PHP while loop cause "The connection was reset"
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum -> PHP
View previous topic :: View next topic  
Author Message
crazyben21



Joined: 17 Jul 2009
Posts: 21

Posted: Sun Aug 30, 2009 1:55 pm     PHP while loop cause "The connection was reset"  

Hello again I'm back. In my php code together with mysqli, it's causing firefox to show "The connection was reset" error. The problem starts in the while loop in my code. Can't manage to find what I'm doing wrong wrong or what I'm missing.

Code:
<?php
//sql connecting

$iscon = mysqli_connect('localhost','root','password');
if(!$iscon)
{
die('Could not connect to mySQL: ' . mysqli_connect_errno($iscon) . '<br/>' . mysqli_connect_error($iscon) . '<br/>');
}


?>

<?php

if ( !mysqli_select_db($iscon,'juniblog') )
{
echo 'Database doesn\'t excist: ' . mysqli_error($iscon) . '<br/>';
echo "Creating new database....<br/>";
if( mysqli_query($iscon, 'CREATE DATABASE juniblog') )
echo 'Database has been created successfully..';
else
echo die('An error has occured creating database: ' . mysqli_error($iscon));
}
else
echo "Database excist and is selected.";
?>


<?php
$junitable = mysqli_query($iscon, "select * from messageblog");

echo "Hello Milena!<br/>";

while($row = mysqli_fetch_array($junitable))
{
echo "<div style=\"border:thin black solid\">";

echo '<p>' . 'Titlte:' . $row['title'] . '</p>';
echo '<p>' . 'Message:' . $row['postmessage'] . '</p>';
echo '<p>' . 'Author:' . $row['author'] . '</p>';
echo '<p>' . 'Date:' . $row['date'] . '</p>';

echo "</div>";
}


?>


<?php mysqli_close($iscon); ?>


This the part that cause the problem:
Code:
while($row = mysqli_fetch_array($junitable))
{
echo "<div style=\"border:thin black solid\">";

echo '<p>' . 'Titlte:' . $row['title'] . '</p>';
echo '<p>' . 'Message:' . $row['postmessage'] . '</p>';
echo '<p>' . 'Author:' . $row['author'] . '</p>';
echo '<p>' . 'Date:' . $row['date'] . '</p>';

echo "</div>";
}
[/code]
crazyben21



Joined: 17 Jul 2009
Posts: 21

Posted: Sun Aug 30, 2009 2:00 pm      

Just a Note: I created the table, with all the attributes, with MySql Query Browser.
crazyben21



Joined: 17 Jul 2009
Posts: 21

Posted: Mon Aug 31, 2009 6:41 pm      

Anybody. Any ideas? Just say something so I could feel your reading my problem at least.
crazyben21



Joined: 17 Jul 2009
Posts: 21

Posted: Tue Sep 01, 2009 6:21 pm      

I solve my "Page Can't be display" problem when I remove apavhe64 and php64bit and installed 32bit apache and php. Last time I'm using unofficial 64bit php and apache from http://www.elxis.org/guides/developers-guides/64bit-apache-php-mysql-windows.html. Now The thing I'm running is MySqL 64bit Official from mysql website.
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum -> PHP
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group