Jump to content

therealwesfoster

Members
  • Posts

    345
  • Joined

  • Last visited

Everything posted by therealwesfoster

  1. Negatory, here's the new code: $headers = "MIME-Version: 1.0 \r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1 \r\n"; $headers .= "From: email@amil.com \r\n"; $headers .= "Reply-To: email@amil.com \r\n"; $headers .= "Return-Path: email@amil.com \r\n"; mail("me@gmail.com,another@mydomain.com","Literature Request",$msg,$headers);
  2. That's my problem! No, not really I'll add those headers and let you know Wes
  3. This is weird and happens a lot. When I send an email from a php script mail("email@gmail.com","Literature Request",$msg); I receive the email in my GMAIL account, no problem. But when sending to any other email address (that ISN'T GMAIL), it doesn't get received. Not even in the spam folder. Whats up with that? Wes
  4. I'm needing to create a PHP script that will download an external .bz2 file and extract it's contents onto a local directory. Could someone point me in the right direction and give me some tips? Wes
  5. Options +FollowSymLinks Options All -Indexes RewriteEngine On RewriteRule ^artisan-(.*?).html ./acpage.php?p=$1 [NC,L] RewriteRule ^(.*?).html ./$1.php [NC,L] I keep getting 500 errors. Wes
  6. How would you do something like this? if ($type == ('a' OR 'b')) Instead of: if ($type == 'a' OR $type == 'b')) Let me know if it's possible
  7. How can I detect if the window (or tab of the window) is unfocused (or not being viewed by the user) ? Thanks!
  8. What's the best way to mass email WITHOUT using any other email servers? I'm just wanting to use the default mail server (it has to be done this way). So should I do: mail('email1, email2, email3',.....); Or in a loop: foreach ($var as $key){ mail($key,...); } Or, if there is another way, let me know! Thanks
  9. 1. I didn't copy, I wrote it real quick. 2. I didn't ask if it would work, I just made a statement before marking the topic as solved. Wes
  10. Ok, so this simple script should output "test" <?php session_start(); $_SESSION['test'] = 'test'; function show(){ return $_SESSION['test']; } echo show(); ?> Wes
  11. Thanks for the reply I have a global header in which I call session_start(). Should I call this again in a function (later down the page) or no? Wes
  12. If in a function I'm going to be working with sessions, does session_start() need to be called in the function? Or global $_SESSION? Please let me know Wes
  13. FIXED IT! I put i--; in my for loop, this fixed it somehow. Final Code: // This is a simple function to check if a value is in an array Array.prototype.inArray=function(value){var i;for(i=0;i<this.length;i++){if (this[i] == value){return true;}}return false;}; // This is the selectbox object var obj = document.getElementById("selbox"); // Keep: CA, DC, CO, FL, GA, IA, MO, MN, NC, NV, NH, NM, OH, OR, SC, VA, WL var keepStates = ['New Mexico','North Carolina','Ohio','Oregon','South Carolina','Virginia']; for(var i=0;i<obj.length;i++){ if (!keepStates.inArray(obj[i].innerHTML)){ // Ok, so the value of the selectbox isn't in the array of states we want to keep, so remove it obj.remove(i); // THE FIX i--; } }
  14. That's a jQuery function I'm needing just javascript Wes
  15. That removes the whole object, not just the option Wes
  16. I'm doing this as a 1ShoppingCart modification. On the cart page there is a dropdown list of states, but since the product being sold (wine) is limited to where it can be shipped, we're wanting to eliminate some of the state in the dropdown. The script above works in a way. It leaves all the states that it's supposed to leave, but not all of the other states get removed. Just every other one, or every other 2 ones. Does remove() reset the dropdown's index? If so, this could be the problem (because var i is always incrementing) Wes
  17. If it were only that easy!! That doesn't work for me.. Any other ideas as to why? Or ideas as to what to do? Wes
  18. Ok, here's the idea. There is a selectbox on the page with all 50 states listed. I'm wanting to remove all the states in the selectbox EXCEPT for the ones I have listed in the keepStates array. Below is my code. I can't get this to work! Either nothing happens or I get a "obj.remove() is not a function" error. <script type="text/javascript"> // This is a simple function to check if a value is in an array Array.prototype.inArray=function(value){var i;for(i=0;i<this.length;i++){if (this[i] == value){return true;}}return false;}; // This is the selectbox object var obj = document.getElementById("selbox"); // Keep: CA, DC, CO, FL, GA, IA, MO, MN, NC, NV, NH, NM, OH, OR, SC, VA, WL var keepStates = new Array('New Mexico','North Carolina','Ohio','Oregon','South Carolina','Virginia'); for(var i=0;i<obj.length;i++){ if (!keepStates.inArray(obj[i].innerHTML)){ // Ok, so the value of the selectbox isn't in the array of states we want to keep, so remove it obj.remove(i); } } </script> This does not work. Please help! Wes
  19. I'm having trouble getting the 4 timestamps. I had to do this for the previous month's beginning/ending timestamp and I did it like this: $prev_month1 = strtotime(date("1 F Y",strtotime('-1 month'))); $prev_month2 = strtotime(date("t F Y",strtotime('-1 month'))); This snippet gets the beginning and ending timestamp for the previous month. I'm needing to do the same for the current week and current day.. but I'm stuck Wes
  20. I'm needing to generate a total of 4 UNIX Timestamps. 1. The beginning timestamp of the current week (Sunday at 0:00:00) 2. The ending timestamp of the current week (Saturday at 23:59:59) 3. The beginning timestamp of the current day (today at 0:00:00) 4. The ending timestamp of the current day (today at 23:59:59) The current day/week of the script can be whenever, so the script should be able to function no matter what day/month/year it is Thanks! Wes
  21. Ahh, ok. I knew you could do that with php images, but I didn't know it could collect and report data. I'll look more into this Thanks. Solved for now Wes
×
×
  • 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.