Topic: The connection to the server was reset while the page was loading. (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=31028" title="Pages that link to Topic: The connection to the server was reset while the page was loading. (Page 1 of 1)" rel="nofollow" >Topic: The connection to the server was reset while the page was loading. <span class="small">(Page 1 of 1)</span>\

 
Hustluz
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

posted posted 06-01-2009 03:18

Please help i am working with php and using classes to build my site.
run down:

wamp server
windows xp
firefox browser

Problem:
when i try to test the page i get this error from my browser...

Connection Interrupted:
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again


this is my code:

code:
require_once("include/database.php");
require_once("include/user.php");


if(isset($database)) { echo "true"; } else { echo "false";}
echo "<br />";

echo $database->escape_value("It's working?<br />");

$sql = "INSERT INTO users (id, username, password, first_name, last_name) ";
$sql .= "VALUES (1, 'username', '******', 'firstname', 'lastname')";
$result = $database->query($sql);

$sql = "SELECT * FROM users WHERE id = 1";
$result_set = $database->query($sql);
$found_user = $database->fetch_array($result_set);
echo $found_user['username'];

echo "<hr />";
$found_user = User::find_by_id(1);
echo $found_user['username'];

echo "<hr />";
$user_set = User::find_all();
while ($user = $database->fetch_array($user_set)) {
	echo "User: " . $user['username'] . "<br />";
	echo "Name: " . $user['first_name'] . " " . $user['last_name'] . "<br /><br />";
}




Ive noticed if i comment out this code:

code:
echo "<hr />";
$found_user = User::find_by_id(1);
echo $found_user['username'];

echo "<hr />";
$user_set = User::find_all();
while ($user = $database->fetch_array($user_set)) {
	echo "User: " . $user['username'] . "<br />";
	echo "Name: " . $user['first_name'] . " " . $user['last_name'] . "<br /><br />";



then everything seems to work fine. but it would be pointless to do so because i would not be taking advantage of my class structure

please help with any solutions. thank you in advance

(Edited by Hustluz on 06-01-2009 03:19)

(Edited by Hustluz on 06-01-2009 03:28)

Hustluz
Bipolar (III) Inmate

From:
Insane since: Jun 2003

posted posted 06-01-2009 03:32

i feel stupid for some reason i search my brain for answer cant find any then post here... but as soon as i do i find the problem and am able to fix it. im sorry for wasting your time. thanks anyway

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

posted posted 06-01-2009 11:22

Tell us what the solution was then!



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu