Jump to content

rkomar

Members
  • Posts

    19
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

rkomar's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Again the developer does not respond to repeated requests for help: I am submitting this code for review if someone has any suggestions this is greatly appreciated. At this time all counts are 0...... <?php //----------------------------------------------------------------------------------------- $SQLcaT = "SELECT * from CATEGORIES WHERE CATEGORY = '$_GET[category]' ORDER BY TITLE ASC"; $resultcaT = @mysql_query( $SQLcaT ); $maxcolumns = "3"; $nRecordCounter = 0; while( $rowcaT = @mysql_fetch_array( $resultcaT ) ) { $MyCategoryTitle=EdURL($rowcaT[TITLE]); if($nRecordCounter % $maxcolumns == 0) echo "<tr>"; //------------------------------------------------- ?> <td class="padder5" width="33%" valign="top"><span class="link1"><a href="<?PHP mr("$MyCategoryTitle", "$rowcaT[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"> <b> </b></a></span> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <?PHP IF ($rowcaT[CATICON] != $nil) { ?> <a href="<?PHP mr("$MyCategoryTitle", "$rowcaT[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"><img src="category_icons/<?PHP echo $rowcaT[CATICON]; ?>" border="0"></a><img src="images/transparent.gif" width="10" height="10" /> <?PHP } ?> </td> <td width="100%"><span class="link1"><a href="<?PHP mr("$MyCategoryTitle", "$rowcaT[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"><b> <?php echo $rowcaT[TITLE]; ?> </b> </a></span> <?PHP //---------------------------------------------------------------------- if ($rowxxx[COUNT_LISTINGS] == $nil || $rowxxx[COUNT_LISTINGS] == Yes) { $sql_count = "SELECT count(*) FROM LISTINGS WHERE STATUS = 'Active' and CATEGORY = '$rowcaT[iD]'"; $res_count = @mysql_query($sql_count); $row_count = @mysql_fetch_row($res_count); if ($row_count[0] != $nil) echo "<span class=itty_link>($row_count[0])</span>"; } //--------------------------------------------------------------------------- ?> <br> <?PHP //---------------------------------------------------------------------------------------- if ($rowxxx[sLIMIT] == $NIL) $rowxxx[sLIMIT] = 10; $SQLcaTsub = "SELECT * from CATEGORIES WHERE CATEGORY = '$rowcaT[iD]' ORDER BY TITLE ASC LIMIT $rowxxx[sLIMIT]"; $resultcaTsub = @mysql_query( $SQLcaTsub ); $i = 0; while( $rowcaTsub = @mysql_fetch_array( $resultcaTsub ) ) { $i = $i + 1; //--------------------------------------------------------- ?> <span class="subcat_link"><a href="<?PHP mr("$MyCategoryTitle", "$rowcaTsub[iD]", "$rowxxx[MR]", "?page=browse&category="); ?>"> <?php echo $rowcaTsub[TITLE]; ?> </a></span> <?php if ($i == $rowxxx[sLIMIT]) echo "..."; else echo ", "; ?> <?PHP } ?> </td> </tr> </table> </td> <?PHP $nRecordCounter++; if($nRecordCounter % $maxcolumns == 0) echo "</tr>"; ?> <?PHP } ?> </table> <?php if ($numrows != '0') { ?><br><?PHP } ?>
  2. I know you won't mind if I take my problem to another board. I am just looking for some help with an old php code and trying to update it before moving it onto a newer server and hence a newer version of php/mysql. I really did not mean to turn this into a debate. Thanks to all that sincerely helped.
  3. Thanks for you input frost110. Oh.. abtw.. it does work.. imagine that..
  4. Actually the previous page pushed the type of position and on the myfile.php page I have this: <? $conn = mysql_connect("myhost", "myusernane", "mypassword"); mysql_select_db("mydatabase",$conn); $sql = "SELECT DATE_FORMAT(DatePosted,'%m/%d/%y') AS Date1, DATE_FORMAT(ClosingDate,'%m/%d/%y') AS Date2, JobID, DatePosted, PositionTitle, JobCity, JobState, ClosingDate FROM jobs WHERE PositionType = '" . mysql_real_escape_string($_GET['PositionType']) . "' Order by JobState, JobCity "; $result = mysql_query($sql); ?> Then comes this - that lists the jobs and there in lays the url for the next link (myfile.php which gives more information on the choosen job.... <? while($myrow = mysql_fetch_array($result)) { $rows++; if(is_integer($color/2)) { ?> <tr BGCOLOR=#cococo> <? } else { ?> <tr BGCOLOR=#ffffff> <? } $color++; $JobID = $myrow["JobID"]; $Date1 = $myrow["Date1"]; $PositionTitle = $myrow["PositionTitle"]; $JobCity = $myrow["JobCity"]; $JobState = $myrow["JobState"]; $Date2 = $myrow["Date2"]; ?> <td width="20%" ><p align="left"><font color="000099"><? echo $Date1; ?></font></p></td> <td width="30%"> <p align="left"><a href="/directory/myfile.php?JobID=<?php echo $JobID ?>"> <font color="000099"> <?php echo $PositionTitle ?></a> </font> </p></td> <td width="25%" ><p align="left"><font color="000099"><? echo $JobCity; ?></font></p></td> <td width="5%"><p align="left"><font color="000099"><? echo $JobState; ?></font></p></td> <td width="20%"><p align="right"><font color="000099"><? echo $Date2 ?></font></p></td> </tr> <? } mysql_free_result($result); mysql_close(); ?>
  5. Didi you try <a href="/directory/file.php?JobID=[var.JobID]"> ? That seems to work in some of the scripts I've seen. Yes I just tried that one and it will not work either... So as cybercrypt13 said "I am confused" Right now this is the only thing that works;; <a href="/directory/myfile.php?JobID=<?php echo $JobID ?>">
  6. I am sorry.. Not I really do have the ; there... really... <a href="/amember/moreinfo.php?JobID=<?=$_GET['JobID']; ?>">
  7. You would have thought that would have worked.... I did't.. Does is make a different if the globals are on or off with this code: <a href="/directory/myfile.php?JobID=<?=$_GET['JobID']; ?>"> This is not working and quit confusing as to why it is not... Thanks to all who have looked... ???
  8. this works now: <p align="left"><a href="/directory/myfile.php?JobID=<? echo $JobID ?>"> This does now work: <a href="/directory/file.php?JobID=<?=$_GET['JobID'] ?>"> If fails to pass the var JobID
  9. This is the whole statement.. ??? Don't know if that makes a diff.. <? while($myrow = mysql_fetch_array($result)) { $rows++; if(is_integer($color/2)) { ?> <tr BGCOLOR=#cococo> <? } else { ?> <tr BGCOLOR=#ffffff> <? } $color++; $JobID = $myrow["JobID"]; $Date1 = $myrow["Date1"]; $PositionTitle = $myrow["PositionTitle"]; $JobCity = $myrow["JobCity"]; $JobState = $myrow["JobState"]; $Date2 = $myrow["Date2"]; ?> <td width="20%" ><p align="left"><font color="000099"><? echo $Date1; ?></font></p></td> <td width="30%"> <p align="left"><a href="/directory/myfile.php?JobID=<?=$_GET['JobID'] ?>"> <font color="000099"> <?php echo $PositionTitle ?></a> </font> </p></td> <td width="25%" ><p align="left"><font color="000099"><? echo $JobCity; ?></font></p></td> <td width="5%"><p align="left"><font color="000099"><? echo $JobState; ?></font></p></td> <td width="20%"><p align="right"><font color="000099"><? echo $Date2 ?></font></p></td> </tr> <? } mysql_free_result($result); mysql_close(); ?>
  10. For some reason this is not passing the jobid data... ??? ???
  11. Hello, This url worked with globals on and I am want to get this all to work in globals off. Please give me an idea on how to pass this var in the url <a href="/directory/file.php?JobID=<?php echo $JobID ?>"> I can not get it to pass a the var with globals off.... Any help appreciated. Reply
  12. Hello, This url worked with globals on and I am want to get this all to work in globals off. Please give me an idea on how to pass this var in the url <a href="/directory/file.php?JobID=<?php echo $JobID ?>"> I can not get it to pass a the var with globals off.... Any help appreciated.
  13. OK.. I played with it till I got it... Must have been just some misplaced ' or "... Thanks again..
  14. $result = mysql_query("SELECT Count(*) AS total FROM mysite WHERE PositionType='" . mysql_real_escape_string($_GET['PositionType']) . "'"; I got this in there but it is not working... just a blank page ... I want to thank you for your help.. I got the other ones working and for some reason I just had a mental block and could not get what I was reading to work. Thanks again.
  15. It did not like this for a count: $result = mysql_query("SELECT Count(*) AS total FROM mysitedb PositionType = '" . mysql_real_escape_string($_GET['PositionType']) . "'"; I have the other ones working.. just the count does not like what I have done.. nothing is displayed... Thanks you for your time.
×
×
  • 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.