Re: [PHP] Re: Help with some clever bit operations

2006-07-20 Thread Paul Novitski
Niels schrieb: The problem: A function tries to update an existing value, but is only allowed to write certain bits. There are 3 variables: A: the existing value, eg. 10110101 B: what the function wants to write, eg. 01011100 C: which bits the function is allowed to write, eg. With the

Re: [PHP] Enterprise grade CMS+Ecomm

2006-07-20 Thread Larry Garfield
On Thursday 20 July 2006 11:30, Chris W. Parker wrote: > The answer doesn't even have to be specifically one way or the other. It > could be a mixture of the two. Perhaps I use something like Drupal > (which I have no experience with) for the CMS part and write my own > ecommerce application. Or p

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 17:09, John Nichel wrote: > Adam Zey wrote: > > > Note that just because the fact that it works is a feature, doesn't mean > > it's good coding style. register globals is a feature too, but it isn't > > exactly a good idea to use it. > > > > Ding ding ding > > Give that

RE: [PHP] Enterprise grade CMS+Ecomm

2006-07-20 Thread Chris W. Parker
Brady Mitchell on Thursday, July 20, 2006 12:25 PM said: > The answer to this question depends heavily on your needs. What kind > of functionality do you need to get out of your website? If you are > looking for a website that is similar to others in function, than

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Adam Zey
Martin Marques wrote: On Thu, 20 Jul 2006, Adam Zey wrote: Jochem Maas wrote: Robert Cummings wrote: I don't understand - the links point to posts by Rasmus saying that's 'beneficial' - seems to me to be a fairly robust endorsement yet you consider leaving off trailing '?>' wrong (and use Ra

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread John Nichel
Adam Zey wrote: Note that just because the fact that it works is a feature, doesn't mean it's good coding style. register globals is a feature too, but it isn't exactly a good idea to use it. Ding ding ding Give that man a cigar. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 16:53, Adam Zey wrote: > Jochem Maas wrote: > > I don't understand - the links point to posts by Rasmus saying that's > > 'beneficial' - seems to me to be a fairly robust endorsement yet you > > consider leaving off trailing '?>' wrong (and use Rasmus' comments to > > back tha

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Martin Marques
On Thu, 20 Jul 2006, Adam Zey wrote: Jochem Maas wrote: Robert Cummings wrote: I don't understand - the links point to posts by Rasmus saying that's 'beneficial' - seems to me to be a fairly robust endorsement yet you consider leaving off trailing '?>' wrong (and use Rasmus' comments to back

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Jochem Maas
Robert Cummings wrote: > On Thu, 2006-07-20 at 14:15, Martin Marques wrote: >> On Thu, 20 Jul 2006 13:06:10 -0400, Robert Cummings <[EMAIL PROTECTED]> >> wrote: >>> On Thu, 2006-07-20 at 12:12, Adam Zey wrote: Martin Marques wrote: > Now, my question is: Is it a bad practice to "NOT" c

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 16:50, Jochem Maas wrote: > Robert Cummings wrote: > > On Thu, 2006-07-20 at 14:15, Martin Marques wrote: > >> On Thu, 20 Jul 2006 13:06:10 -0400, Robert Cummings <[EMAIL PROTECTED]> > >> wrote: > >>> On Thu, 2006-07-20 at 12:12, Adam Zey wrote: > Martin Marques wrote: >

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Adam Zey
Jochem Maas wrote: Robert Cummings wrote: On Thu, 2006-07-20 at 14:15, Martin Marques wrote: On Thu, 20 Jul 2006 13:06:10 -0400, Robert Cummings <[EMAIL PROTECTED]> wrote: On Thu, 2006-07-20 at 12:12, Adam Zey wrote: Martin Marques wrote: > Now, my question is: Is it

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Martin Marques
On Thu, 20 Jul 2006, Stephen Lake wrote: As far as getting the header error resolved, try this: http://ca3.php.net/manual/en/function.ob-start.php I'll stick with not closing my scripts, just like Rasmus said. :-) -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 --

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Stephen Lake
As far as getting the header error resolved, try this: http://ca3.php.net/manual/en/function.ob-start.php HTH Steve "Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 2006-07-20 at 14:15, Martin Marques wrote: >> On Thu, 20 Jul 2006 13:06:10 -0400, Robert Cumm

Re: [PHP] headers and newline at end of script

2006-07-20 Thread Jochem Maas
Martin Marques wrote: > On Thu, 20 Jul 2006 11:30:14 -0400, John Nichel <[EMAIL PROTECTED]> wrote: >> Jochem Maas wrote: >>> I never add the final closing '?>' in any script for this very reason. >>> >> 'Cause you're a SLACKER!!! > > What the hell is a SLACKER??? I'm a slacker. > > -- > ---

Re: [PHP] headers and newline at end of script

2006-07-20 Thread John Nichel
Jochem Maas wrote: Martin Marques wrote: On Thu, 20 Jul 2006 11:30:14 -0400, John Nichel <[EMAIL PROTECTED]> wrote: Jochem Maas wrote: I never add the final closing '?>' in any script for this very reason. 'Cause you're a SLACKER!!! What the hell is a SLACKER??? I'm a slacker. Which is

RE: [PHP] Enterprise grade CMS+Ecomm

2006-07-20 Thread Brady Mitchell
> -Original Message- > The question I have to answer is "Do I write everything by myself from scratch > and spend 3-6 months doing it? Or do I spend that same amount of money on a prebuilt system > and spend 1 month integrating our new branding?" The answer to this question depends heavi

Re: [PHP] Escape Chars for MS Exchange/Outlook

2006-07-20 Thread Stut
EST['lname'].', '.$_REQUEST['fname'].'\rReferral: > '.$_REQUEST['referral'].'\rTelephone: '.$_REQUEST['tele'].'\rLoan Officer: > '.$_REQUEST['lo'].'\r'; > > Over in theWindows world, th

RE: [PHP] PAYMENT TRANSACTION

2006-07-20 Thread Jim Moseby
> BBC wrote: > > How are you all? > > I hope some body can give me some references for internet payment. > > I made a kind of shopping cart in my project; even though I > was doubt in making it caused I don't have any idea how to > make internet > > transaction. But I just heard from a friend of

Re: [PHP] PAYMENT TRANSACTION

2006-07-20 Thread Austin Denyer
BBC wrote: > How are you all? > I hope some body can give me some references for internet payment. > I made a kind of shopping cart in my project; even though I was doubt in > making it caused I don't have any idea how to make internet > transaction. But I just heard from a friend of mine that we

RE: [PHP] headers and newline at end of script

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 14:39, Kilbride, James P. wrote: > He never said he didn't want you to do his coding, simply that you were > a slacker. Considering he's self proclaimed 'lazy' just means the two of > you should get on great and you'll probably understand his code better. Won't work because J

RE: [PHP] headers and newline at end of script

2006-07-20 Thread Kilbride, James P.
He never said he didn't want you to do his coding, simply that you were a slacker. Considering he's self proclaimed 'lazy' just means the two of you should get on great and you'll probably understand his code better. James Kilbride SNIPPAGE(Jochem Maas wrote:) > no chance of me getting that code

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 14:15, Martin Marques wrote: > On Thu, 20 Jul 2006 13:06:10 -0400, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Thu, 2006-07-20 at 12:12, Adam Zey wrote: > >> Martin Marques wrote: > >> > Now, my question is: Is it a bad practice to "NOT" close the script > >> with > >>

RE: [PHP] headers and newline at end of script

2006-07-20 Thread Kilbride, James P.
I'd explain but it'd be too much work. James Kilbride > -Original Message- > From: Martin Marques [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 20, 2006 2:32 PM > To: John Nichel > Cc: php-general@lists.php.net > Subject: Re: [PHP] headers and newline at end of script > > > On Thu,

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Martin Marques
On Thu, 20 Jul 2006 13:06:10 -0400, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Thu, 2006-07-20 at 12:12, Adam Zey wrote: >> Martin Marques wrote: >> > Now, my question is: Is it a bad practice to "NOT" close the script >> with >> > the PHP closing "?>"? I mean, just leave the script without

Re: [PHP] headers and newline at end of script

2006-07-20 Thread Martin Marques
On Thu, 20 Jul 2006 11:30:14 -0400, John Nichel <[EMAIL PROTECTED]> wrote: > Jochem Maas wrote: >> >> I never add the final closing '?>' in any script for this very reason. >> > > 'Cause you're a SLACKER!!! What the hell is a SLACKER??? -- ---

[PHP] PAYMENT TRANSACTION

2006-07-20 Thread BBC
How are you all? I hope some body can give me some references for internet payment. I made a kind of shopping cart in my project; even though I was doubt in making it caused I don't have any idea how to make internet transaction. But I just heard from a friend of mine that we can 'join' with spec

Re: [PHP] Enterprise grade CMS+Ecomm

2006-07-20 Thread Paul Scott
On Thu, 2006-07-20 at 09:30 -0700, Chris W. Parker wrote: > As for a CMS, I just watched a video on Drupal 4.7 and it looks quite > interesting. Opinions? > How about having a look at http://avoir.uwc.ac.za/ ? Its Free, very easy to learn and has a very active user and developer community. Its

RE: [PHP] Basic PHP knowledge test

2006-07-20 Thread Mark Steudel
Here's one companies quiz that they gave: With each question, please keep the code short and simple. Make notes on possible caveats and fixes rather than adding a lot of error-checking to your code. 1. Write a PHP script to remove duplicate lines from a file. Do not worry about efficiency.

Re: [PHP] Re: headers and newline at end of script

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 12:12, Adam Zey wrote: > Martin Marques wrote: > > Now, my question is: Is it a bad practice to "NOT" close the script > with > > the PHP closing "?>"? I mean, just leave the script without a closing > > PHP simbols, as this scripts are included? > > Yes. Wrong :) Cheer

[PHP] Enterprise grade CMS+Ecomm

2006-07-20 Thread Chris W. Parker
Hello, So we're getting ready to redo our website once again to integrate some modern changes and a shift in branding. I'm currently looking at all my options as far as software goes. The question I have to answer is "Do I write everything by myself from scratch and spend 3-6 months doing it? Or d

[PHP] Re: headers and newline at end of script

2006-07-20 Thread tedd
Hi: So is the consensuses here to NOT close the "?>" tag? tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Setting cookie on one domain for an other domain

2006-07-20 Thread Chris Boget
However, I can not detect the cookie at domain2.com. You aren't going to be able to nor should you be able to. It's a security feature of the browsers. A solution would be to just make a redirect to the other domain where the cookie is set and then return. That would be one solution. Qu

Re: [PHP] Setting cookie on one domain for an other domain

2006-07-20 Thread Jon Anderson
AFAIK, this could be a security risk, so even if PHP would allow it (which it might - I don't know), there is a good chance most browsers would not. I certainly wouldn't count on being able to do so. You could however use something like AJAX to do an asynchronous request to domain2, which woul

Re: [PHP] doubt - session file size

2006-07-20 Thread tedd
At 5:58 PM +0200 7/20/06, Jochem Maas wrote: > >> On Thu, 2006-07-20 at 01:03, suresh kumar wrote: > >>> Hi, >maybe there could be a limit to the number of emails the OP is allowed >to send without ever replying to anyone who offers a possible answer to >his question. :-) I think you need to under

Re: [PHP] headers and newline at end of script

2006-07-20 Thread Jochem Maas
John Nichel wrote: > Jochem Maas wrote: >> Martin Marques wrote: >>> I'm looking for an opinion on programming style. >>> >>> Basicaly, I make systems using PEAR::DB and PEAR::HTML_Template_IT. This >>> last one puts all the HTML away from the PHP code, which has made life >>> much easier. >>> >>>

Re: [PHP] Difference between 2 time entries

2006-07-20 Thread tedd
At 12:41 PM +0200 7/20/06, Chris Grigor wrote: >Morning all, > >I am looking to get the differnce in hours / minutes between 2 values. > >Currently I have 2 time entries being retruned from mysql, one which is a >start time and >the other which is a finish time. > >So > >$start = '13:12:17'; >$fini

Re: [PHP] Difference between 2 time entries

2006-07-20 Thread tedd
At 1:51 PM +0200 7/20/06, nicolas figaro wrote: >IMHO, the best is to generate a timestamp using mktime for each date. >you can the calculate the difference of timestamps and convert it back using >date. > >$tm_start = mktime(substr($start,0,2),substr($start,3,2), substr($start,5,2)); >$tm_finish

[PHP] Escape Chars for MS Exchange/Outlook

2006-07-20 Thread Mike
'.$_REQUEST['referral'].'\rTelephone: '.$_REQUEST['tele'].'\rLoan Officer: '.$_REQUEST['lo'].'\r'; Over in theWindows world, the email takes it literally and keeps it in the message instead of giving me the desired effect. This Lead c

[PHP] Re: headers and newline at end of script

2006-07-20 Thread Adam Zey
Martin Marques wrote: > Now, my question is: Is it a bad practice to "NOT" close the script with the PHP closing "?>"? I mean, just leave the script without a closing PHP simbols, as this scripts are included? Yes. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] Setting cookie on one domain for an other domain

2006-07-20 Thread Peter Lauri
Best group member, When a user does a specific action on domain1.com I want a cookie to be set so that domain1.com and domain2.com can reach it. Ok, after reading the manual for setcookie() I tried this: setcookie("thevariable", "thevalue", time()+60*60*24*30, "/", ".domain1.com"); setcook

Re: [PHP] doubt - session file size

2006-07-20 Thread Jochem Maas
Chris wrote: > Robert Cummings wrote: >> On Thu, 2006-07-20 at 01:03, suresh kumar wrote: >>> Hi, >>> I am having one doubt,i am using session variable for storing details. >>> but i am afraid if there is around 1 users,wherether session will >>> be able to store all the datas of 1 users,a

Re: [PHP] headers and newline at end of script

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 11:30, John Nichel wrote: > Jochem Maas wrote: > > Martin Marques wrote: > >> I'm looking for an opinion on programming style. > >> > >> Basicaly, I make systems using PEAR::DB and PEAR::HTML_Template_IT. This > >> last one puts all the HTML away from the PHP code, which has m

Re: [PHP] headers and newline at end of script

2006-07-20 Thread John Nichel
Jochem Maas wrote: Martin Marques wrote: I'm looking for an opinion on programming style. Basicaly, I make systems using PEAR::DB and PEAR::HTML_Template_IT. This last one puts all the HTML away from the PHP code, which has made life much easier. Now, sometimes I warning messages like this one

Re: [PHP] headers and newline at end of script

2006-07-20 Thread Jochem Maas
Martin Marques wrote: > I'm looking for an opinion on programming style. > > Basicaly, I make systems using PEAR::DB and PEAR::HTML_Template_IT. This > last one puts all the HTML away from the PHP code, which has made life > much easier. > > Now, sometimes I warning messages like this one: > > P

[PHP] headers and newline at end of script

2006-07-20 Thread Martin Marques
I'm looking for an opinion on programming style. Basicaly, I make systems using PEAR::DB and PEAR::HTML_Template_IT. This last one puts all the HTML away from the PHP code, which has made life much easier. Now, sometimes I warning messages like this one: PHP Warning: Cannot modify header in

Re: [PHP] Session breaks when form data submitted

2006-07-20 Thread Ray Hauge
On Thursday 20 July 2006 09:09, Jeffrey wrote: > We have a site which requires users log in. Once they do so a session is > created (session_start), some data is saved as session data, > particularly data which identifies the user, their privileges, etc. If > the session ends, breaks, etc. The user

[PHP] Session breaks when form data submitted

2006-07-20 Thread Jeffrey
We have a site which requires users log in. Once they do so a session is created (session_start), some data is saved as session data, particularly data which identifies the user, their privileges, etc. If the session ends, breaks, etc. The user must log in again. There are also forms on the si

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread Robert Cummings
On Thu, 2006-07-20 at 09:19, Jochem Maas wrote: > Ray Hauge wrote: > > On Thursday 20 July 2006 07:23, John Nichel wrote: > >> Yeah, one of my earliest thoughts on this was to have them write > >> something simple like connecting to a db, selecting multiple rows, > >> parsing our the result, and di

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread Austin Denyer
Ray Hauge wrote: > > Don't forget making it secure. Here is one of my questions people can use if > they like. Feel free to re-word it. I'm a programmer, not a writer ;) > > What change(s) would you make to the following code to make it more secure? > > $id = $_GET['id']; > mysql_query(“DELE

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread Jochem Maas
Ray Hauge wrote: > On Thursday 20 July 2006 07:23, John Nichel wrote: >> Yeah, one of my earliest thoughts on this was to have them write >> something simple like connecting to a db, selecting multiple rows, >> parsing our the result, and displaying it in some fashion. > > Don't forget making it s

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread Ray Hauge
On Thursday 20 July 2006 07:23, John Nichel wrote: > Yeah, one of my earliest thoughts on this was to have them write > something simple like connecting to a db, selecting multiple rows, > parsing our the result, and displaying it in some fashion. Don't forget making it secure. Here is one of my

Re: [PHP] Difference between 2 time entries

2006-07-20 Thread John Meyer
|Found this on the PHP web site, you can add the conversions as the first lines in the functions. function callDuration($dateTimeBegin,$dateTimeEnd) { $dif=$dateTimeEnd - $dateTimeBegin; $hours = floor($dif / 3600); $temp_remainder = $dif - ($hours * 3600); $minutes

[PHP] Difference between 2 time entries

2006-07-20 Thread Chris Grigor
Morning all, I am looking to get the differnce in hours / minutes between 2 values. Currently I have 2 time entries being retruned from mysql, one which is a start time and the other which is a finish time. So $start = '13:12:17'; $finish = '23:12:17'; How would one get the differnce between

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread John Meyer
John Nichel wrote: What does $_POST['x'] mean? What does $ in front of a string of chars without quotes mean? That does register globals mean? Is it possible to run php as a cgi script? When it is necessary to use 'var' in php code? I would probably agree that a problem would be better. Here'

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread John Nichel
Finner, Doug wrote: My advice, give the candidates problems and see how they solve them. Even if they don't finish, you get an idea of how they think. tedd I like this idea! Do you expect them to be able to work with code written by others? If so, hand them some of your existing code (goo

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread John Nichel
Please reply to the list. jekillen wrote: On Jul 19, 2006, at 8:31 AM, John Nichel wrote: We're looking to hire an entry level php programmer here, and I've been tasked with writing the test to evaluate the potential candidates. Being the lazy guy that I am, I naturally turned to Google to

Re: [PHP] Basic PHP knowledge test

2006-07-20 Thread Joe Wollard
To refine that a bit, you may want to give them some code that has been intentionally broken (simple things for the entry level position, such as missing semicolons or curly braces etc) and watch to see how they go about discovering the parse errors. To me, it would be better to hire someon

Re: [PHP] Difference between 2 time entries

2006-07-20 Thread nicolas figaro
Chris Grigor a écrit : Morning all, I am looking to get the differnce in hours / minutes between 2 values. Currently I have 2 time entries being retruned from mysql, one which is a start time and the other which is a finish time. So $start = '13:12:17'; $finish = '23:12:17'; How would one g

[PHP] Difference between 2 time entries

2006-07-20 Thread Chris Grigor
Morning all, I am looking to get the differnce in hours / minutes between 2 values. Currently I have 2 time entries being retruned from mysql, one which is a start time and the other which is a finish time. So $start = '13:12:17'; $finish = '23:12:17'; How would one get the differnce between

RE: [PHP] Basic PHP knowledge test

2006-07-20 Thread Finner, Doug
>>My advice, give the candidates problems and see how they solve them. Even if they don't finish, you get an idea of how they think. >>tedd I like this idea! Do you expect them to be able to work with code written by others? If so, hand them some of your existing code (good examples and not so

[PHP] search string

2006-07-20 Thread weetat
Hi all , I am using php4.3.2,MYSQL and RedHat I have a sql text as shown below: SELECT DISTINCT(tbl_chassis.serial_no),tbl_chassis.host_name,tbl_chassis.chasis_model,tbl_chassis.country,tbl_chassis.city,tbl_chassis.building, tbl_chassis.other,tbl_chassis.status,tbl_chassis.chasis_eos,tbl_c

Re: [PHP] Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8

2006-07-20 Thread nicolas figaro
Mathijs a écrit : Hello there, I Have an problem with UTF-8 and XML. I Output perfect XML (according to IE, Opera and Firefox). I use the Content-Type header with "text/xml; charset=utf-8". For some reason this breaks UTF-8 output. When i remove it it works. But i need the text/xml header. Hi

Re: [PHP] Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8

2006-07-20 Thread Mathijs
Ray Hauge wrote: On Wednesday 19 July 2006 09:27, Mathijs wrote: Hello there, I Have an problem with UTF-8 and XML. I Output perfect XML (according to IE, Opera and Firefox). I use the Content-Type header with "text/xml; charset=utf-8". For some reason this breaks UTF-8 output. When i remove i