Jump to content

burnside

Members
  • Posts

    541
  • Joined

  • Last visited

Posts posted by burnside

  1. Hi guys, for some reason I can't get ! to work.

     

    if (!$var_mobile_number[1] == '7'){
    echo 'yes';
    }else{
    echo 'no';
    }
    

     

    I want it so if $var_mobile_number[1] is not == to 7 then echo yes.

     

    But this does not seem to work.

     

    Any ideas?

     

     

    Thanks

     

    May need a bit more code.

  2. sumit like this?

     

    
    $number1 = rand(1,10);
    $number2 = rand(1,10);
    $answer = $number1 + $number2;
    
    echo "<form action=\"?mod=cat\" method=\"POST\" /> what is {$number1} + {$number2}? <input type=\"text\" name=\"asn\" id=\"asn\" /> <input type=\"submit\" value=\"submit\" /> ";
    
    
    
    if($_GET['mod'] == "cat" ) { 
    $myanswer = (int)$_POST['asn'];
    
    if($myanswer == $answer ) { echo " Right "; } else { echo " Wrong "; } } 
    
    

     

    That is the idea i would use but im not the best in the world. BUT since computers are designed to do math that would be easily cracked thus doing nothing.

  3. might want to strip out XSS code. try this

    <?php
    function clean($var){
      $var = trim(strip_tags(mysql_real_escape_string($var)));
      $var = htmlspecialchars($var,ENT_QUOTES);
    }
    
    array_walk_recursive($_POST,'clean');
    
    //array_walk($_POST,'clean');// PHP 4 output
    ?>

     

    Yeah i downloaded the log from the database and noticed a few ill do that in abit.

  4. Will you just test my site please, All there is working atm is Private messages. You just check you sql injection etc ... please.

     

    www.burnside.net46.net

     

    there is 3 accounts for testing.

     

    username > password

     

    account1 > password

    account2 > password

    account3 > password

  5. Notice you moved the topic. Sorry :(

     

    where would i add the cookie to? this is the code:

     

    
    <div id="countdown"></div>
    <div id="notifier"></div>
    
    <script type="text/javascript">
    
    Number.prototype.toMinutesAndSeconds = function() {
    var m = Math.floor(this / 60);
    var s = this % 60;
    return (m+":"+(s<10?"0":"")+s);
    }
    
    function _TDisplay() {}
    _TDisplay.prototype.init = function(seconds, output, notify) {
    this.tot = seconds;
    this.out = output;
    this.not = notify;
    this.ii = setInterval(this.tick, 1000);
    };
    _TDisplay.prototype._tick = function() {
        this.out.innerHTML = (--this.tot).toMinutesAndSeconds();
        if(!this.tot) {
        	this.not.innerHTML = '<?php echo " hi "; ?>';
        	clearInterval(this.ii);
        }
        
    }
    TDisplay = new _TDisplay();
    _TDisplay.prototype.tick = function() {
    TDisplay._tick.call(TDisplay);
    }
    
    
    
    //otherwise
    pre = (window.onload) ? window.onload : function () {};
    window.onload = function () {
    pre();
    TDisplay.init(3, document.getElementById('countdown'), document.getElementById('notifier'));
    }
    
    </script>
    

  6. hi i have a query.

     

    i have a simple count down clock in javascript, counts down from 60min to 0min, but each time i leave the page and go back to it or refresh the page it starts from 60min again, how would i get it to remember the time and not start from 60min again?

     

    Sorry its not in java script topic, i couldnt decide it if was a java problem or ajax.

  7. not the best way but i used this once worked:

     

    
    // selcet date etc ... 
    
    $e_array = ('@');
    $c_array = ('(at)');
    
    		$row['emai'l] = str_replace($e_array, $c_array, $row['email']); 
    
    

     

    A;; that will do is replace @ with (at) so email will look like myemail(at)myemail.com

     

    there will be a ton of better ways to do it but i used that and didnt give me any problems.

     

     

     

     

     

     

     

     

  8. Wow!!

     

    I have just downloaded Firefox/3.0.4 (i think) and all i can say is its so much better than IE!! This is my first time at using Firefox its so easy to use & looks so much better as well :P

  9. They love it so much they put their business dependencies on beta products? 

     

    We don't really use the internet for much i don't think, IT just like to be up to date with things lol.

     

    Sounds more like your IT dept doesn't have much to do so they install new things every chance they get, in order to justify their jobs to people who don't know any better.

     

    Ha Ha i never thought of it like that Ha Ha.

     

×
×
  • 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.