# Mysql server problem i think?

**URL:** <https://forum.kirupa.com/t/mysql-server-problem-i-think/162006>\
**Category:** Uncategorized\
**Created:** [September 8, 2005, 9:04pm UTC](https://forum.kirupa.com/t/mysql-server-problem-i-think/162006 "2005-09-08T21:04:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Templarian](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/templarian/32/7152_2.png) [@Templarian](https://forum.kirupa.com/u/Templarian)\
**Post date:** [September 8, 2005, 9:04pm UTC](https://forum.kirupa.com/t/mysql-server-problem-i-think/162006/1 "2005-09-08T21:04:08Z")

</div>

example here: [link](http://www.files.rnkhost.com/testing/testing.htm)

```php
<?
$username="*";
$password="*";
$database="*";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die("Unable to select database");
$query="SELECT * FROM contacts";
$result=mysql_query($query);

$num=mysql_num_rows($result);

mysql_close();

echo "<b><center>Database Output</center></b><br><br>";

$i=0;
while ($i < $num) {

$first=mysql_result($result,$i,"first");
$last=mysql_result($result,$i,"last");
$phone=mysql_result($result,$i,"phone");
$mobile=mysql_result($result,$i,"mobile");
$fax=mysql_result($result,$i,"fax");
$email=mysql_result($result,$i,"email");
$web=mysql_result($result,$i,"web");

echo "<b>$first $last</b><br>Phone: $phone<br>Mobile: $mobile<br>Fax: $fax<br>E-mail: $email<br>Web: $web<br><hr><br>";

$i++;
}

?>

```

```auto
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="insert.php" method="post">
First Name: <input type="text" name="first"><br>
Last Name: <input type="text" name="last"><br>
Phone: <input type="text" name="phone"><br>
Mobile: <input type="text" name="mobile"><br>
Fax: <input type="text" name="fax"><br>
E-mail: <input type="text" name="email"><br>
Web: <input type="text" name="web"><br>
<input type="Submit">
</form>
</body>
</html>

```

got no idea whats wrong. i followed this tutorial and i have no idea whats wrong. i set up my sql data base the exact same way they said and everything. i found one error in there code “mysql\_numrows” had to be “mysql\_num\_rows” but i fixed that.

[http://www.freewebmasterhelp.com/tutorials/phpmysql/4](http://www.freewebmasterhelp.com/tutorials/phpmysql/4)

Thanks.

//edit, on the server the phpmyadmin says this andi found it kinda strange (error?). note i didnt change anything to it thats an actual screenshot.
