Ok, so here is the problem. Below is a fairly simple code that will count the number of members registered to a site. The html works just fine but the php doesn't display anything unless I do something like if($result>0)
--- then it will display everything to the right of the zero. If I use the code below, I get nothing. I'm hoping it's some stupid mistake instead of XAMPP not working correctly (the same thing happened on another page I tried to see using XAMPP).
<!DOCTYPE HTML>
<html>
<head>
<script src="javascript/login.js"></script>
<script src="javascript/registerscript.js"></script>
<script src="javascript/unsubscribe.js"></script>
<script src="javascript/password.js"></script>
</head>
<body>
<?php require('connect/registerdb.php');
$result=mysql_query("SELECT COUNT(*) FROM registration") or DIE(mysql_error());
while ($row=mysql_num_rows($result)){
echo 'There are . $result . 'members';}
?>
<form id="login" action="session/session.php" onsubmit="return login();" method="POST">
<table>
<tr><td>Login Id</td><td><input type="text" name="loginid" id="loginid"/></td></tr>
<tr><td>Password</td><td><input type="password" name="password" id="password"/></td></tr>
<tr><td></td><td><input type="submit" value="Log me in" /></td></tr>
</table>
</form>
<table>
<tr><td></td><td><input type="submit" value="Unsubscribe" onClick="unsub()"/></td></tr>
<tr><td></td><td><input type="submit" value="I forgot my password" onClick="passret()"/></td></tr>
<tr><td></td><td><input type="button" value="I need to register" onClick="loca()"/></td></tr>
<tr><td></td><td><input type="submit" value="Do math" onClick="math.html"/></td></tr>
</table>
</body>
</html>