Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. can I have a link? also its a javascript error, try using try {} catch (e) { } around certain parts until the issue disappears.. then look inside that try {} and locate your error but if you send me over a link, I'm a very big IE enthusiest and I'd love to help you resolve your issue
  2. What if you have bad grammar and you did "welcome to whatever.come to this page and lets see!!" whatever.com would become a link and the e will be left out.. you need either www. or http:// to let the parser know its a link..
  3. best way to do this is log IP addresses, most ip addresses refresh once like a month or so (mine has been static for the past 5 months, but it is actually an IP which is supposed to refresh lol) so.. log ip changes.. if there is more than 3 ip changes that week or whatever.. oir just any amount like that, 3 ip changes that day.. or whatever.. than lock the account, and also remember to mention this feature in your ToS.. with this you will atleast know who is sharing and who isn't.. code it to auto-lock the account with 3 ip changes within X amount of seconds, and then give them the option to unlock their account and send them a warning if there is more activity like this you will delete their account permenantly.. this is your only option you can't get hardware information, and also what if sum1 likes your website at work? so like.. just bear these things in mind..
  4. str_pad $r = rand(0,9999); $r = str_pad($r,4,'0',STR_PAD_LEFT);
  5. public function __connect($name, $user, $password) I think you mean __construct however I know there are others like __destruct and __toString but I know __construct is usually the constructor
  6. i still seriously think you can't require or include inside of a class =\ lol
  7. yes because inside your box class you need function __construct($mysql) { $this->mysql = $mysql; }
  8. nope not really, aslong as you set it with $this->varname anywherte in the script, its set to the class' scope, rather than local scope
  9. you could pass it in via constructor $mysql = new mysql(); $e = new otherClass($mysql); then that object is available inside the class if you do like $this->mysql = $mysql; then... $this->mysql->query();
  10. or yeah.. pathinfo($fileName,PATHINFO_FILENAME); but idk if pathinfo() will do it if that file doesn't exist :S
  11. $e = explode(".",$fileName); unset($e[count($e) - 1]); $fileName = implode(".",$e);
  12. use \x01 to seperate your fields, you will never get someone to input \x01 and if they do.. just do str_replace("\x01","",$inputText); because I use | alot lol even outside of programming.. and the best method I guess.. would be to read out your file.. append your new input text to the array containing all other comments.. get the last 10 elements of the array, then clear the text from the file then put the 10 elements you've gotten back into the file..
  13. require_once('../database_settings.php'); ok don't do that lol when you call the class $mysql = new mysql(); $mysql->user = 'user'; $mysql->host = 'host'; $mysql->pass = 'pass'; $mysql->doConnect(); or just do like $mysql = new mysql($host,$user,$pass); and in the mysql class do function __construct($host,$ussr,$pass) { $this->host = $host; $this->pass = $pass; $this->user = $user; }
  14. I think its spelled pedofile, and yeah its a pretty good idea, but I don't really think your school would condone this, as the schools already block myspace, facebook, etc.. This would be just another distraction for children in computer/technology classes, in class on sidekicks, psps, cellphones. The schools wouldn't approve, but the kids might enjoy it.
  15. <?php $text = "omg hey go to http://www.lovinglori.com/signatures.php www.google.com its so cool!"; function link($a,$b) { if ($a == 'http://' || $a == "https://") { return "<a href='{$b}'>$b</a>"; } else { return "<a href='http://{$b}'>$b</a>"; } } echo preg_replace("/((www\.|https?:\/\/)[.a-z0-9;&?\/-]+)/ie","link('\\2','\\1')",$text); ?>
  16. bad html maybe? for your last question, and your script is too long and not syntax highlighted and I don't feel like looking through it for like 10 hours, please shorten it and show errorous areas, not the whole thing.. and include it in [ code] tags
  17. oh true that why didn't I include firstName and lastName into the query? lol
  18. http://lovinglori.com/myjpg.JPG code used: <?php $arr = array(); $arr['hey'] = array("omg1","lmao1","lol1"); $arr['howdy'] = array("omg2","lmao2","lol2"); foreach ($arr as $k => $v) { echo $k; foreach ($v as $va) { echo " ".$va; } echo "\n"; } ?>
  19. 1 second I'm going to load up php and start testing some things for you
  20. not to be annoying but you probably should upgrade your site to running off of a database, it is much more secure than the xml method (if thats what you're doing) and for your php problems try error_reportng(E_ALL); at the top of every php file that way you can see all the errors which occur than post them back here
  21. my second or first foreach should work on that array
  22. $result = mysql_query(sprintf("SELECT `firstName`, `lastName` FROM `iddb` WHERE `id` = '%s'",mysql_real_escape_string($_REQUEST['id']))); if ($a = mysql_fetch_assoc()) { if ($a['firstName'] == $_REQUEST['firstName'] && $a['lastName'] == $_REQUEST['lastName']) { // valid name ID } else { // invalid name } }
×
×
  • 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.