Jump to content

c_shelswell

Members
  • Posts

    275
  • Joined

  • Last visited

    Never

Everything posted by c_shelswell

  1. right i get it - yeah that's a really good idea. So a user can add a new poll really easily - brilliant thanks very much
  2. Then i presume down to a text file afterwards again so you can still display the results after a new poll is in place?
  3. great cheers i'll take a look at that hotscripts one. It doesn't have to be from scratch at all so that might be easier. Cheers
  4. Hi i've a little problem I was wondering if anybody might have any ideas on. I've been asked to create a poll/questionnaire on a page. They basically want to be able to input up to 15 questions which a user can then select one to vote on. This bit's pretty simple, I was just going to make a mysql table with 15 id's then the user can add a question for each id. The thing is he want's to be able to save the results of that poll and make a new one. I was thinking of saving the results either in a text file or adding the to a single cell in a database add some "=>" then if i want to display the results again i can just use "explode". I suppose the other option would be to create a new table for each poll but this seems like not a very good idea to me. If anybody's got any ideas I'd be really glad to hear them. Many thanks
  5. cheers I'll give them a go tomorrow. I have tried this one http://techpatterns.com/downloads/javascript_cookies.php but again same story fine with ffox and fine with ie6 when they're turned on but not the other way.
  6. Hi I'm having a bit of a problem checking cookies in ie6. The below works fine in Firefox and if cookies are enabled works fine in ie6 but if i disable cookies ie6 doesn't display the message to say so. I've tried a number of different scripts to sort this but so far it's all the same story. Any ideas would be great. var cookieEnabled=(navigator.cookieEnabled)? true : false if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){ document.cookie="testcookie" cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false } if (cookieEnabled) { document.write('ENABLED - Good to go!'); } else { document.write('<span class="errorMsg"><a href="./login/cookie-help.html" target="_blank" >DISABLED CLICK HERE</a></span>'); } Cheers
  7. Hi I'm having a bit of difficulty trying to get firefox to display a div at 70% of the height of the page. It seems to work fine in explorer 6. If any one can help that'd be great. Here's my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>CAVA Index</title> <style type="text/css"> body { margin:0; padding:0; height:100%; background: #000; font-family: arial, verdana; color: #fff; } #header { height: 70px; background-color: #333; border:1px solid #fff; padding:4px; } #leftColumn { position:absolute; left:0; top:82px; padding:0; width:200px; height:60%; color:#fff; background:#222; border:1px solid #333; } .content { position: relative; top: 0px; margin-left:220px; margin-right:10px; margin-bottom:20px; color:#fff; background:#666; border:1px solid #999; padding:0 10px; height: 70%; } #leftColumn p { padding:0 10px; } p.top { margin-top:20px; } </style> </head> <body> <div id="header"> HEADER </div> <!-- end header --> <div id='leftColumn'> <div id='leftMenuCont'> MENU IN HERE </div><!-- end leftMenuCont--> </div><!-- end leftColumn --> <div class='content'> THIS IS THE BIT I NEED AT 70% </div><!-- end content --> </body> </html> This should just copy and paste. It look right in IE just wish i could sort it in FF Thanks for any help
  8. I've got a bit of a problem that i'm struggling to get to the bottom of and any advice would be really great. Basically i've made a site that allows people to buy music and video bundles the user pays for a bundle via pay pal. The problem i have is there is a site session variable "['free_cart']" if a user enters a discount code that makes their cart total 0 then ['free_cart'] is set to 1 and they bypass pay pal. However i have a user that seems to have gone thru a regular transaction not a free one (all the database and paypal show a normal sale) though when paypal has direct the user back to the site after the payment it appears (auto emails are sent out if a payment hasn't gone thru as normal) that the ['free_cart'] variable has been set to 1. I don't understand how this could possibly happen. Is there a way a user could cheat a session variable?? How could they leave the site to go to paypal but when they get back from paypal a variable has been changed? I hope i've explained this reasonably well any help would be great i'm really confused Thanks
  9. Brilliant - thanks very much for your help got it working!!
  10. sorry to be a real pain i've been googling this for a bit now and i'm still really stuck. I've got it down to the fullstop at the end of the sentence "This message was created automatically by mail delivery software." if i add anything after the fullstop i can't get the preg_match to work. I've tried preg_quote and adding the backslashes in manually but i'm still not winning. Thanks for your help, it's very appreciated.
  11. if i do that i then get the error message: "Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in" code is $permError = preg_quote('A message that you sent could not be delivered to one or more of its recipients. This is a permanent error.', '/'); $mBody = preg_quote($dtls['msg_body'], "/"); if (preg_match($permError, $mBody, $found)) { // Finds a message with an error $errorType = $value['delivery_error_type']; } Many thanks for your help!
  12. Cheers, I'm still not having much joy though. I've updated the code to the below: foreach ($delErrors as $key => $value) { $permError = preg_quote("/".$value['string']."/"); $mBody = preg_quote($dtls['msg_body'], "/"); if (preg_match($permError, $mBody, $found)) { // Finds a message with an error $errorType = $value['delivery_error_type']; } elseif (preg_match($permError, $dtls['subject'], $found)) { $errorType = $value['delivery_error_type']; } } and it still doesn't seem to find anything. Any more ideas? Many thanks
  13. Hi I have a preg_match search that i'm now getting quite lost with. It should be pretty simple i'm checking bounced mails looking for the string: "A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:" in the following: This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: email@email.com The mail server could not deliver mail to email@email.com. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. ------ This is a copy of the message, including all the headers. ------ Return-path: my code is: foreach ($delErrors as $key => $value) { $permError = "/".$value['string']."/"; if (preg_match($permError, $dtls['msg_body'], $found)) { // Finds a message with an error $errorType = $value['delivery_error_type']; } elseif (preg_match($permError, $dtls['subject'], $found)) { $errorType = $value['delivery_error_type']; } } i can't seem to get it to find the string at all. However if i shorten the search string to only "This is a permanent error." it works fine. Is there any reason why this might be happening? Many thanks
  14. PhpMailer is a download from http://phpmailer.sourceforge.net/ I'm just sending out via mail() i think so sendmail is it? I've also tried to send SMTP but it's no better. AndyB - yeah i've already done that. Each 100 that are sent i give it a 2 sec wait. Any other ideas?? Cheers
  15. Hi i'm hoping this is a fairly simple question that somebody will have some knowledge or idea of. I've got phpMailer rigged up to send out to a mail list (so far of only around 10,000). I sent a mailout to around 3000 properly formed but known to be dead email addresses to test how returns work with my code. When i send out the mails i send each mail individually in order to personalise them. Now this all works fine. The problem is if i send out 3000 dead emails i can get up to 5000 returns a lot simply identical duplicates (sometimes up to 10 of the same mail come back) surely this isn't right? So the question is could phpMailer be responsible for this? I'm really desperate to sort this out but i've got no idea what could be causing this. Could it simply be that the people i send to servers are sending back 10 mails? If anyone knows what could cause this your ideas would be fantastic. I can post code but i'm not sure if that would help?? Many thanks
  16. Hi i'm getting a bit stuck trying to send out a subscribed mailing list. I did a test run the other day with 3000 mails to genuine emails but from an older database so some of them failed. The program i've made is meant to receive those failed mails and mark them as such in the database. Now the problem, the mails that came back to the address that sent them worked great however some of the mails returned to our servers default address NOT the address i'd sent them out with. i.e. the return-path on 200 of the mails was correct but 900 set the return path as the server default. The email addresses that did this were bad addresses but surely there must be a way in phpmailer to send mail and force the return path to what i set it?? the code i'm using (shortened) is: $mailer = new FreakMailer(); $mailer->AddAddress($emailAddress, $fullname); $mailer->FromName = $fromName; $mailer->From = $fromAddress; $mailer->Sender = $fromAddress; //<<< This the bit that should set the return-path $mailer->Send(); would it make any difference if i sent via SMTP? I can only imagine even though i'm setting the from addresses here it's still sending via the servers default account? Any ideas on this would be very happily received. Cheers
  17. Yeah guess it's much the same - thanks very much for your help
  18. sorry should have said "2 either side of 3 and inclusive of 3" Cheers
  19. Frying my brain a bit trying to figure this out. I'm sure it's very easy though. I'm just trying to make a simple more than or less than statement but i'm sure there's a better way than the way i'm doing it: $y = 3; if ($y== 1||$y==2|| $y == 3 || $y == 4 || $y==5) { do something } so i'm just trying to make the "if" go 2 either side of 3. Is there a better way than writing it in such a long way? Thanks
  20. Hi I seem to have had a small problem with my mysql database a while back (i think when i switched from windows to linux) Anyway it seems to have replaced all my 'é' with 'é' (it also shows as '�')i was trying to do an ereg_replace on them like: //username input = 'Andr�' $username = $row['username']; $pattern = '/é/'; $replacement = '/é/'; $fixedNames = eregi_replace($pattern, $replacement, $username); This however seems to do absolutely nothing. Does anyone have any ideas how i might go about sorting this problem? Many thanks
  21. so could that be a result of switching from a windows phpMyAdmin to a Linux phpMyAdmin ? Don't suppose there's any easy function in mysql to remedy this is there? Thanks
×
×
  • 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.