Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by BK87

  1. see if anything is being passed through.... print_r($_GET);
  2. try putting <?php sometime webhosts like to make you use <?php only and not <?
  3. mime is plenty enough... plus someone injecting code into an image file, is not unreal, but chances of it actually being run are almost none... I mean if you coding runs the image file through bash then your code is horrible.
  4. also you spelled your site name wrong, I see it now... its all in Chinese.
  5. since we cannot see your site, can you upload some of the php code on here?
  6. that link you posted is showing a login with out database.... but if you want to make this site for multiple people you should use a database, make everything 1000% easier.
  7. <? $str = '<statex refid="ALRdi335-14">, which means Alabama Regulations, Division 335-14</statex>'; preg_match("/<statex refid=\"(.*)\">/",$str,$out); echo $out[1]; ?> this will display the actual "id" in refid tag. since we already know how it will come out...
  8. type the word age $row['age']
  9. replace. $image_p = imagecreatetruecolor($thumbsize, $thumbsize); to if($height>$thumbsize){$height=$thumbsize;} $image_p = imagecreatetruecolor($width, $height); because resize scripts use ratio resizing, so width will be 100 that means, if height of avatar is 50px then it will remain 50px and your image that your are making with php is going to be 50px not 100px... I don't see a way around thing with jpg. if you mandated png or gif, you could make it transparent.
  10. to make an array just use this... $pd_thumbnail[] = $info; $pd_thumbnail[] = $info2; $pd_thumbnail[] = $info3;
  11. $pd_thumbnail[0]; $pd_thumbnail[1]; etc.
  12. .NET/Oracle my friend. php will only get you so far. personally, if I had a big company, I'd rather run it in asp (microsoft bs) with a oracle db than mysql and php... personal view...
  13. use mysql... mysql_query("update online_counter set stime=CURRENT_TIMESTAMP where username='Joe'"); thats to update... this has to execute each time a page loads to update user status... when displaying user status cross check with db $query=mysql_query("select username from online_counter where username='Joe' and stime > CURRENT_TIMESTAMP - interval 15 minute"); $row=mysql_fetch_array($query); if($row["username"]!=NULL){ echo "user online"; } else{ echo "user offline"; } *** not tested technically should work
  14. jkewlo only shows how to change user status... not actually follow the user..
  15. please post some real code, we could debug and help... you probably have a small issue and your are making it into a larger problem
  16. the code seems to explode IP's by commas not by periods... ... try this.. $ip=str_replace(",",".",$_SERVER["REMOTE_ADDR"]);
  17. the only down site to that, is if user accesses the edit page without going to the "paging" system it will screw things up... so maybe you'd want to make a check to see if they actually came from looking at pictures in the first place, rather than entering it in the url
  18. dude lol easy stuff here lol okay. user click a link to edit image or something right? so... <form action=save.php method=post> <input type=hidden name=url value="<?= $_SERVER["HTTP_REFERER"]; ?>"> more input forms or w/e... <input type=submit> </form> save.php should have <? //code for saving changes to your image modifications... then header("Location: ".$_POST["url"]); die; ?> end of story also by you saying original page, do you mean page 1 or the page 6 that user was on?
  19. during the modification proccess... why not make a hidden form? with $_SERVER["HTTP_REFERER"] (hope I spelled it right)
  20. for true user online, you would need to update the db each time a page loads to the perticular user... because just because you changed "online" to 1 (for logged in) dosen't mean that if I close my web browser I will get logged out in 10-20 mins.
  21. the word string should not be used in the same sentence more than once, for that matter any word should not be used in the same sentence once! =D but I'm not understand what you want to do here...
  22. why not just convert from bytes to kilobytes? if(round(filesize($file)/1024) < 750){ //code }
  23. I was about to write a response but then I said hmmm let me refresh this just in case and there it was 2 responses. So here is my response, the two posts above mine, are both excellent ideas =D
  • 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.