Just to have said it... Im green in both PHP4 and MySQL.
Can anyone say what I've been doing wrong here, and how to fix it, or even
better. Debug the whole shit! =)

The error is like this:

-->
Members who are $prof s
\n"); while ($row = mysql_fetch_array($retid)) { $email = $row["email"];
$loc = $row["loc"]; $aim = $row["aim"]; $icq = $row["icq"]; $msn =
$row["msn"]; $yahoo = $row["yahoo"]; $charname = $row["charname"];
$charsname = $row["charsname"]; $charnick = $row["charnick"]; $tit =
$row["tit"]; $lvl = $row["lvl"]; $picurl = $row["picurl"]; $born =
$row["born"]; $apperiance = $row["apperiance"]; $charac = $row["charac"];
$streng = $row["streng"]; $bio = $row["bio"]; $breed = $row["breed"]; $prof
= $row["prof"]; $posn = $row["posn"]; echo ("
<--

Why doesnt it fill in the info instead of printing this above the table?

My code here:

Code start ------------>

<?
 $usr = "God";
 $pwd = "Secret";
 $db = "members";
 $host = "localhost";

 # connect to database
 $cid = mysql_connect($host,$usr,$pwd);
 if (!$cid) { echo("ERROR: " . mysql_error() . "\n"); }

?>
<html>
<head>
<title>Profiles</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#000000" text="#FFFFFF" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" background="../images/back.gif"
bgproperties="fixed">
<?
 $prof = "Nano-Technician";

 # setup SQL statement
 $SQL = " SELECT * FROM memberinfo ";
 $SQL = $SQL . " WHERE prof = '$prof' ";

 # execute SQL statement
 $retid = mysql_db_query($db, $SQL, $cid);

 # check for errors
 if (!$retid) { echo( mysql_error()); }
 else {

  # display results
  echo ("<P><DT><B>Members who are $prof s</B><BR>\n");
  while ($row = mysql_fetch_array($retid)) {
   $email = $row["email"];
   $loc = $row["loc"];
   $aim = $row["aim"];
   $icq = $row["icq"];
   $msn = $row["msn"];
   $yahoo = $row["yahoo"];
   $charname = $row["charname"];
   $charsname = $row["charsname"];
   $charnick = $row["charnick"];
   $tit = $row["tit"];
   $lvl = $row["lvl"];
   $picurl = $row["picurl"];
   $born = $row["born"];
   $apperiance = $row["apperiance"];
   $charac = $row["charac"];
   $streng = $row["streng"];
   $bio = $row["bio"];
   $breed = $row["breed"];
   $prof = $row["prof"];
   $posn = $row["posn"];

   echo ("
<table width="846" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
    <td height="30">&nbsp;</td>
  </tr>
  <tr>
    <td width="80">&nbsp;</td>
    <td>
      <table width="766" border="0" cellspacing="0" cellpadding="0"
height="166">
        <tr>
          <td width="150">&nbsp; </td>
          <td height="20" align="left" nowrap valign="top">
            <table border="0" cellspacing="0" cellpadding="0" height="20">
              <tr>
                <td height="20" bgcolor="#FFFFFF"><font
color="#000000"><b>$tit
                  $charname &quot;$charnick&quot; $charsname</b></font></td>
                <td height="20" bgcolor="#FFFFFF"><img
src="../images/profcorn.gif" width="20" height="20"></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td width="150" valign="top">
            <table width="150" border="0" cellspacing="0" cellpadding="0"
height="100%">
              <tr bgcolor="#FFFFFF">
                <td colspan="2" height="2"><img src="../images/profdot.gif"
width="100%" height="2"></td>
              </tr>
              <tr>
                <td bgcolor="#FFFFFF" width="2"><img
src="../images/profdot.gif" width="2" height="100%"></td>
                <td align="left" valign="top">
                  <table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td><img src="$picurl" width="150" height="200"></td>
                    </tr>
                    <tr>
                      <td><b>Contact:</b> $email</td>
                    </tr>
                    <tr>
                      <td><b>Level:</b> $lvl</td>
                    </tr>
                    <tr>
                      <td><b>Breed:</b> $breed</td>
                    </tr>
                    <tr>
                      <td><b>Profession:</b> $prof</td>
                    </tr>
                    <tr>
                      <td><b>Location:</b> $loc</td>
                    </tr>
                    <tr>
                      <td><b>AIM:</b> $aim</td>
                    </tr>
                    <tr>
                      <td><b>ICQ:</b> $icq</td>
                    </tr>
                    <tr>
                      <td><b>MSN:</b> $msn</td>
                    </tr>
                    <tr>
                      <td><b>Yahoo!:</b> $yahoo</td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td colspan="2" height="2"><img src="../images/profdot.gif"
width="100%" height="2"></td>
              </tr>
            </table>
          </td>
          <td align="left" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="0"
height="100%">
              <tr>
                <td bgcolor="#FFFFFF" width="2" rowspan="2"><img
src="../images/profdot.gif" width="2" height="100%"></td>
                <td height="2"><img src="../images/profdot.gif" width="100%"
height="2"></td>
                <td bgcolor="#FFFFFF" width="2" rowspan="2"><img
src="../images/profdot.gif" width="2" height="100%"></td>
              </tr>
              <tr>
                <td align="left" valign="top">
                  <table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td><b>Born:</b> $born</td>
                    </tr>
                    <tr>
                      <td><b>Appearance:</b> $apperiance</td>
                    </tr>
                    <tr>
                      <td height="18"><b>Position:</b> $posn</td>
                    </tr>
                    <tr>
                      <td><b>Distinguishing characteristics:</b>
$charac</td>
                    </tr>
                    <tr>
                      <td><b>Strengths and weaknesses:</b> $streng</td>
                    </tr>
                    <tr>
                      <td><b>Bio:</b> $bio</td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td colspan="3" height="2"><img src="../images/profdot.gif"
width="100%" height="2"></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

\n");
  }
?>

</body>
</html>

<------------------- Code end


Any ideas?

Best regards

Cato Larsen






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to