php-general Digest 25 Apr 2006 05:14:18 -0000 Issue 4091

2006-04-24 Thread php-general-digest-help
/unsub.php __ NOD32 1.1504 (20060424) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ---End Message--- ---BeginMessage--- Try print(a href='/index.php?name=$name'Foo Bar/a); Jeremy Schreckhise, M.B.A. Hello, == ?php $name = 'foo bar

Re: [PHP] Need help with an if statement

2006-04-24 Thread admin
Kinda depends on how you build the list of links i guess. What you need is a unique identifier. But would be more easy if you show some code. item 1 cart.php?item=1 item 2 cart.php?item=2 Then when you make the links. Use a loop foreach($links as $link) { if ($link[id] == $_GET[item]) {

Re: [PHP] How to find img tag and get src of image

2006-04-24 Thread T.Lensselink
Use preg_match_all Think this will work. But i'm for sure no regular expresion guru :) preg_match_all(/src=(.*)\040/i, $Text, $Result); print_r($Result); Gr, Thijs Hi everybody! I want to get src of image form a $text, I have a below text $Text = table border=1 cellpadding=3%

Re: [PHP] Need help with an if statement

2006-04-24 Thread Anthony Ettinger
Yikes...font? that's been deprecated since the turn of the century! do it with css... html ul liitem 1/li li class=selecteditem 2/li liitem 3/li /ul css: ul li { background-image: url(/img/arrow-off.png); color: gray; } ul .selected { background-image: url(/img/arrow-on.png); color: red; }

Re: [PHP] strange php url

2006-04-24 Thread nicolas figaro
Hi all and thanks for the answers. On my server, the building of some webpages with url like the one below produces a loop and crashes the server. (http://myurl.mydomain/path/index.php/path/index.php). As I never heard about the PATH_INFO before, I'm not sure the site uses this value.

Re: [PHP] shopping carts

2006-04-24 Thread Jochem Maas
cheers Richard! you brightened up my monday morning. the badger reference will keep me going till wednesday ;-) Richard Lynch wrote: On Sun, April 23, 2006 9:01 am, tedd wrote: ... Another aspect is this: Why do we call it a shopping cart? Look, a shopping cart is a goddam big basket on

Re: [PHP] CMS for Auto Parts

2006-04-24 Thread Johan Martin
On 23 Apr 2006, at 8:03 PM, John Hicks wrote: CK wrote: Hi, On Apr 22, 2006, at 1:26 PM, John Hicks wrote: CK wrote: Hi, I've been commissioned to design a web application for auto parts sales. The Flash Front end will communicate with a MySQL DB via PHP. In addition, PHP/XML should

Re: [PHP] How to find img tag and get src of image

2006-04-24 Thread Paul Scott
On Mon, 2006-04-24 at 07:30 +0700, Pham Huu Le Quoc Phuc wrote: Hi everybody! I want to get src of image form a $text, I have a below text Regex - there is one for exactly that on http://fsiu.uwc.ac.za check out the wiki page of regular expressions. --Paul -- PHP General Mailing List

[PHP] Jay- RE: [PHP] How to find img tag and get src of image

2006-04-24 Thread Ryan A
--- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Hi everybody! I want to get src of image form a $text, I have a below text $Text = table border=1 cellpadding=3% cellspacing=3% width=100% trtd width=20% img align=middle border=0 id=userupload/78/Autumn.jpg

[PHP] RE: Jay- RE: [PHP] How to find img tag and get src of image OT

2006-04-24 Thread Jay Blanchard
[snip] I want to get src of image form a $text And I want a pony! Jay, a warning would be nice before you post stuff like you posted above... I am _supposed_ to be working here and suddenly when I burst into laughter and then control myself to a big smile on my face everyone looks at me and

Re: [PHP] strange php url

2006-04-24 Thread Ahmed Saad
On 4/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: redirects to: http://www.example.com/index.php?action=edittype=customerid=1234adminaccess=1 and you put admin access flags (read, determine roles) in URL parameters? -ahmed

Re: [PHP] How to find img tag and get src of image

2006-04-24 Thread Philip Thompson
On Apr 23, 2006, at 10:10 PM, Paul Novitski wrote: At 05:30 PM 4/23/2006, Pham Huu Le Quoc Phuc wrote: I want to get src of image form a $text, I have a below text $Text = table border=1 cellpadding=3% cellspacing=3% width=100% trtd width=20% img align=middle border=0

Re: [PHP] shopping carts

2006-04-24 Thread Tom Cruickshank
Have you checked out oscommerce? www.oscommerce.com? It does what I think you need. And I think it might even be free, that is, if your time doesn't cost anything. As for it being simpleyou'll need to define that term. Simple for me could be rather complicated for you or vice versa. Tom

Re: [PHP] sorting troubles

2006-04-24 Thread Philip Thompson
On Apr 22, 2006, at 4:49 AM, William Stokes wrote: Hello, Any idea how to sort this? I have a column in DB that contains this kind of data, A20,B16,B17C14,C15,D13,D12 etc. I would like to print this data to a page and sort it ascending by the letter an descending by the number. Can this be

Re: [PHP] sorting troubles

2006-04-24 Thread Philip Thompson
On Apr 24, 2006, at 9:06 AM, Philip Thompson wrote: On Apr 22, 2006, at 4:49 AM, William Stokes wrote: Hello, Any idea how to sort this? I have a column in DB that contains this kind of data, A20,B16,B17C14,C15,D13,D12 etc. I would like to print this data to a page and sort it ascending by

Re: [PHP] RE: Jay- RE: [PHP] How to find img tag and get src of image OT

2006-04-24 Thread Ryan A
--- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] I want to get src of image form a $text And I want a pony! Jay, a warning would be nice before you post stuff like you posted above... I am _supposed_ to be working here and suddenly when I burst into laughter and then control

[PHP] list noise [WAS: How to find img tag and get src of image]

2006-04-24 Thread Paul Novitski
At 06:29 AM 4/24/2006, Philip Thompson wrote: I think you are too kind. I think my response would have been likes Jay's... RTFM. However, you went above and beyond. Isn't this listserv great!! =D Thanks, Philip. There may or may not be such a thing as stupid questions but there sure as hell

RE: [PHP] list noise [WAS: How to find img tag and get src of image]

2006-04-24 Thread Jay Blanchard
[snip] I'm here for PHP. I love the wit, humor, intelligence, and passion of the list debates, but I'm working my butt off earning my living writing software and simply don't have time to scroll down through some enormous unsnipped quote simply to find thanks! or you weenie! at the bottom.

Re: [PHP] list noise [WAS: How to find img tag and get src of image]

2006-04-24 Thread John Nichel
Jay Blanchard wrote: snip I'm golden! I don't remember asking for a list of your sexual perversions. :-p -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] shopping carts

2006-04-24 Thread tedd
Another aspect is this: Why do we call it a shopping cart? Look, a shopping cart is a goddam big basket on wheels. What we call a shopping cart on-line is actually, your entire stock catalog, fulfillment, cash register, check-out, delivery, stock management, and internal accounting system, with

Re: [PHP] shopping carts

2006-04-24 Thread Ryan A
--- tedd [EMAIL PROTECTED] wrote: Hey, Hey. That ain't a shopping cart That's a friggin' store. LOL You're absolutely right -- tho, it sounds like good stuff for a comedy routine. Pity it would fly over the heads of most people though, only us geeks (term used loosely) would get

RE: [PHP] shopping carts

2006-04-24 Thread Jay Blanchard
[snip] Another aspect is this: Why do we call it a shopping cart? [/snip] We discarded this terminology in favor of 'order fulfillment system' or OFS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Reusable Singleton pattern using PHP5

2006-04-24 Thread Simas Toleikis
Hello, As the %subj% says.. can't get it to work with PHP5. I mean, you could do this kind of stuff with templates/generics on other languages and then make a class singleton by just inheriting from base Singleton class. No need to redefine GetInstance() (which usually contains the same redundant

Re: [PHP] Reusable Singleton pattern using PHP5

2006-04-24 Thread Jochem Maas
[top posting to just to spite the anti-top-posting crowd :-P] php6 will include static late binding - until then you have 2 choices, create a hack (see below) or stick redundant code into each class you want to be a singleton. (welcome to the club that thinks this should have been possible

RE: [PHP] shopping carts

2006-04-24 Thread Ryan A
--- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Another aspect is this: Why do we call it a shopping cart? [/snip] We discarded this terminology in favor of 'order fulfillment system' or OFS Man, I knew this girl some time back, she had a really good OFS... Oops, this might be a

Re: [PHP] shopping carts

2006-04-24 Thread Tom Cruickshank
Waaait a second. You actually knew a girl who took orders? On 4/24/06, Ryan A [EMAIL PROTECTED] wrote: --- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Another aspect is this: Why do we call it a shopping cart? [/snip] We discarded this terminology in favor of 'order

Re: [PHP] Reusable Singleton pattern using PHP5

2006-04-24 Thread Simas Toleikis
php6 will include static late binding Great. Love the other new features, especially namespaces. - until then you have 2 choices, create a hack (see below) or stick redundant code into each class you want to be a singleton. The hack doesn't work (See below). Guess we are left with

[PHP] Session Array Disappears

2006-04-24 Thread Webmaster
Hello, The site I'm working on works like this... Requires a login that uses sessions to remember username and email address. Upon being verified, the user is presented with a page that displays several questions regarding their background. Upon submitting the background page, a script

RE: [PHP] Session Array Disappears

2006-04-24 Thread Brady Mitchell
You're missing the session_start() call at the beginning of your code. I'm surprised it works at all without that.. http://www.php.net/manual/en/ref.session.php http://www.php.net/manual/en/function.session-start.php Brady -Original Message- From: Webmaster [mailto:[EMAIL PROTECTED]

Re: [PHP] shopping carts

2006-04-24 Thread Ryan A
--- Tom Cruickshank [EMAIL PROTECTED] wrote: Waaait a second. You actually knew a girl who took orders? What do you tell a girl with two black eyes? Nothing, coz told the b***h twice! -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but

[PHP] how to keep spaces in parameters in URL?

2006-04-24 Thread Bing Du
Hello, == ?php $name = 'foo bar'; echo a href=/index.php?name=. $name .Foo Bar/a; ? == Then the URL showed up at the bottom border of the browser has 'name=foo'. What should I do to have 'name=foo bar' in the URL? I tried htmlspecialchars but did not see any difference. I'd appreciate any

Re: [PHP] shopping carts

2006-04-24 Thread Lisa A
For those of you who are making a joke out of my question, glad to have given you all a laugh. I want to thank everyone else for being so nice and helpful to beginners. Everyone has to start somewhere and can't afford a $1000 to spend and sorry I'm not the geek you are and can write and

RE: [PHP] how to keep spaces in parameters in URL?

2006-04-24 Thread Chrome
. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ NOD32 1.1504 (20060424) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- PHP General Mailing List (http://www.php.net

RE: [PHP] how to keep spaces in parameters in URL?

2006-04-24 Thread Jeremy Schreckhise
Try print(a href='/index.php?name=$name'Foo Bar/a); Jeremy Schreckhise, M.B.A. Hello, == ?php $name = 'foo bar'; echo a href=/index.php?name=. $name .Foo Bar/a; ? == Then the URL showed up at the bottom border of the browser has 'name=foo'. What should I do to have 'name=foo bar' in the

[PHP] Booleans in lowercase or uppercase

2006-04-24 Thread Jesper Forsberg
Hello, I've seen the usage of both TRUE, true, FALSE and false all over the php.net site. Yet, there does not seem to be a clear distinction between the uppercase and lowercase variants. Will it make any difference if i use lowercase or uppercase? I would be thankful if someone could shed some

[PHP] Re: Booleans in lowercase or uppercase

2006-04-24 Thread M. Sokolewicz
Jesper Forsberg wrote: Hello, I've seen the usage of both TRUE, true, FALSE and false all over the php.net site. Yet, there does not seem to be a clear distinction between the uppercase and lowercase variants. Will it make any difference if i use lowercase or uppercase? I would be thankful if

Re: [PHP] Reusable Singleton pattern using PHP5

2006-04-24 Thread Jochem Maas
Simas Toleikis wrote: php6 will include static late binding Great. Love the other new features, especially namespaces. not sure namespaces will make it ... I believe the decision on that is still out. - until then you have 2 choices, create a hack (see below) or stick redundant code

Re: [PHP] Re: Booleans in lowercase or uppercase

2006-04-24 Thread Jochem Maas
M. Sokolewicz wrote: Jesper Forsberg wrote: Hello, I've seen the usage of both TRUE, true, FALSE and false all over the php.net site. Yet, there does not seem to be a clear distinction between the uppercase and lowercase variants. Will it make any difference if i use lowercase or uppercase?

Re: [PHP] Re: Booleans in lowercase or uppercase

2006-04-24 Thread Jesper Forsberg
Thank you very much. You've been most helpful :) On 4/25/06, Jochem Maas [EMAIL PROTECTED] wrote: M. Sokolewicz wrote: Jesper Forsberg wrote: Hello, I've seen the usage of both TRUE, true, FALSE and false all over the php.net site. Yet, there does not seem to be a clear distinction

Re: [PHP] Session Array Disappears

2006-04-24 Thread Webmaster
Thanks for the reply. Sorry, that was a typo in the email. I actually do have session_start(); at the beginning of the scripts. My bad. Thanks, R Brady Mitchell wrote: You're missing the session_start() call at the beginning of your code. I'm surprised it works at all without that..

Re: [PHP] Session Array Disappears

2006-04-24 Thread Al
add a ignore_user_abort(TRUE) first thing in your code. Webmaster wrote: Thanks for the reply. Sorry, that was a typo in the email. I actually do have session_start(); at the beginning of the scripts. My bad. Thanks, R Brady Mitchell wrote: You're missing the session_start() call at the

Re: [PHP] Session Array Disappears

2006-04-24 Thread Webmaster
Hello, Thank you for the reply. Interesting function. I have not heard of that one previously. I've read the manual pages for it.If I understand ignore_user_abort(TRUE)...you are thinking that maybe the user is being disconnected (using stop button or having ISP issues) prior to the

Re: [PHP] Booleans in lowercase or uppercase

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 5:12 pm, Jesper Forsberg wrote: I've seen the usage of both TRUE, true, FALSE and false all over the php.net site. Yet, there does not seem to be a clear distinction between the uppercase and lowercase variants. Will it make any difference if i use lowercase or

Re: [PHP] Session Array Disappears

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 2:48 pm, Webmaster wrote: In reading the www.php.net/manual/en/ref.session.php page, I'd like to point out we do not use cookies. The session id is propagated in the URL (although it's not visible in the URL bar). Something is very odd here... Unless the session data

Re: [PHP] Session Array Disappears

2006-04-24 Thread Richard Lynch
I'm thinking the guy who suggested ignore_user_abort(TRUE) is just doing Voodoo Programming :-) It may or may not be something you want, but I doubt it will have any affect whatsoever on your posted problem. Actually, I think anywhere that somebody thinks they need ignore_user_abort, they

Re: [PHP] Reusable Singleton pattern using PHP5

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 2:18 pm, Simas Toleikis wrote: php6 will include static late binding Great. Love the other new features, especially namespaces. - until then you have 2 choices, create a hack (see below) or stick redundant code into each class you want to be a singleton. The hack

[PHP] PHP Standard style of writing your code

2006-04-24 Thread Martin Zvarík
Hi, I see everyone has its own way of writing the code. If there is 10 programmers working on same thing, it would be good if they would have same style of writing the PHP code. So, my question is: Is there anything what would define standard style of writing PHP code? Thanks, Martin

Re: [PHP] strange php url

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 1:58 am, nicolas figaro wrote: On my server, the building of some webpages with url like the one below produces a loop and crashes the server. (http://myurl.mydomain/path/index.php/path/index.php). Odds are VERY GOOD that you have some kind of bad regex in your

Re: [PHP] strange php url

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 8:10 am, Ahmed Saad wrote: On 4/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: redirects to: http://www.example.com/index.php?action=edittype=customerid=1234adminaccess=1 and you put admin access flags (read, determine roles) in URL parameters? Hopefully that's

Re: [PHP] Need help with an if statement

2006-04-24 Thread Richard Lynch
On Mon, April 24, 2006 12:24 am, Pub wrote: I am really new to all this and I am really hoping I can get some help PLEASE... I am making a website with x-cart which uses PHP and Smarty templates. I need to make an if statement that puts a little arrow gif in front of the link that is