RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
flash has events.. The one you're looking for is Event.SOUND_COMPLETE
-
mysql_insert_id
-
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
-
UPDATE tableName SET review_status = '1' WHERE review_id = 'the_review_id'
-
explode(' ',$string);
-
sql location field, when location changes post a new table row
RussellReal replied to jesushax's topic in PHP Coding Help
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 -
http://us3.php.net/ftp
-
session files getting deleted? set your session directory somewhere outside of the usual temporary directory and your hosting service providers won't touch em
-
how to only show items ordered from order page
RussellReal replied to JulietSA's topic in PHP Coding Help
add my MSN this posting back n forth is crazy lol -
how to only show items ordered from order page
RussellReal replied to JulietSA's topic in PHP Coding Help
loop the POST vars like.. foreach ($_POST as $k => $v) { if ($v > 0) { // display for this element in $_POST } } -
how to only show items ordered from order page
RussellReal replied to JulietSA's topic in PHP Coding Help
is there a way to KNOW what they ordered? or do you mean to just show what they ordered in the email? -
how to only show items ordered from order page
RussellReal replied to JulietSA's topic in PHP Coding Help
You can't -
how to only show items ordered from order page
RussellReal replied to JulietSA's topic in PHP Coding Help
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) -
how to only show items ordered from order page
RussellReal replied to JulietSA's topic in PHP Coding Help
lol I'm sorry I still don't see an order form >.> -
how to only show items ordered from order page
RussellReal replied to JulietSA's topic in PHP Coding Help
I'm there but I see no 'Add To Cart' or anything anywhere lol -
How do I tell PHP to look for an LF end of line break?
RussellReal replied to scott.stephan's topic in PHP Coding Help
you use "\n" not '\n' -
How do I tell PHP to look for an LF end of line break?
RussellReal replied to scott.stephan's topic in PHP Coding Help
\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 -
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
-
echo '('.substr($row['number'],0,3).')'.substr($row['number'],3,3).'-'.substr($row['number'],6,4); should work
-
<?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
-
Post some of your code.. where you handle the data you receive.. and I'll help you patch it in there
-
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
-
[SOLVED] Determining If Birthday Has Passed Or Not
RussellReal replied to twilitegxa's topic in PHP Coding Help
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 -
[SOLVED] convert special phrases to images
RussellReal replied to AviNahum's topic in PHP Coding Help
you could also use WHERE id IN (..,..,..) to select all the images all at once instead of reading from the db 100 times -
[SOLVED] convert special phrases to images
RussellReal replied to AviNahum's topic in PHP Coding Help
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