Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

knsito's Achievements


Newbie (1/5)



  1. Strange, because I know someone using Yahoo Hosting for several months now and did not have any problem with include/require
  2. Of course. I can also play this game, in some other parts of the world $8/hr is not much at all
  3. is 'Code' a string? WHERE Code = '$tempval' Also as Maq said you should sanitize your variables
  4. if (strlen($instr) < 149000) { to if (filesize($myfile) < 149000) { Where $myfile is the path to your file ("latest.img") $instr is just a handle / pointer to your file, you are probably getting 0 returned from that strlen function Also you can use $_FILES['imagefile']['size'] even before you do a file move
  5. Sorry I have to disagree.. I cant see $8/hr being a fair rate for web development even if you are still a college student. In New York the minimum wage is $7.25. You can do better.
  6. You need to look up associative arrays in php. I just hit the feeling lucky button on google search http://www.informit.com/articles/article.aspx?p=31840&seqNum=3 To get this 'Pharamacisist 10 Trial Lotto 01' echo $row['ownerName'] .' '. $row['amount'] .' '. $row['reason'];
  7. Basically all you need to do is just keep track of the '1's, if any '0's are met, reset the 1-counter Below will look for onsecutive 1's $a = array(1,0,1,0,1,0,0,1,1); $error = false; $found = 0; //keep track with counter $count = count($a); for($i=0;$i<$count;$i++){ if($a[$i] === 1){ $found++; }else{ $found = 0; } if($found == 2){ $error = true; break; } } if($error){ echo 'Duplicate "1" found at:'. $i; } You could also treat the array as a stack using array_pop() / array_shift() functions If you are looking for any consecutive values then just compare the previous and current array values.
  8. I think you want to change if ($query) { to if (mysqli_num_rows($query) === 0) { ------ By the way, just wondering why you dont just scramble the password to access the page after the user views it...
  9. I think its $row['MIN(price)']; to access the min-price value or do something like SELECT *, min(price) as min_price FROM `products` and $row['min_price']; will have the min-price value
  10. try $arr['169:67700e59c283ae4bc5550efa3e273762']['attributes'][1] = 105; ?
  11. Hi, what I gave you is the delete procedure. it should be in your delete function/file other than that I dont see what would cause your new error
  12. What are the few lines above it
  13. function roundTo($number, $to){ return number_format(round($number/$to, 0)* $to, 2); } echo roundTo($number,.05); taken from http://www.php.net/manual/en/function.round.php#93747
  14. Where is the error occurring? by the way $path = "/var/www/html/uploads/";
  15. Not as yet I haven't. Any help would be appreciated please. Thanks Simplified: $yourlink = "<a href=http://www.2asmooth.com/Kingfisher_Trust/showNews.php?NewsID=".mysql_insert_id($connection).">Link</a>"; $query2 = "UPDATE News SET Link ='$yourlink' WHERE Title ='$newTitle' AND Content ='$newContent'";
  • 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.