Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. Wasn't the karma system part of the IPB Forum system anyway? So when we switched, we pretty much decided we didn't need it anymore. I do believe. Because I never remember discussing the termination of the karma system, although it is a good thing it's gone....for reasons already mentioned
  2. will it always say exactly TD.UA
  3. I stand corrected
  4. your welcome remember to mark your posts as solved bottom left area
  5. $s=$_GET['s']; if ($s!=''){ $selectbox=array($s); } You're saying....hey, give me that variable.($_GET['s'])..I don't care what's in it or if even exists....just give me it and then you turn around and say on the VERY next line..... "wait...uh well maybe I changed my mind....is that variable even real?" maybe I should have used the isset function first to save myself some trouble..... I guess I'm just ranting about the theory of creating TOO many variables before a person can even keep up with the ones they have already. if there's something wrong with $_GET['s'] then direct the attention to it....don't replicate it it's all in good coding practice
  6. you need to make your script do this enrollment BETWEEN 201 and 500 OR BETWEEN 501 and 1000 OR etc...
  7. mathew's probably right....that's a lot of overhead I don't think I've ever compared to images like that before.....it's got me curious I'll admit $img = imagecreatefrompng("php.png"); $rgb = imagecolorat($img, 0, 0); $r = ($rgb >> 16) & 0xFF; //119 = 1110111 $g = ($rgb >> & 0xFF; //123 = 1111011 $b = $rgb & 0xFF; //180 = 10110100 ?> That would get you the Red Green and Blue colors for the very beginning pixel. of course...then you'd need a loop for EVERY pixel, I assume you know that and probably another loop for each color, red green and blue. and when you're comparing them you could use the XOR operator to do it echo $r XOR $r2 .... etc hope this helps and good luck
  8. Ok....first of all....just a pet peeve of mine but if you're going to check if the $s variable is empty or not anyway...why not just save yourself the trouble of creating a new variable and just check $_GET first...ok my rant is over there. There's a few things missing in your code snippet or just code in general I guess that's vital to this all, but I'd rather just tell you how do to this for($i=0;$i echo "Testing "; } that's pretty much it
  9. This is called Pagination http://www.phpfreaks.com/tutorial/basic-pagination
  10. what does your checkbox-ing form look like.......the HTML
  11. Well, if you plan on setting a cookie somehow for all of this then yeah I guess you could do that. but I highly doubt you're setting cookies on this issue, are you.?
  12. try ORDER BY UNIX_TIMESTAMP(startDate)
  13. the most straight forward way I've ever used is the UNIX timestamp.. as cooldude mentioned..PHP has functions to manipulate these timestamps in sooooo many ways..with no hacking also,......mysql has functions to play with them as well. date works the UNIX timestamp. CURDATE does not return a UNIX timestamp.. it returns a 2008-06-13 type date... the reason it's giving you that mundane date (december 1969) is because you need to convert the 2008-06-13 to a UNIX timestamp with strtotime first before it will work. Why did it give you that exact date?....because um.. UNIX timestamp only go as far back as Jan 1 1970. and the number you gave it was less than a regular normal......datestamp I hope I answered thoroughly enough
  14. you going to have to set up a cron job to search the database for courses closing that particular day or time and have it run every day at a certain time, or ever hour, depending on how frequently professors close their courses
  15. well if you already have the index for the item_tax that you want ......then.............hint hint $item_tax[$key]
  16. well I guess this is solved then?
  17. use the BETWEEN operator in MySQL for every checkbox that's checked just concatenate your SQL statement with $sql .= "enrollment BETWEEN 1 and 200"; $sql .= "enrollment BETWEEN 201 and 500"; $sql .= "enrollment BETWEEN 501 and 1000"; $sql .= "enrollment BETWEEN 1001 and 2000";
  18. I'm just assuming that even a test.php page with phpinfo() isn't working as well? Do you have access to your http.conf file for Apache? I'm still not sure how PHP would quit working though if you haven't even touched that conf file. If PHP was REALLY shut off on you...then you wouldn't see a white page, but you'd see you're actual PHP script as a text file. If the test.php file works fine then it's probably a syntax error that isn't showing up. If not, ...sheesh....that warrants further investigation
  19. you may doubt it causing it, but if your going to mention editing "stuff". Please mention what the stuff is so we can better help you.....perhaps you're mistaken..you never know. With the information you did give....I have know clue what you're asking. It could be caused by a plethora of things
  20. a simple foreach loop should get you started. foreach($_POST['item_qty'] as $value) { if(!empty($value)) { //Construct your query } }
  21. Zane

    preg_replace

    If that's all you're trying to do is get the end part of all the slashes, you should just be able to use pathinfo() $str = '/Assignment1/images/doors/09-10-2008'; $strInfo = pathinfo($str); echo $strInfo['basename'] //
×
×
  • 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.