Test with:
<?php
error_reportin(E_ALL); //set PHP error reporting for debugging
$conn = mysql_connect("localhost", "joeuser", "somepass")
OR die(mysql_error()); //for debugging
mysql_select_db("testDB", $conn)
OR die(mysql_error()); //for debugging
$sql = "SELECT * FROM testTable";
//dont need to explicitly use $conn, so that is left out
$result = mysql_query($sql)
OR die(mysql_error()); //for debugging
while ($newArray = mysql_fetch_array($result)) {
$id = $newArray['id'];
$testField = $newArray['testField'];
echo "The id is $id and the text is $testField <br>";
}
?>
Next time copy and paste the code, and then make the alterations for sensitive information like usernames and passwords.
Try not to re-type the whole code snippet as typos could distract the issue from the main problem.