Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. flash has events.. The one you're looking for is Event.SOUND_COMPLETE
  2. why don't you just code a media player in flash and set up a session with the user when he hits the page, then pass the session id to flash thru flashVars then everytime the user finishes a song send the song number and session ID to the server.. and you tally those values up in to the database, and when the user has listened to ALL the songs set the boolean value to true
  3. UPDATE tableName SET review_status = '1' WHERE review_id = 'the_review_id'
  4. explode(' ',$string);
  5. why would you wanna put gaps in the table if the location changes? and why not just make 2 fields previous_location - location and when you insert the row initially just make previous_location and location the same value.. and then when location changes, leave previous_location and change location.. then when you're looping thru your result array, if the previous_location and location don't match up.. than echo a blank row :S
  6. http://us3.php.net/ftp
  7. session files getting deleted? set your session directory somewhere outside of the usual temporary directory and your hosting service providers won't touch em
  8. add my MSN this posting back n forth is crazy lol
  9. loop the POST vars like.. foreach ($_POST as $k => $v) { if ($v > 0) { // display for this element in $_POST } }
  10. is there a way to KNOW what they ordered? or do you mean to just show what they ordered in the email?
  11. ok I see it.. and NOW you want only ordered items to be displayed? edit --- (b4 you post again ) I don't see how you'll pull that off without an 'add to cart' feature >.> edit #2 --- On your gardening website in fees and structure.. "existing structures, tress and garden" is that meant to be 'trees' because spelling bad on websites tend to affect you pretty bad (even tho that's your client not YOU, just looking out)
  12. lol I'm sorry I still don't see an order form >.>
  13. I'm there but I see no 'Add To Cart' or anything anywhere lol
  14. \r is a carriage return, \n is a new line \r is used in windows applications along with \n, and on *nix you only need \n, if you remove the \r from the windows text you'll still have the same, line seperated text. just seperate by \n
  15. ken, what kinda regex is that if you're gonna go with regex use this: preg_replace("/^(\d{3})(\d{3})(\d{4})$/",'($1)$2-$3',$row['number']); --- Edit substr and strpos are really actually very fast I prefer using those two functions when parsing rather than regex, the above portion of this post is just to follow up on what ken said
  16. echo '('.substr($row['number'],0,3).')'.substr($row['number'],3,3).'-'.substr($row['number'],6,4); should work
  17. <?php function sef_rep($name) { $name = html_entity_decode(strtolower($name)); $r = range(33,126); $remove = array("/", "'", "`", "!", "(", ")", ".", "@", "+", " ", "_", "<", ">", "?", ":", ";", "&", "#", ","); $name = str_replace($remove, '-', $name); $l = strlen($name); for ($i = 0; $i < $l; $i++) { $c = ord(substr($name,$i,0)); if (!in_array($c,$r)) { $name = substr($name,0,$i - 1).substr($name,$i + 1,$l - ($i + 1)); $i--; } } return $name; } ?> try that
  18. Post some of your code.. where you handle the data you receive.. and I'll help you patch it in there
  19. so what characters do you want to keep? a-z, 0-9, !@#$%^&*() ;'.,[]{}":><|\~` ? a-z A-Z 0-9 all those symbols.. they are usually in succession, find out what their ascii values are and loop thru the text and remove anything thats not between those.. if you don't understand what I mean I'll help you out some more
  20. You'd use the date function.. <?php class Now { function __construct() { $this->day = date('j'); $this->month = date('n'); } } $now = new Now(); if (($now->month <= $_POST['month']) && ($now->day < $_POST['day'])) { echo "day has passed"; } ?> also note I used a class because its cooler looking but you could just do if (date('j') < $_POST['day']) ... etc
  21. you could also use WHERE id IN (..,..,..) to select all the images all at once instead of reading from the db 100 times
  22. why are you using preg_match to match the occurances then doing ANOTHER loop AFTER the regular expressions engine.. and THEN using str_replace.. you should just do it all in 1 line like I showed him.. do a benchmark bro
×
×
  • 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.