Re: [PHP] Generic Email

2010-06-10 Thread Michiel Sikma
On 9 June 2010 11:59, Richard Quadling wrote: > On 9 June 2010 09:08, Amit Bobade wrote: > > Hi friends, > > I am new in PHP. I want to know that how to send an email in HTML > > format(i.e. with proper header, footer, etc) in PHP. > > Please suggest me with code. > > > > -- > > Thanks and Reg

Re: [PHP] MVC logic

2010-05-31 Thread Michiel Sikma
On 29 May 2010 20:39, Tanel Tammik wrote: > Hello, > > i'm trying to break this thing down for my self. i made little application > for that. could someone please take a look and let me know if what i wrote > resembles MVC inviroment or not. > > It's crucial that your application parses the locat

Re: [PHP] opening a link in a new window

2010-05-14 Thread Michiel Sikma
On 14 May 2010 22:49, Ashley Sheridan wrote: > > There are still valid reasons to use it. On my own site for example, and > links which lead outside of my site open up in a new tab/window. I link > to a lot of other external sites often in my blog entries, and I think > it's valid that these link

Re: [PHP] mysql_real_escape_string() and "

2010-05-14 Thread Michiel Sikma
On 14 May 2010 22:03, Spud. Ivan. wrote: > > I'm trying to insert a serialized data into mysql, but I does > mysql_real_escape_string() before inserting it. > > INSERT IGNORE INTO `table` (`value`) VALUES > ('a:3:{s:12:"F1";s:6:"nombre";s:11:"F2";s:5:"F3";s:16:"F4";s:10:"F5";}'); > > it result in

Re: [PHP] Two color rows in table inside while iteration [X-PHP]

2010-05-06 Thread Michiel Sikma
On 6 May 2010 17:47, tedd wrote: > > > Michiel: > > Considerate? Being Inconsiderate is what the government does for a living. > > Additionally, what you said above is *your* opinion -- as *you* presented > in a public forum. Who's opinion is more appropriate for this list is > subject to debate.

Re: [PHP] Getting source from remote file

2010-05-06 Thread Michiel Sikma
On 6 May 2010 10:55, Peter Lind wrote: > > > You could parse the document with the DOM classes. Load as a > DOMDocument, then grab what's needed with the relevant methods (you > can use xpath to single out your divs with the right classes). > http://dk2.php.net/domdocument > > > Xpath is indeed t

Re: [PHP] Really impressive work

2010-05-05 Thread Michiel Sikma
On 6 May 2010 00:04, tedd wrote: > Hi gang: > > I found something that really impressed me -- please review this: -snip- > Now, we also have smaller images of 12 different stones (in heads) that are > all the same size. Thus, as the user picks the stones and positions they > want and the imag

Re: [PHP] Two color rows in table inside while iteration [X-PHP]

2010-05-05 Thread Michiel Sikma
On 2 May 2010 19:11, tedd wrote: > > > > -snip- > Yes, it would be nice if the people who work for the government also had to > live under the same rules as the rest of us. As it is, they live in a state > of privilege enjoying salaries that are typically 175 percent above that of > the private

Re: [PHP] In need of CVS/SVN checkout script for Production servers [solved]

2010-05-05 Thread Michiel Sikma
On 5 May 2010 17:18, tedd wrote: > At 1:10 PM -0700 5/4/10, Daevid Vincent wrote: > >> Well, here is the one I'm using. I ended up just writing one (again!) >> >> http://www.daevid.com/content/examples/snippets.php :: "Production >> Deployment Script" >> > > What?!? > > Advanced features?? > -sni

Re: [PHP] Inconsistent json_decode() results

2010-05-05 Thread Michiel Sikma
On 5 May 2010 22:14, Michael Shadle wrote: > -snip- > > A. I gotcha now. Yeah I started using that just recently either > 5.2.11 or 5.2.13 (not sure which) > > You can typecast an object to an array that easily? I was unaware. > Yep, it's that easy. :-) // array(1) { // [0]=> // int(1)

Re: [PHP] Inconsistent json_decode() results

2010-05-05 Thread Michiel Sikma
On 5 May 2010 20:02, Michael Shadle wrote: > 2010/5/5 Michiel Sikma : > > > By the way, if you're stuck on 5.2.10, you could simply cast the result > to > > array: > > > > var_dump((array)json_decode('{"_urls": ["a", "b"

Re: [PHP] Two color rows in table inside while iteration -- just say no to mod

2010-05-05 Thread Michiel Sikma
On 3 May 2010 08:25, Jochen Schultz wrote: > > [snip] > > And unless we are adding a multiple seconds to the load time is anyone >> going to notice a difference of 1 second? >> > > yes > > > It's really not that big a deal. http://pastie.org/947121 Personally, I think using modulus is as nice a

Re: [PHP] Inconsistent json_decode() results

2010-05-05 Thread Michiel Sikma
2010/5/5 François Beausoleil > Hello all! > > We're seeing inconsistent json decoding between PHP versions: > http://gist.github.com/390090 > > Calling json_decode() from 5.2.6 returns an associative array when asked, > while 5.2.10 always returns a stdClass. Is this a bug or a problem with my >

Re: [PHP] Inconsistent json_decode() results

2010-05-05 Thread Michiel Sikma
2010/5/5 Ali Asghar Toraby Parizy > 2010/5/5 François Beausoleil : > > Hello all! > > > > We're seeing inconsistent json decoding between PHP versions: > http://gist.github.com/390090 > > > > Calling json_decode() from 5.2.6 returns an associative array when asked, > while 5.2.10 always returns a

Re: [PHP] Error handling strategies (db related)

2010-04-27 Thread Michiel Sikma
On 27 April 2010 10:42, Gary . wrote: > How do you guys handle errors during, say, db insertions. > > Let's say you have an ongoing transaction which fails on the n-th > insert. Ok, you roll back the transaction, no problem. How do you then > inform the user? Just using the text from pg_result_er

Re: [PHP] Re: replying to list (I give up)

2010-04-25 Thread Michiel Sikma
On 25 April 2010 09:31, Per Jessen wrote: > > >> Doesn't WoW need DirectX and all that? I have some old Windows games > >> (Diablo, Alpha Centauri, Railroad Tycoon, Wolfenstein) I'd love to > >> play under Wine, but so far I've not managed to make them work. > >> > >> > > The best way to run old

Re: [PHP] PHP not being read?

2010-04-24 Thread Michiel Sikma
On 25 April 2010 00:45, Gary wrote: > What would cause a machine not to read/process php? > > I have a laptop that I have been ever increasing using for php scripting. > I decided to do a simple experiment, it started out something like: > > $seconds=1; > $minutes=$seconds*60; > $hours=$minutes*

Re: [PHP] Question: Farsi characters showing as jibberish

2010-04-24 Thread Michiel Sikma
On 24 April 2010 16:07, Parham Doustdar wrote: > Hi Ashley and Michiel, > > It appears it is something in Apache or my server program on Windows (I am > using Uniform Server; a portable webserver from > http://www.uniformserver.com). The reason I got to such a conclusion is > this: > > 1. I uploa

Re: [PHP] Re: replying to list (I give up)

2010-04-24 Thread Michiel Sikma
On 24 April 2010 16:14, Per Jessen wrote: > Ashley Sheridan wrote: > > >> > >> Is there an actual WoW client for Linux or you run in Wine like > >> environment? > >> > >> Thanks, > >> Tommy > >> > > > > I run it under Wine. Wine has come a long way since my first > > encounters with it a few year

Re: [PHP] htmlentitites ENT_QUOTES in HTML attributes?

2010-04-24 Thread Michiel Sikma
On 23 April 2010 14:21, Jan G.B. wrote: > Hi List, > > I just figured, that the Browsers on my system do interpret ' > inside href or onclick attribute as a plain '. > > Imagine the user input is the following line: > > param2" foo';);alert(document.cookie);alert(' > > Which is being written by t

Re: [PHP] Re: replying to list (I give up)

2010-04-24 Thread Michiel Sikma
On 23 April 2010 16:16, Kevin Kinsey wrote: > > I've still got a Win98 box in service somewhere around here; I use > it for audio recording. Someone (possibly even me) renamed most > of the desktop icons ... OE's shortcut is "Outluck Depress". :-) > > Kevin D. Kinsey > > Say what you will about

Re: [PHP] Question: Farsi characters showing as jibberish

2010-04-24 Thread Michiel Sikma
On 24 April 2010 14:45, Parham Doustdar wrote: > Hi, > > I have created a PHP file, and wrote a string of Farsi letters in it. In > the > head section of the HTML, I put: > > > > There appears to be something wrong with Apache, or something, because no > matter whether I put that string in an ec

Re: [PHP] Structured PHP studying

2010-04-23 Thread Michiel Sikma
On 23 April 2010 13:15, David McGlone wrote: > Is there a good strategy to studying PHP? > > For instance, is there a way to break everything down into small managable > topics? > > -- > Blessings, > David M. > > Just build what you want to build and look things up when necessary. The biggest par

Re: [PHP] collect string from string

2010-04-22 Thread Michiel Sikma
On 23 April 2010 00:42, Ashley Sheridan wrote: > On Fri, 2010-04-23 at 00:44 +0200, Michiel Sikma wrote: > -snip- > Ah, ignore my last reply then! I used the g modifier, forgetting it wasn't > the multi-line one in PHP! > > > Thanks, > Ash > http://www.ash

Re: [PHP] collect string from string

2010-04-22 Thread Michiel Sikma
You need to use the multiline modifier. Try this: preg_match_all("/^(\#.*)/im", $my_string, $matches); print_r($matches); The result: Array ( [0] => Array ( [0] => # {{uncountable}} The dried leaves or buds of the [[tea plant]], [1] => #: ''Go to the supermark

Re: [PHP] Hello everybody - php newbie from switzerland

2010-04-21 Thread Michiel Sikma
On 21 April 2010 18:02, tedd wrote: > > Welcome Nick. > > Do you own a bank? :-) > > > Cheers, > > tedd > > C'mon, this is the PHP list, not COBOL :) But yes, welcome to the list. Frequenting a list is one of the best things you can do when learning a language. Don't be afraid to ask should any

Re: [PHP] replying to list (I give up)

2010-04-21 Thread Michiel Sikma
On 21 April 2010 15:41, Dan Joseph wrote: > When you hit reply all, just take out all the other addresses and leave the > list one in there. The list was setup like this years ago on purpose, and > they've stated in the past they don't want to change it.. > > -- > -Dan Joseph > > I'd like to ref

Re: [PHP] Date Math

2010-04-21 Thread Michiel Sikma
On 20 April 2010 17:40, Floyd Resler wrote: > I need to get the difference in months between two dates. The dates could > be as much as 60 months apart. Is there any easy way to do this either > through PHP or MySQL? I know how I can do it through code but thought there > might be a simple one

Re: [PHP] replying to list

2010-04-21 Thread Michiel Sikma
On 21 April 2010 11:23, David McGlone wrote: > > Why is the list set up to reply to the OP and not the list? > > -- > Blessings, > David M. > > Is it? I didn't notice. I just use "reply to all" which puts the list in the CC, and that works just fine for me. Michiel

Re: [PHP] How to do i18n better?

2010-04-19 Thread Michiel Sikma
On 19 April 2010 15:56, Robert Cummings wrote: > -snip- > > > Unless you have namespaces (and I can't remember if they completed > namespaced based functions) then don't use something so commuon as a > function named underscore :/ > > Cheers, > Rob. > > No, you're actually absolutely right about

Re: [PHP] PHP include security

2010-04-19 Thread Michiel Sikma
On 18 April 2010 21:43, Micky Hulse wrote: > On Sun, Apr 18, 2010 at 10:23 AM, Michiel Sikma > wrote: > > I would prefer to use include() since it runs the code in the same > context, > > .. > > with your data rather than printing it right away. > > Thank

Re: [PHP] How to do i18n better?

2010-04-19 Thread Michiel Sikma
On 19 April 2010 00:55, Andre Polykanine wrote: > > Now the i18n process is made as follows: we set a cookie on the site > and depending on it we select the language to display the site in. We > have three (currently) interface files: rus.lng, ukr.lng, and enu.lng > (for English US). the format i

Re: [PHP] solution

2010-04-18 Thread Michiel Sikma
On 17 April 2010 13:03, Paulo-WORK wrote: > I have reached a solution for my problem with js. > Following all the sugestions and using jquery turned out to be quite > simple. > using .hide( ) and .show( ) i am able to change the #div with Js enabled > content and no js. > > That's the best way t

Re: [PHP] PHP include security

2010-04-18 Thread Michiel Sikma
On 18 April 2010 02:08, Micky Hulse wrote: > Hi Michiel! Thanks for the help, I really appreciate it. :) > > > It depends. What's exactly do you want to prevent? It doesn't seem like a > > .. > > include, say, additional HTML content, use file_get_contents() instead. > > Very good points. My

Re: [PHP] Replacing a special character

2010-04-18 Thread Michiel Sikma
On 18 April 2010 16:46, Peter Lind wrote: > On 18 April 2010 16:40, Phpster wrote: > > > > > > On Apr 18, 2010, at 8:59 AM, Michael Stroh wrote: > > > >> I have this form that people use to add entries into a MySQL database. > >> Recently I've had some users insert − in their entries instead of

Re: [PHP] limit to var_dump?

2010-04-17 Thread Michiel Sikma
On 16 April 2010 16:15, Ashley Sheridan wrote: > I'm seeing some strange behaviour with var_dump. Is there a limit to how > many levels deep that var_dump can display? > > -snip- > > However, when I var_dump the top-most object (the Gantt object) the > predecessors array for Gantt_Task 1.2 just s

Re: [PHP] PHP include security

2010-04-17 Thread Michiel Sikma
On 16 April 2010 06:57, Micky Hulse wrote: > Hi, > > -snip- > > The above code snippet is used in a class which would allow developers > (of a specific CMS) to include files without having to put php include > tags on the template view. > > The include path will be using the server root path, and

Re: [PHP] How define if javascript is on with php

2010-04-17 Thread Michiel Sikma
On 16 April 2010 19:02, tedd wrote: > At 3:46 PM +0200 4/16/10, Michiel Sikma wrote: > >> On 16 April 2010 14:06, Paulo-WORK wrote: >> >> -snip- >> > > Paulo: > > I agree. Here's a working example with everything you need: > > http://s

Re: [PHP] How define if javascript is on with php

2010-04-16 Thread Michiel Sikma
On 16 April 2010 14:06, Paulo-WORK wrote: > On 16/04/2010 12:54, Ashley Sheridan wrote: > >> On Fri, 2010-04-16 at 12:50 +0100, Paulo-WORK wrote: >> >>> Hello and thanks for any replies that this message may get. >>> I have a issue to solve regarding PHP. >>> My website relies heavlly on jquery