Jump to content

[SOLVED] anyone know what could cause this?


monkeytooth

Recommended Posts

<table border="0" width="525" cellspacing="0" cellpadding="0">
<tr>
	<td><font class="font_gen"><b>My CRECS > Browse <font color="#008000">Active
	</font>/<font color="#800000"> Inactive</font> Posted Jobs</b></font></td>
</tr>
<tr>
	<td>
	<table border="0" width="100%" cellspacing="0" cellpadding="0">
		<tr>
			<td bgcolor="#000000" align="center" valign="top"><b>
			<font color="#FFFFFF" size="2" face="Verdana">Job Title</font></b></td>
			<td bgcolor="#000000" align="center" valign="top" width="116">
			<b><font color="#FFFFFF" size="2" face="Verdana">Posted</font></b></td>
			<td bgcolor="#000000" align="center" valign="top" width="66"><b>
			<font color="#FFFFFF" size="2" face="Verdana">ID</font></b></td>
			<td bgcolor="#FFFFFF" align="center" valign="top" width="45"><font color="#FFFFFF" size="2" face="Verdana"> </font></td>
		</tr>
	</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php

$sesh_email = $_SESSION['crecsemail'];
$dbconn = mysql_connect($sq_hst, $sq_unme, $sq_pzwrd) or die("Error: " . mysql_error());
mysql_select_db($database) or die("Could not select database");

$mycrecs2 = mysql_query("SELECT * FROM compy_jobs WHERE ema1l_addy='$sesh_email'");
$mycrecs_2 = mysql_num_rows($mycrecs2);
$mycrecs_2a = mysql_fetch_array($mycrecs2);
mysql_close();

//$mycrecs_2 = $mycrecs_2 -1;
while ($counter < $mycrecs_2) {
if($colrbg == "") {
$colrbg = "#FFFFFF";
} elseif($colrbg == "#FFFFFF") {
$colrbg = "#CCCCCC";
} elseif($colrbg == "#CCCCCC") {
$colrbg = "#FFFFFF";
} else {
$colrbg = "#FFFFFF";
}
$jstat = $mycrecs_2a['jstatus'];
$jtit = $mycrecs_2a['jtitle'];
$jpost = $mycrecs_2a['jpostdate'];
$jpost = date("M. d, Y", $jpost);
$jID = $mycrecs_2a['ID'];
if($jstat == "333") {
echo "<tr>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\"><font class=\"font_gen\">" . $jtit . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"116\"><font class=\"font_gen\">" . $jpost . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"66\"><font class=\"font_gen\">" . $jID . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"45\"><font class=\"font_gen\"><img src=\"images/icon_active.png\" border=\"0\"></font></td>";
echo "<\tr>";
} elseif($jstat == "666") {
echo "<tr>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\"><font class=\"font_gen\">" . $jtit . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"116\"><font class=\"font_gen\">" . $jpost . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"66\"><font class=\"font_gen\">" . $jID . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"45\"><font class=\"font_gen\"><img src=\"images/icon_inactive.png\" border=\"0\"></font></td>";
echo "<\tr>";
} else {
}
$counter++;
}
?>
   </table>
</td>
  </tr>
<tr>
	<td>...footer..</td>
  </tr>
</table>

Link to comment
Share on other sites

if there are no results to pull, it doesnt show up, if there is then imagine if you will stripping the php out of it.. it would show up right where it is.. I have narrowed it down to the rows and columns section of the loop.. but i cant figure out what is causing it as I have done similar in the past without problem

Link to comment
Share on other sites

first off, you are not declaring $counter as 0 before the loop, so you may have a php warning interfering with the page html.  That's my guess anyway without actually seeing the source behind that < r>.  The configuration may be set up to show warnings.

Link to comment
Share on other sites

I've got it!  ;D

 

elseif($jstat == "666") {
echo "<tr>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\"><font class=\"font_gen\">" . $jtit . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"116\"><font class=\"font_gen\">" . $jpost . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"66\"><font class=\"font_gen\">" . $jID . "</font></td>";
echo "<td bgcolor=\"" . $colrbg . "\" align=\"center\" valign=\"top\" width=\"45\"><font class=\"font_gen\"><img src=\"images/icon_inactive.png\" border=\"0\"></font></td>";
echo "<\tr>";

There, the last line! You see it? It's a <\tr>. Should be a </tr>.

 

Cheers :)

Link to comment
Share on other sites

that was it, the reverse slash was doing it to me.. fixed that it stopped showing up.. don't think I would have noticed that for a good while to come so you definitely saved me much aggravation, though I cant figure out how it got that way either.. must have been that long day yesterday, thanks again,..

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.