Jump to content

ms.buggy

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by ms.buggy

  1. How I should convert hmlt-entitys to koi8-r characters? According to manual, I think this is correct: $decoded = html_entity_decode( $orig , ENT_NOQUOTES, "KOI8-R" ); If I try to write data into excel, there stands "decode cannot yet handle MBCS!" -error. And according to phpinfo() server has php5 installed. If I set charset to UFT-8, it works without errors, but ofcource right characters cannot be found.. And when I'll try to write a csv, prosessing stops on this line. So what have I done wrong? Have I used html_entity_decode -sentence right? Any help apprichiated!
  2. Site files used to be on our server but now site is on other server, but the domain name service is still on ours. So I need to change url setting of domains. Is writing 'http://' address to document root (in virtul host section) a proper way to set this? like: DocumentRoot http://www. Or?
  3. I see and got it. I just cant figure out what causes the looping.. Of course clearZero function is called many times, becouse several variables are read throught that, but that isn't loop, or is it? But anyways Excellent!
  4. Okay, code works mainly correctly. But I have managed to resieve an error message in some cases. Message is: "Fatal error: Cannot redeclare clearzero() (previously declared in..." and it's pointing to the line2 'function clearZero($value)'. This is caused when saved data already exist in the database, strange becouse there is no limitation/controlling of duplicate data. What is really strange is that this is caused when the function is not even used?? Becouse I have few values that are not even check with the 'clear zero' -funtion, when reading them to variables, and this may happen even if only these variables are used. The function is: function clearZero($value) { return ($value==0) ? '' : trim($value); } And variables are read: $variable1=trim($_POST['variable1']); $variable2=clearZero($_POST["variable2"]); I only guessing, but could this be some kind of a cache issue?
  5. Thank you very much mjdamato! And thank you too phpchamps, but was this only for testing? In this case, I prefer to test and check the status of variables from the database, just in case. It always nice to learn new!
  6. Hi, I have a form with multiple fields that are stored to database. Problem is that for the further purposes, 0 values are invalid. So if someone writes zero values programn should clear those. Ok, this is very simple made with multiple if-functions, like 'if($variable==0){$variable="";}'. But I'm interested to find other way to handle multiple values, instead of writing separate if-function for all of them. I thought that this might not be the lightest way to handle variables. I think the optimal solution would be written so that zero values would not post from form to function that stores values to database. Any suggestions?
  7. Hello, I'm trying to check if the variable starts with certain digits, possible begins are +367 and +352. I tried to set if set something like this: if ((gsm.charAt(0)!="+" && gsm.charAt(1)!=3 && gsm.charAt(2)!=6 && gsm.charAt(3)!=7) || (gsm.charAt(0)!="+" && gsm.charAt(1)!=3 && gsm.charAt(2)!=5 && gsm.charAt(3)!=2)){ Can someone help me with this issue?
  8. Ok, thanks. I think this is pretty lame, becouse simple formatting is so light / easy to do in different email programs, like outlook and gmail. I managed to do underlining by usign txt instead of rtf, and with underscore the phrase in my txt file(_phrase_). So now the "higlighted" sentance is underlined in the message that is sent (atleast when read in thunderbird or gmail), used content type is text/plain. Are these _old fashioned ways_ good / reliable or even safe way to do some simple text formatting for emails, where content is read and inserted from separeted file (txt, rtf, etc..). Also, I noticed that when the formatting is done in gmail, the content type is set to multipart/alternative, could there perhaps be some kind of table of the tags used in this content type -coding? -ms.buggy
  9. Is there any way to format text content in email, like underlining or italic, to mail that is sent in plain/text?
  10. Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mail is sent correctly, but the formatting of the content includes rtf formatting like: "{\f2\fs20\insrsid8807860 Place:" for example, and not just the content text "Place". I was assuming that the problem is with the 'Content-type' and 'Content-Transfer-Encoding', but after googleing about this rtf/mail issue, I'm getting the feeling that maybe this problem wont be so easy. Thanks in advance. -ms.B
×
×
  • 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.