Jump to content

Just can't find where a (>) is coming from


crmamx

Recommended Posts

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>

<?php // Connect to database==================================================

include("connect_db.php");

// sending query ===========================================================

$result = mysql_query("SELECT * FROM members Order By last") or die(mysql_error());  

if (!$result) {
    die("Query to show fields from table failed");
}

echo "<br />";
echo "<p>MEMBERS LIST</p>";

echo "<table border='10' cellpadding='3' cellspacing='2'>";
echo "<tr><th>First Name</th><th>Last Name</th>><th>Phone</th><th>Email</th></tr>";

// keeps getting the next row until there are no more to get ================

while($row = mysql_fetch_array( $result )) {

// Print out the contents of each row into a table ==========================

echo "<tr><td>";
echo $row['first'];
echo "</td><td>";
echo $row['last'];
echo "</td><td>";
echo $row['phone'];
echo "</td><td>";
echo $row['email'];
echo "</td></tr>"; 

} 

echo "</table>";

?>
</body>
</html>

This is the output.

 

MEMBERS LIST


>
  First         Last        Phone        Email
  data          data        data         data
ect...............................................................

 

I cannot find where the > (greater than) sign is coming from.

 

There is a space after MEMBERS LIST but I could not get it to work in this display.

Link to comment
Share on other sites

Unbelievable! And so it throws the extra > out and prints it BEFORE it starts the table. Even at that I counted the <  and > in that echo command a dozen times.

 

I think sometimes I just need to put it to bed and come back the next day.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.