Jump to content

srhino

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by srhino

  1. I am having a hard time finding information on shortening the life of a cache on a website. Where can I find out how long the cache is being held and what is the best way to shorten it? Thanks in Advance
  2. There is also a great video tutorial site...www.lynda.com...You have to pay for access but is a great tool to learn hands on for all versions of flash.
  3. Here it is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> <table width="100%"> <tr><td colspan="2" height="90" bgcolor="#008B2B"><img src="header.png" /></td></tr> <tr><td width="15%"> NAV BAR </td> <td> <script language="JavaScript1.2"> /* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com) For full source code, 100's more DHTML scripts, and TOS, visit http://www.dynamicdrive.com Credit MUST stay intact */ //Specify the marquee's width (in pixels) var marqueewidth="800px" //Specify the marquee's height var marqueeheight="400px" //Specify the marquee's marquee speed (larger is faster 1-10) var marqueespeed=1 //Pause marquee onMousever (0=no. 1=yes)? var pauseit=0 //Specify the marquee's content //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great): var marqueecontent='<?php $tournid = $_GET[\'tourn\']; $con = mysql_connect("myserver.net", "*****", "****") or die(\'Could not connect to database\'); mysql_select_db("bestball", $con) or die(\'Sorry could not connect to the database\'); $query = "SELECT *, rd1+rd2+rd3+rd4 AS ToPar FROM scoring where tournid = $tournid order by rd1 + rd2 + rd3 + rd4"; $result = mysql_query($query) or die(\'Could not find Tournament: \' . mysql_error ()); $rank = 1; $recordCounter=1; $previousScore=0; $previousToPar=-99; echo "<br><br><table class=\"table1\" border=\"1\" cellspacing=\"3\" cellpadding=\"3\" width =\"100%\">\n"; echo "<tr><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">RANK</font></td><td class=\"td1\"align=\"center\"><font color=\"#ffffff\">TEAM</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">PLAYER 1</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">PLAYER 2</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">PLAYER 3</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">PLAYER 4</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">CELEB SCORE</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">R1</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">R2</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">R3</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">R4</font></td><td class=\"td1\" align=\"center\"><fant color=\"#ffffff\">SCORE</font></td><td class=\"td1\" align=\"center\"><font color=\"#ffffff\">THRU</font></td> </tr>\n"; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $score_array = array(); $score_array[] = $row[\'ToPar\']; $team = $row[\'team\']; for($i=1;$i<=5;$i++){ $p[$i] = $row[\'p\' . $i]; } $th = $row[\'th\']; $p1 = $row[\'p1\']; $p2 = $row[\'p2\']; $p3 = $row[\'p3\']; $p4 = $row[\'p4\']; $p5 = $row[\'p5\']; $score = $row[\'score\']; $course = $row[\'course\']; $rd1 = $row[\'rd1\']; $rd2 = $row[\'rd2\']; $rd3 = $row[\'rd3\']; $rd4 = $row[\'rd4\']; $ttl = $row[\'ToPar\']; if ($previousToPar != $ttl){$rank = $recordCounter;} echo " <tr> <td bgcolor=\"#000000\" align=\"center\"><font color=\"#ffffff\">".$rank."</font></td> <td><font color=\"#ffffff\">".$team."</font></td> <td><font color=\"#ffffff\">".$p1."</font></td> <td><font color=\"#ffffff\">".$p2."</font></td><td><font color=\"#ffffff\">".$p3."</font></td> <td><font color=\"#ffffff\">".$p4."</font></td> <td><font color=\"#ffffff\">".$score."</font></td> <td><font color=\"#ffffff\">".$rd1."</font></td> <td><font color=\"#ffffff\">".$rd2."</font></td> <td><font color=\"#ffffff\">".$rd3."</font></td> <td><font color=\"#ffffff\">".$rd4."</font></td><td><font color=\"#ffffff\">".$ttl."</font></td><td><font color=\"#ffffff\">".$th."</font></td></tr>\n"; $recordCounter++; $previousToPar = $ttl; }echo "</table>\n";?>' ////NO NEED TO EDIT BELOW THIS LINE//////////// marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS var copyspeed=marqueespeed var pausespeed=(pauseit==0)? copyspeed: 0 var iedom=document.all||document.getElementById var actualheight='' var cross_marquee, ns_marquee function populate(){ if (iedom){ cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee cross_marquee.style.top=parseInt(marqueeheight)+8+"px" cross_marquee.innerHTML=marqueecontent actualheight=cross_marquee.offsetHeight } else if (document.layers){ ns_marquee=document.ns_marquee.document.ns_marquee2 ns_marquee.top=parseInt(marqueeheight)+8 ns_marquee.document.write(marqueecontent) ns_marquee.document.close() actualheight=ns_marquee.document.height } lefttime=setInterval("scrollmarquee()",20) } window.onload=populate function scrollmarquee(){ if (iedom){ if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+) cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" else cross_marquee.style.top=parseInt(marqueeheight)+8+"px" } else if (document.layers){ if (ns_marquee.top>(actualheight*(-1)+) ns_marquee.top-=copyspeed else ns_marquee.top=parseInt(marqueeheight)+8 } } if (iedom||document.layers){ with (document){ if (iedom){ write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">') write('<div id="iemarquee" style="position:absolute;left:0px;top:0px;width:100%;">') write('</div></div>') } else if (document.layers){ write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">') write('<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>') write('</ilayer>') } } } </script> </td></tr></table> </body> </html>
  4. the first time I did it nothing showed up...So I assumed I had to put the backslashes where ever the single quotes were...After that I got parse error saying the \ was wrong
  5. I have found this javascript script I want to use...I want to have php update the content Can someone tell me where to put the PHP code? The Javascript creates a scrolling marquee that scrolls from the bottom of the page to the top...I want to replace the marqueecontent with information from my database Here Is the Javascript <table width="100%"> <tr><td width="15%"> NAV BAR </td> <td> <script language="JavaScript1.2"> //Specify the marquee's width (in pixels) var marqueewidth="800px" //Specify the marquee's height var marqueeheight="400px" //Specify the marquee's marquee speed (larger is faster 1-10) var marqueespeed=1 //Pause marquee onMousever (0=no. 1=yes)? var pauseit=0 //Specify the marquee's content //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great): var marqueecontent='<font face="Verdana"> <table border="1" width="100%"><tr><td width="10%">RANK</td><td width="50%">PLAYERS</td><td width="20%">TODAY\'S SCORES</td><td width="10%">THRU</td><td width="10%">TOTAL</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr><tr><td>1</td><td>Scott Rheinhold</td><td> -1</td> <td>18</td><td>-4</td></tr></font>' ////NO NEED TO EDIT BELOW THIS LINE//////////// marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS var copyspeed=marqueespeed var pausespeed=(pauseit==0)? copyspeed: 0 var iedom=document.all||document.getElementById var actualheight='' var cross_marquee, ns_marquee function populate(){ if (iedom){ cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee cross_marquee.style.top=parseInt(marqueeheight)+8+"px" cross_marquee.innerHTML=marqueecontent actualheight=cross_marquee.offsetHeight } else if (document.layers){ ns_marquee=document.ns_marquee.document.ns_marquee2 ns_marquee.top=parseInt(marqueeheight)+8 ns_marquee.document.write(marqueecontent) ns_marquee.document.close() actualheight=ns_marquee.document.height } lefttime=setInterval("scrollmarquee()",20) } window.onload=populate function scrollmarquee(){ if (iedom){ if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+) cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" else cross_marquee.style.top=parseInt(marqueeheight)+8+"px" } else if (document.layers){ if (ns_marquee.top>(actualheight*(-1)+) ns_marquee.top-=copyspeed else ns_marquee.top=parseInt(marqueeheight)+8 } } if (iedom||document.layers){ with (document){ if (iedom){ write('<div style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">') write('<div id="iemarquee" style="position:absolute;left:0px;top:0px;width:100%;">') write('</div></div>') } else if (document.layers){ write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee">') write('<layer name="ns_marquee2" width='+marqueewidth+' height='+marqueeheight+' left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>') write('</ilayer>') } } } </script> </td></tr></table> Thanks
  6. I am looking for it to automatically scroll without any clicking or dragging...Basically so I can leave the projector up and I can walk away and it will continue to scroll.
  7. I have a golf leaderboard that populates information from my database. Because there are a lot of players I want to have the page autoscroll from the top of the leaderboard to the bottom...This way I can put the leaderboard up in the clubhouse from a projector...Can someone guide me how to do this?
  8. I am trying to have a form that I can process into the database and whenever the form is proccessed buy the customer an e-mail is sent to me so I know that there is a form . How can I do this? Thanks in Advance
  9. You also have two single quotes in front of ''$about'... Should be ... "UPDATE pilots SET about = '$about' WHERE login = '{$_GET['login']}'"; and "UPDATE pilots SET semail = '$semail' WHERE login = '{$_GET['login']}'";
  10. OMG!!!!! I am so dumb...it never even crossed my mind....Thanks for finding that for me.
  11. No I just changed it for protection purposes
  12. Maybe I have been looking at this screen to long but I can't figure out what I am doing wrong. I am simply trying to make a form that you can post some information on the website. I have a form called newpractice.inc.php I have made it as simple as possible. <form action="index.php" method="post"> POSTER: <input type="text" name="poster"> PRACTICE INFORMATION: <input type="text" name="desc"> <input type="submit" value="Submit"> <input type="hidden" name="content" value="addpractice"> </form> And here is the insert php code called addpractice.inc.php <?php $poster = $_POST['poster']; $desc = htmlspecialchars($_POST['desc']); if (trim($poster == '')) { echo "<h2>Sorry, each Quote must have a Poster</h2>\n"; }else { $con = mysql_connect("XXXX", "XXXX", "XXXX") or die('Could not connect to database'); mysql_select_db("database_name", $con) or die('Sorry could not connect to the database'); $query = "INSERT INTO newpractice (eventid,poster,desc) " . " VALUES ('$eventid', '$poster', '$desc')"; $result = mysql_query($query) or die('Sorry, we could not accept your information at this time'); if ($result) echo "<a href=\"index.php\"><font color=\"#000000\"><h2>Comment Accepted</h2></font></a>\n"; else echo "<h2>Sorry, there was a problem accepting your event</h2>\n"; } ?> I cant figure out what I am doing wrong can some use a fresh set of eyes and tell me what I am doing wrong? Thanks in Advance.
  13. Though I think this site is the best way to get help. I wanted to see if any of you guys could suggest a book for PHP. I am taking classes in PHP and I want a good instructional book that explains why and how everything works. I would like a book that might even build an example with you so you can see how everything works. Any Suggestions ? Thanks
  14. OK I would like to thank all of you for taking your time helping. I figured it out!!! In case anyone ever needs to know. Here is how I did it... <?php $con = mysql_connect("XXXXX", "XXXXXXX", "XXXXXX") or die('Could not connect to database'); mysql_select_db("bestball", $con) or die('Sory could not connect to the dadtabase'); $query = "SELECT * FROM scoring order by score"; $result = mysql_query($query) or die('Could not find Tournament: ' . mysql_error ()); $rank = 1; $recordCounter=1; $previousScore=0; echo "<table border=\"1\" cellspacing=\"3\" cellpadding=\"3\" align=\"center\">\n"; echo "<tr> <td>Rank</td> <td>Team</td> <td>Score</td> <td>Thru</td> <td>Player 1</td> <td>Player 2</td> <td>Player 3</td> <td>Player 4</td> <td>Celebrity</td> </tr>\n"; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $score_array = array(); $score_array[] = $row['scores']; //comment out the following line. //if(!in_array($row['scores'],$score_array)){ $rank++; } $team = $row['team']; for($i=1;$i<=5;$i++){ $p[$i] = $row['p' . $i]; } $score = $row['score']; $th = $row['th']; $p1 = $row['p1']; $p2 = $row['p2']; $p3 = $row['p3']; $p4 = $row['p4']; $p5 = $row['p5']; if ($previousScore != $score){$rank = $recordCounter;} echo " <tr> <td>".$rank."</td> <td>".$team."</td> <td><h9 align=\"right\">".number_format($score)."</h9></td> <td>".$th."</td> <td>".$p1."</td> <td>".$p2."</td> <td>".$p3."</td> <td>".$p4."</td> <td>".$p5."</td> </tr>\n"; $recordCounter++; $previousScore = $score; } echo "</table>\n"; ?>
  15. Please we are so close...can any help me with the placement of the array in the while statement?
  16. like this? I put it there but it didn't work. <?php $con = mysql_connect("localhost", "test", "test") or die('Could not connect to database'); mysql_select_db("bestball", $con) or die('Sory could not connect to the dadtabase'); $query = "SELECT * FROM scoring order by score"; $result = mysql_query($query) or die('Could not find Tournament: ' . mysql_error ()); $rank = 1; echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"3\">\n"; echo "<tr><td>Rank</td><td>Team</td><td>Score</td><td>Th</td></tr>\n"; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { #$rank = $row['rank']; $score_array = array(); $score_array[] = $row['scores']; if(!in_array($row['scores'],$score_array)){ $rank++; } $team = $row['team']; for($i=1;$i<=5;$i++){ $p[$i] = $row['p' . $i]; } $score = $row['score']; $th = $row['th']; echo "<tr><td>".$rank."</td><td>".$team."</td><td>".number_format($score)."</td><td>".$th."</td></tr>\n"; $rank++; } echo "</table>\n"; ?>
  17. First of all thank all of you for your help. I hope I am not being a pain. I am just trying to learn this stuff and my teachers are not that good at explaining this. I am learning more from you guys than I am in School!! Yeah score is one of the rows. That time it worked. It output the following...but Is there a way for it to show ties? Rank Team Score Th 1 Modells -3 9 2 GolfSmith -3 8 3 Happy China -2 5 4 Ground Round -1 5 so it would read like this Rank 1 Modells 1 Golfsmith 3 4
  18. OK, thats what I did the first time and it didn't work and it still doesn't work. Where else could I be going wrong? When I run the program nothing shows not even an error message. <?php $con = mysql_connect("localhost", "test", "test") or die('Could not connect to database'); mysql_select_db("bestball", $con) or die('Sory could not connect to the dadtabase'); $query = "SELECT * FROM scoring order by score" ; $result = mysql_query($query) or die('Could not find Tournament: ' . mysql_error()); #$row = mysql_fetch_array($result, MYSQL_ASSOC) or die('No records retrieved'); $rank=0; $r=""; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { #$rank = $row['rank']; $team = $row['team']; $p1 = $row['p1']; $p2 = $row['p2']; $p3 = $row['p3']; $p4 = $row['p4']; $p5 = $row['p5']; $score = $row['score']; $th = $row['th']; if ($r!=$score){$rank++} $r=$score; echo "$rank, $team, $score, $th<br>";} ?>
  19. I have tried that but it doesn't work. I'm not very good at this I guess. <?php $con = mysql_connect("localhost", "test", "test") or die('Could not connect to database'); mysql_select_db("bestball", $con) or die('Sory could not connect to the dadtabase'); $query = "SELECT * FROM scoring order by score" ; $result = mysql_query($query) or die('Could not find Tournament: ' . mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC) or die('No records retrieved'); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $rank = $row['rank']; $team = $row['team']; $p1 = $row['p1']; $p2 = $row['p2']; $p3 = $row['p3']; $p4 = $row['p4']; $p5 = $row['p5']; $score = $row['score']; $th = $row['th']; // where does the following go? $rank=0; $r=""; // with this while statement does it go at the top where I have the other while statement? while($row = mysql_fetch_array($result)) { if ($r!=$row['score']){$rank++} $r=$row['score']; echo "$rank, $team, $score, $th<br>";} ?>
  20. I am getting there. One more thing. where would I put that code... Here is how I wrote it so far... <?php $con = mysql_connect("localhost", "test", "test") or die('Could not connect to database'); mysql_select_db("bestball", $con) or die('Sory could not connect to the dadtabase'); $query = "SELECT * FROM scoring order by score" ; $result = mysql_query($query) or die('Could not find Tournament: ' . mysql_error()); $row = mysql_fetch_array($result, MYSQL_ASSOC) or die('No records retrieved'); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $rank = $row['rank']; $team = $row['team']; $p1 = $row['p1']; $p2 = $row['p2']; $p3 = $row['p3']; $p4 = $row['p4']; $p5 = $row['p5']; $score = $row['score']; $th = $row['th']; echo "$rank, $team, $score, $th";} ?>
  21. Actually just by score is fine...I actually want it to assign a rank or place by the scores.
  22. Sorry, I might not have explained myself that well. I know how to make it repeat all the information and output it to my sheet. How can it rank the scores in order automatically without me having to put the rank in? Thanks,
×
×
  • 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.