Jump to content

sstangle73

Members
  • Posts

    288
  • Joined

  • Last visited

Everything posted by sstangle73

  1. im not sure why that is the case i just went and was able to register on firefox with out a problem but what i did just find out it is always fails on IE . . . greattt! haha ill b looking into that.
  2. guys i would like to hear everything you have for this system all possible errors i made i would like to fix thanks alot =] test.stangle.info test account: user: testaccount pass: testing or make your own up to you =] thanks again
  3. bumpercars!
  4. i am tring to get 404 page data emailed to me. my .htaccess is ErrorDocument 404 /404.php i would like to have this in the root folder above the individual domains but thats not as important as getting the 404 page right. the 404.php page is <html> <head> <title>Error!</title> </head> <body bgcolor="#000000"> <div style="color: #FFFFFF;"> Sorry, the page you tried to visit is not valid. This error has been reported. Any further questions can be directed to <a href="mailto:[email protected]?subject=404 Not Found">Steven Stangle</a>, WebMaster, ServerMaster. </div> <?php $from_header = "From: [email protected]\r\n"; $to = "[email protected]"; $subject = "404 Error"; $today = date("D M j Y g:i:s a T"); $ip = getenv ("REMOTE_ADDR"); $requri = $PHP_SELF; $servname = getenv ("SERVER_NAME"); $pageload = $ip . " tried to load http://" . $servname . $requri ; $httpagent = getenv ("HTTP_USER_AGENT"); $httpref = getenv ("HTTP_REFERER"); $message = "$today \n\n$pageload \n\nUser Agent = $httpagent \n\n$httpref "; mail($to, $subject, $message, $from_header); ?> </body> </html> some times the emails come correct like this: Tue Aug 5 2008 9:58:58 pm EDT 67.240.55.105 tried to load http://shenentahasoccer.org/404.php User Agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 http://www.shenentahasoccer.org/staff.html but most times the last line . . .where the error was found is omitted. thanks
  5. got it thanks
  6. neither of max's helped and this made it always fail
  7. the function is supposed to catch when the username is is use but when tested with a username that is in use it returns good <?php function validateusername($val){ global $continueSubmit ; function usernameTaken($val){ $sql = "SELECT * FROM `user` WHERE `username` = '" . $val . "' LIMIT 1"; $result = mysql_query($sql); return (mysql_numrows($result) > 0); } $userlen = strlen($val); //check for blank username if($val == ''){ $continueSubmit = false; echo "<img src=\"/images/bad.gif\" alt=\"Bad\"> Field Required"; } else if(usernameTaken($val)){ $continueSubmit = false; echo "<img src=\"/images/bad.gif\" alt=\"Bad\"> Username in use"; } else if($userlen > 50){ $val = false; echo "<img src=\"/images/bad.gif\" alt=\"Bad\"> Username Too Long. Please enter a username between 5 and 50 characeters."; } else if($userlen < 5){ $val = false; echo "<img src=\"/images/bad.gif\" alt=\"Bad\"> Username Too Short. Please enter a username between 5 and 50 characeters."; } else { //everything ok with username echo "<img src=\"/images/good.gif\" alt=\"Good\">"; } } ?> . . . edit . . . talking to someone heres the problem discribed a little better Max says: what is the outputted error? AG | Blkout says: no error AG | Blkout says: it comes back as good. AG | Blkout says: the bottom of the else list AG | Blkout says: but it should fail on the if(usernameTaken) line
  8. i dont think that is what i am looking for at least not how i understood that article. because im not using a background image just solid color. and also if you need the source i dont have any php yet so what you see is the actual source on the site.
  9. http://newyorkpremiersoccerleague.com/wteams.php if you look at the bottom of the page the 2 columns aren't the same height. i use the min-height on both of them and on this page the right column is stretching down over the min. SO is there a way to get both of them the same preferably css but if we need to go JS/PHP or something else i would be ok with that. Thanks
  10. hah ahahhahahahaha all that time debugging for that simple word sigh thanks solved
  11. Allright! So i have this script where it pulls data from one db and uses that data to pull from 2 more dbs. The problem is with one of the later dbs when i run that query the friends who dont have an image in the DB end up not showing up at all with or without a "no image" image. Without the query on the image db everything runs fine and the "no image" image is shown. heres pictures + code with query: <?php $i = 0; $queryfriends="SELECT * FROM friends WHERE ID = '$pID' && `Accepted`='1'"; $resultfriends=mysql_query($queryfriends) or die(mysql_error()); while($arrayfriends=mysql_fetch_array($resultfriends)){ $queryusers="SELECT * FROM users WHERE ID = '$arrayfriends[Friend_ID]'"; $resultusers=mysql_query($queryusers) or die(mysql_error()); while($arrayusers=mysql_fetch_array($resultusers)){ $queryimages = "SELECT * FROM image WHERE ID = '$arrayfriends[Friend_ID]' && `Default` = '1'"; $resultimages = mysql_query($queryimages) or die(mysql_error()); while($arrayimages=mysql_fetch_array($resultimages)){ $URL = $arrayimages['URL']; if($resultfriends && mysql_num_rows($resultfriends) > 0){ $max_columns = 3; if($i == 0){ echo "<tr>"; } echo "<td><a href=\"" . $arrayfriends[Friend_ID] . "\">"; if(empty($URL)){ echo "<img src=\"http://x.myspace.com/images/no_pic.gif\" width=\"90px\" height=\"100px\" border=\"0\">"; }else{ echo "<img src=\"" . $URL . "\" width=\"90px\" height=\"100px\" border=\"0\">";} echo "</a><br>"; echo "<a href=\"" . $arrayfriends[Friend_ID] . "\"><b>" . $arrayusers[dname] . "</b></a>"; echo "</td>"; $i ++; if($i == $max_columns){ echo "</tr>"; $i = 0; } } } } } if($i < $max_columns){ for($j=$i; $j<$max_columns;$j++) echo "<td> </td>"; } ?> w/o: <?php $i = 0; $queryfriends="SELECT * FROM friends WHERE ID = '$pID' && `Accepted`='1'"; $resultfriends=mysql_query($queryfriends) or die(mysql_error()); while($arrayfriends=mysql_fetch_array($resultfriends)){ $queryusers="SELECT * FROM users WHERE ID = '$arrayfriends[Friend_ID]'"; $resultusers=mysql_query($queryusers) or die(mysql_error()); while($arrayusers=mysql_fetch_array($resultusers)){ // $queryimages = "SELECT * FROM image WHERE ID = '$arrayfriends[Friend_ID]' && `Default` = '1'"; // $resultimages = mysql_query($queryimages) or die(mysql_error()); // while($arrayimages=mysql_fetch_array($resultimages)){ $URL = $arrayimages['URL']; if($resultfriends && mysql_num_rows($resultfriends) > 0){ $max_columns = 3; if($i == 0){ echo "<tr>"; } echo "<td><a href=\"" . $arrayfriends[Friend_ID] . "\">"; if(empty($URL)){ echo "<img src=\"http://x.myspace.com/images/no_pic.gif\" width=\"90px\" height=\"100px\" border=\"0\">"; }else{ echo "<img src=\"" . $URL . "\" width=\"90px\" height=\"100px\" border=\"0\">";} echo "</a><br>"; echo "<a href=\"" . $arrayfriends[Friend_ID] . "\"><b>" . $arrayusers[dname] . "</b></a>"; echo "</td>"; $i ++; if($i == $max_columns){ echo "</tr>"; $i = 0; } } // } } } if($i < $max_columns){ for($j=$i; $j<$max_columns;$j++) echo "<td> </td>"; } ?> Thanks For The Help!
  12. hey everyone i am tring to full a friends list from one db then use the lists of friends to get their picture and their display name but the script seems to only run one time anyone know why? <table cellspacing="3" cellpadding="3"> <?php $query56="SELECT * FROM friends WHERE ID = '$pID' && `Accepted`='1'"; $result56=mysql_query($query56) or die(mysql_error()); while($array56=mysql_fetch_array($result56)){ $query6 = "SELECT * FROM image WHERE ID = '$array56[Friend_ID]' && `Default` = '1'"; $result6 = mysql_query($query6) or die("There was a problem with the SQL query: " . mysql_error()); if($result6 && mysql_num_rows($result6) > 0){ $i= 0; $max_columns= 3; while($row = mysql_fetch_array($result6)){ $URL = $row['URL']; if('$URL' == '$row[\'URL\']'){ $URL = 'http://x.myspace.com/images/no_pic.gif'; } $query561="SELECT * FROM users WHERE ID = '$array56[Friend_ID]'"; $result561=mysql_query($query561) or die(mysql_error()); while($array561=mysql_fetch_assoc($result561)){ $fdname = $array561['dname']; // make the variables easy to deal with // open row if counter is zero if($i == 0){ echo "<tr>"; } echo "<td><table><tr><td><a href=\"" . $array56[Friend_ID] . "\"><img src=" . $URL . " width=\"90px\" height=\"100px\" border=\"0\"></a></td></tr>"; echo "<tr><td><center><a href=\"" . $array56[Friend_ID] . "\"><b>" . $fdname . "</b></a></center></td></tr></table></td>"; // increment counter - if counter = max columns, reset counter and close row if(++$i == $max_columns){ echo "</tr>"; $i=0; } // end if } } } // end while } // end if results // clean up table - makes your code valid! if($i < $max_columns) { for($j=$i; $j<$max_columns;$j++) echo "<td> </td>"; } ?> </tr> </table>
  13. gah! heres the most recent <table cellspacing="3" cellpadding="3"> <?php $query56="SELECT * FROM friends WHERE ID = '$pID' && `Accepted`='1'"; $result56=mysql_query($query56) or die(mysql_error()); while($array56=mysql_fetch_array($result56)){ $query6 = "SELECT * FROM image WHERE ID = '$array56[Friend_ID]' && `Default` = '1'"; $result6 = mysql_query($query6) or die("There was a problem with the SQL query: " . mysql_error()); if($result6 && mysql_num_rows($result6) > 0){ $i= 0; $max_columns= 3; while($row = mysql_fetch_array($result6)){ $URL = $row['URL']; if('$URL' == '$row[\'URL\']'){ $URL = 'http://x.myspace.com/images/no_pic.gif'; } $query561="SELECT * FROM users WHERE ID = '$array56[Friend_ID]'"; $result561=mysql_query($query561) or die(mysql_error()); while($array561=mysql_fetch_assoc($result561)){ $fdname = $array561['dname']; // make the variables easy to deal with // open row if counter is zero if($i == 0){ echo "<tr>"; } echo "<td><table><tr><td><a href=\"" . $array56[Friend_ID] . "\"><img src=" . $URL . " width=\"90px\" height=\"100px\" border=\"0\"></a></td></tr>"; echo "<tr><td><center><a href=\"" . $array56[Friend_ID] . "\"><b>" . $fdname . "</b></a></center></td></tr></table></td>"; // increment counter - if counter = max columns, reset counter and close row if(++$i == $max_columns){ echo "</tr>"; $i=0; } // end if } } } // end while } // end if results // clean up table - makes your code valid! if($i < $max_columns) { for($j=$i; $j<$max_columns;$j++) echo "<td> </td>"; } ?> </tr> </table>
  14. found some stupid things so now itll run once and come up with the URL for the 1st friend but after that it comes up blank <table cellspacing="3" cellpadding="3"> <?php $query56="SELECT * FROM friends WHERE ID = '$pID' && `Accepted`='1'"; $result56=mysql_query($query56) or die(mysql_error()); while($array56=mysql_fetch_assoc($result56)){ $query6 = "SELECT * FROM image WHERE ID = '$array56[Friend_ID]' && `Default` = '1'"; $result6 = mysql_query($query6) or die("There was a problem with the SQL query: " . mysql_error()); if($result6 && mysql_num_rows($result6) > 0){ $i= 0; $max_columns= 3; while($row = mysql_fetch_array($result6)){ $URL = $row['URL']; if('$URL' == '$row[\'URL\']'){ $URL = 'http://x.myspace.com/images/no_pic.gif'; } $query561="SELECT * FROM users WHERE ID = '$array56[Friend_ID]'"; $result561=mysql_query($query561) or die(mysql_error()); while($array561=mysql_fetch_assoc($result561)){ $fdname = $array561['dname']; // make the variables easy to deal with // open row if counter is zero if($i == 0){ echo "<tr>"; } echo "<td><table><tr><td><a href=\"" . $array56[Friend_ID] . "\"><img src=" . $URL . " width=\"90px\" height=\"100px\" border=\"0\"></a></td></tr>"; echo "<tr><td><center><a href=\"" . $array56[Friend_ID] . "\"><b>" . $fdname . "</b></a></center></td></tr></table></td>"; // increment counter - if counter = max columns, reset counter and close row if(++$i == $max_columns){ echo "</tr>"; $i=0; } // end if } } } // end while } // end if results // clean up table - makes your code valid! if($i < $max_columns) { for($j=$i; $j<$max_columns;$j++) echo "<td> </td>"; } ?> </tr> </table>
  15. Organized so now i need to figure out whats wrong. <table cellspacing="3" cellpadding="3"> <?php $query56="SELECT * FROM friends WHERE ID = '$pID' && `Accepted`='1'"; $result56=mysql_query($query56) or die(mysql_error()); while($array56=mysql_fetch_assoc($result56)){ $query6 = "SELECT * FROM image WHERE ID = '$result56[Friend_ID]' && `Default` = '1'"; $result6 = mysql_query($query6) or die("There was a problem with the SQL query: " . mysql_error()); if($result6 && mysql_num_rows($result6) > 0){ $i = 0; $max_columns = 4; while($row = mysql_fetch_array($result6)){ $URL = $row['URL']; $query561="SELECT * FROM users WHERE ID = '$result56[Friend_ID]'"; $result561=mysql_query($query561) or die(mysql_error()); while($array561=mysql_fetch_assoc($result561)){ $fdname = $array561['dname']; // make the variables easy to deal with // open row if counter is zero if($i == 0) echo "<tr>"; echo "<td><table><tr><td><a href=\"" . $result56[Friend_ID] . "\"><img src=" . $URL . " width=90px height=110px></a></td></tr>"; echo "<tr><td><center><b>" . $fdname . "</b></center></td></tr></table></td>"; // increment counter - if counter = max columns, reset counter and close row if(++$i == $max_columns){ echo "</tr>"; $i=0; } // end if } } } // end while } // end if results // clean up table - makes your code valid! if($i < $max_columns) { for($j=$i; $j<$max_columns;$j++) echo "<td> </td>"; } ?> </tr> </table>
  16. ooo thats smart haha=]
  17. <?php if (isset($_SESSION['login'])){ ?> HTML HERE <?php } else { ?> <meta http-equiv="refresh" content="0;url=http://website.com"> <?php } ?>
  18. max thats not ordering it by relevancy thats just searching all that contain egg
  19. thats HTML but thats what the tag does if i think about it it would be because every time it refreshes the page the meta tag is there again so it keeps doing it i guess you question is is there a way to refresh it once? if thats the case idk
  20. i had something similiar to this what i ended up doing what assigning each value a number when i added it to the db then i could just do ascending or descending
  21. my brain hurts
  22. haha np i always hate that 2 extra chars throw off everything sooo much
  23. isnt the correct way <?php if ($status == "Accepted") { echo "Accepted!"; } elseif ($status == "Declined") { echo "Declined!"; } else { ?> without the ;s?
  24. me either i dont understand my self sometimes=] but uh i was saying if someone forgets there password in MD5 theres no way to retrive it you would have to generate them a new one. with encrypt you can use the decrypt to give them it back
×
×
  • 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.