Re: [PHP] Can't find my error
On Friday 07 May 2010 00:42:38 Paul M Foster wrote: On Thu, May 06, 2010 at 10:45:09PM -0400, David McGlone wrote: snip I got sortof a joke I thought about a little while ago, it goes something like this: This list works like a team, and there is no i in team. I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) Reminds me of a movie. And from that same movie, You've got red on you. ;-} Shaun of the Dead wasn't it? :-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Thursday 06 May 2010 23:47:23 Jim Lucas wrote: Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init) $_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! LOL sometimes a second set of eyes is required. We've all been in your shoes! True. I need to learn to ask for help, but I don't want to fall into the habit of taking it for granted. I'm still learning so I need to try my hardest before I go getting an answer. Hey David, As a budding PHP developer (Been doing it off and on for the past 4 years now.. Mostly off though...) I got some great advice early on from tedd sperling... When I have a problem that I can't fix... I sit down and write the e-mail to the list... Thinking through all the info that might be helpful to help debug it... What I've tried, what Im expecting... Things of that nature... Usually by the time I'm done writing the e-mail I'e figured out the problem... Not always but once I get done with writing it, if I still can't figure it out I don't feel so bad hitting send and lighting up everyones inboxes with my mindless drivel :P That makes sense. If I carefully think about what Tedd said, I see it this way: when writing the E-Mail it will take us mentally through the steps as we are typing them and it will probably get us to realize where it went wrong. I got sortof a joke I thought about a little while ago, it goes something like this: This list works like a team, and there is no i in team. I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) Maybe no 'i' but there's me, met, meat, eat, at, and am :) We are surely a different breed ;-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Fri, May 07, 2010 at 06:23:35AM -0400, David McGlone wrote: On Friday 07 May 2010 00:42:38 Paul M Foster wrote: On Thu, May 06, 2010 at 10:45:09PM -0400, David McGlone wrote: snip I got sortof a joke I thought about a little while ago, it goes something like this: This list works like a team, and there is no i in team. I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) Reminds me of a movie. And from that same movie, You've got red on you. ;-} Shaun of the Dead wasn't it? :-) We have a winner! Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
2010/5/6 David McGlone da...@dmcentral.net: On Wednesday 05 May 2010 16:19:35 Paul M Foster wrote: On Wed, May 05, 2010 at 01:03:41PM -0400, David McGlone wrote: On Wednesday 05 May 2010 12:51:00 Ashley Sheridan wrote: On Wed, 2010-05-05 at 12:55 -0400, David McGlone wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: snip WOW I have spent at least 4 hours reading and re-reading it and it took you 3 seconds. That was the problem. How, how, how could I have overlooked that so many times Thank you Ashley, I should have asked you 3 hours ago. ;-) Yeah, David, the rest of us are really disappointed in you. I mean, it's not like that's ever happened to *us*. ;-} I've been studying PHP for at least 2 years straight now, after dabbling in it for about a year 6 years ago. So even though I've had my nose to the grind for a good 2 years now, I don't think I can call my mistake a rookie mistake. Thats what's frustrating to me. LOL -- Blessings, David M. I would take this as a hint to prefer intval() instead of casts. initval($foo) would have drawn a fatal error - can't be overseen. ;) Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
Jan G.B. wrote: 2010/5/6 David McGlone da...@dmcentral.net: On Wednesday 05 May 2010 16:19:35 Paul M Foster wrote: On Wed, May 05, 2010 at 01:03:41PM -0400, David McGlone wrote: On Wednesday 05 May 2010 12:51:00 Ashley Sheridan wrote: On Wed, 2010-05-05 at 12:55 -0400, David McGlone wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: snip WOW I have spent at least 4 hours reading and re-reading it and it took you 3 seconds. That was the problem. How, how, how could I have overlooked that so many times Thank you Ashley, I should have asked you 3 hours ago. ;-) Yeah, David, the rest of us are really disappointed in you. I mean, it's not like that's ever happened to *us*. ;-} I've been studying PHP for at least 2 years straight now, after dabbling in it for about a year 6 years ago. So even though I've had my nose to the grind for a good 2 years now, I don't think I can call my mistake a rookie mistake. Thats what's frustrating to me. LOL -- Blessings, David M. I would take this as a hint to prefer intval() instead of casts. initval($foo) would have drawn a fatal error - can't be overseen. ;) Casts are an order of magnitude faster than function calls. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
At 6:40 AM -0400 5/7/10, David McGlone wrote: On Thursday 06 May 2010 23:47:23 Jim Lucas wrote: Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: -snip- mindless chater We are surely a different breed ;-) -- Blessings, David M. To all: Yes, the breed that finds such chatter assuming. Careful, we might drool on our pocket protectors. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
tedd wrote: At 6:40 AM -0400 5/7/10, David McGlone wrote: On Thursday 06 May 2010 23:47:23 Jim Lucas wrote: Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: -snip- mindless chater We are surely a different breed ;-) -- Blessings, David M. To all: Yes, the breed that finds such chatter assuming. Careful, we might drool on our pocket protectors. :-) I have some duct tape that can help you with your drooling problem! :B Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
At 11:53 AM -0400 5/7/10, Robert Cummings wrote: tedd wrote: At 6:40 AM -0400 5/7/10, David McGlone wrote: On Thursday 06 May 2010 23:47:23 Jim Lucas wrote: Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: -snip- mindless chater We are surely a different breed ;-) Yes, the breed that finds such chatter assuming. Careful, we might drool on our pocket protectors. :-) I have some duct tape that can help you with your drooling problem! :B Cheers, Rob. I use Duck tape. It quacks me up .:-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
tedd wrote: At 11:53 AM -0400 5/7/10, Robert Cummings wrote: tedd wrote: At 6:40 AM -0400 5/7/10, David McGlone wrote: On Thursday 06 May 2010 23:47:23 Jim Lucas wrote: Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: -snip- mindless chater We are surely a different breed ;-) Yes, the breed that finds such chatter assuming. Careful, we might drool on our pocket protectors. :-) I have some duct tape that can help you with your drooling problem! :B Cheers, Rob. I use Duck tape. It quacks me up .:-) You must be wealthy... It ruffles my feathers that it's way too expensive for practical use. I just can't foot the bill! Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can't find my error
From: Robert Cummings tedd wrote: At 6:40 AM -0400 5/7/10, David McGlone wrote: On Thursday 06 May 2010 23:47:23 Jim Lucas wrote: Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: -snip- mindless chater We are surely a different breed ;-) Yes, the breed that finds such chatter assuming. Careful, we might drool on our pocket protectors. :-) I have some duct tape that can help you with your drooling problem! I use some 100-mile-an-hour tape my son left the last time he was home on leave. That reminds me, I need to get some more from him when he gets back from Baghdad next month. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can't find my error [X-PHP]
At 12:49 PM -0400 5/7/10, Bob McConnell wrote: I use some 100-mile-an-hour tape my son left the last time he was home on leave. That reminds me, I need to get some more from him when he gets back from Baghdad next month. Bob McConnell Bob : When he arrives home, tell him Thanks for his service from a Vietnam Vet (something that was lacking for us at the time). Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Friday 07 May 2010 12:10:50 tedd wrote: At 11:53 AM -0400 5/7/10, Robert Cummings wrote: tedd wrote: At 6:40 AM -0400 5/7/10, David McGlone wrote: On Thursday 06 May 2010 23:47:23 Jim Lucas wrote: Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: -snip- mindless chater We are surely a different breed ;-) Yes, the breed that finds such chatter assuming. Careful, we might drool on our pocket protectors. :-) I have some duct tape that can help you with your drooling problem! :B Cheers, Rob. I use Duck tape. It quacks me up .:-) Oh Jz! that one did quack me up!!! -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error [X-PHP]
On Friday 07 May 2010 13:45:37 tedd wrote: At 12:49 PM -0400 5/7/10, Bob McConnell wrote: I use some 100-mile-an-hour tape my son left the last time he was home on leave. That reminds me, I need to get some more from him when he gets back from Baghdad next month. Bob McConnell Bob : When he arrives home, tell him Thanks for his service from a Vietnam Vet (something that was lacking for us at the time). And thanks from me, an ordinary citizen who can't serve his country due to being hearing impaired. -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Friday 07 May 2010 11:26:56 Robert Cummings wrote: Jan G.B. wrote: 2010/5/6 David McGlone da...@dmcentral.net: On Wednesday 05 May 2010 16:19:35 Paul M Foster wrote: On Wed, May 05, 2010 at 01:03:41PM -0400, David McGlone wrote: On Wednesday 05 May 2010 12:51:00 Ashley Sheridan wrote: On Wed, 2010-05-05 at 12:55 -0400, David McGlone wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: snip WOW I have spent at least 4 hours reading and re-reading it and it took you 3 seconds. That was the problem. How, how, how could I have overlooked that so many times Thank you Ashley, I should have asked you 3 hours ago. ;-) Yeah, David, the rest of us are really disappointed in you. I mean, it's not like that's ever happened to *us*. ;-} I've been studying PHP for at least 2 years straight now, after dabbling in it for about a year 6 years ago. So even though I've had my nose to the grind for a good 2 years now, I don't think I can call my mistake a rookie mistake. Thats what's frustrating to me. LOL -- Blessings, David M. I would take this as a hint to prefer intval() instead of casts. initval($foo) would have drawn a fatal error - can't be overseen. ;) Casts are an order of magnitude faster than function calls. Ok y'all lost me wy back there... LOL Is there some type of function I can write to catch up? -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init) $_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! LOL sometimes a second set of eyes is required. We've all been in your shoes! True. I need to learn to ask for help, but I don't want to fall into the habit of taking it for granted. I'm still learning so I need to try my hardest before I go getting an answer. Hey David, As a budding PHP developer (Been doing it off and on for the past 4 years now.. Mostly off though...) I got some great advice early on from tedd sperling... When I have a problem that I can't fix... I sit down and write the e-mail to the list... Thinking through all the info that might be helpful to help debug it... What I've tried, what Im expecting... Things of that nature... Usually by the time I'm done writing the e-mail I'e figured out the problem... Not always but once I get done with writing it, if I still can't figure it out I don't feel so bad hitting send and lighting up everyones inboxes with my mindless drivel :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init) $_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! LOL sometimes a second set of eyes is required. We've all been in your shoes! True. I need to learn to ask for help, but I don't want to fall into the habit of taking it for granted. I'm still learning so I need to try my hardest before I go getting an answer. Hey David, As a budding PHP developer (Been doing it off and on for the past 4 years now.. Mostly off though...) I got some great advice early on from tedd sperling... When I have a problem that I can't fix... I sit down and write the e-mail to the list... Thinking through all the info that might be helpful to help debug it... What I've tried, what Im expecting... Things of that nature... Usually by the time I'm done writing the e-mail I'e figured out the problem... Not always but once I get done with writing it, if I still can't figure it out I don't feel so bad hitting send and lighting up everyones inboxes with my mindless drivel :P That makes sense. If I carefully think about what Tedd said, I see it this way: when writing the E-Mail it will take us mentally through the steps as we are typing them and it will probably get us to realize where it went wrong. I got sortof a joke I thought about a little while ago, it goes something like this: This list works like a team, and there is no i in team. I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init) $_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! LOL sometimes a second set of eyes is required. We've all been in your shoes! True. I need to learn to ask for help, but I don't want to fall into the habit of taking it for granted. I'm still learning so I need to try my hardest before I go getting an answer. Hey David, As a budding PHP developer (Been doing it off and on for the past 4 years now.. Mostly off though...) I got some great advice early on from tedd sperling... When I have a problem that I can't fix... I sit down and write the e-mail to the list... Thinking through all the info that might be helpful to help debug it... What I've tried, what Im expecting... Things of that nature... Usually by the time I'm done writing the e-mail I'e figured out the problem... Not always but once I get done with writing it, if I still can't figure it out I don't feel so bad hitting send and lighting up everyones inboxes with my mindless drivel :P That makes sense. If I carefully think about what Tedd said, I see it this way: when writing the E-Mail it will take us mentally through the steps as we are typing them and it will probably get us to realize where it went wrong. I got sortof a joke I thought about a little while ago, it goes something like this: This list works like a team, and there is no i in team. I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) Maybe no 'i' but there's me, met, meat, eat, at, and am :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
Robert Cummings wrote: David McGlone wrote: On Thursday 06 May 2010 20:49:47 Jason Pruim wrote: On May 5, 2010, at 9:02 PM, David McGlone wrote: On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init) $_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! LOL sometimes a second set of eyes is required. We've all been in your shoes! True. I need to learn to ask for help, but I don't want to fall into the habit of taking it for granted. I'm still learning so I need to try my hardest before I go getting an answer. Hey David, As a budding PHP developer (Been doing it off and on for the past 4 years now.. Mostly off though...) I got some great advice early on from tedd sperling... When I have a problem that I can't fix... I sit down and write the e-mail to the list... Thinking through all the info that might be helpful to help debug it... What I've tried, what Im expecting... Things of that nature... Usually by the time I'm done writing the e-mail I'e figured out the problem... Not always but once I get done with writing it, if I still can't figure it out I don't feel so bad hitting send and lighting up everyones inboxes with my mindless drivel :P That makes sense. If I carefully think about what Tedd said, I see it this way: when writing the E-Mail it will take us mentally through the steps as we are typing them and it will probably get us to realize where it went wrong. I got sortof a joke I thought about a little while ago, it goes something like this: This list works like a team, and there is no i in team. I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) Maybe no 'i' but there's me, met, meat, eat, at, and am :) Cheers, Rob. + mate ate tea -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Thu, May 06, 2010 at 10:45:09PM -0400, David McGlone wrote: snip I got sortof a joke I thought about a little while ago, it goes something like this: This list works like a team, and there is no i in team. I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) Reminds me of a movie. And from that same movie, You've got red on you. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Wed, 2010-05-05 at 12:55 -0400, David McGlone wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: Parse error: syntax error, unexpected T_VARIABLE in /home/david/www/Joe/current/presentation/smarty_plugins/function.load_products_list.php on line 27. Can anyone spot my error? I'd appreciate the help. Here is the function.load_products_list.php file: 1. ?php 2. function smarty_function_load_products_list($params, $smarty) 3. { 4.$products_list = new $ProductsList(); 5.$products_list-init(); 6. 7.//assign the template variable 8.$smarty-assign($params['assign'], $products_list); 9. } 10. 11. //Manage the products list 12. class ProductsList 13. { 14. public $mProducts; 15. public $mSelectedProduct; 16. 17. private $mBoCatalog; 18. 19. //constructor initializes business tier object 20. //and reads query string parameter 21. function __construct() 22. { 23. //creating the middle tier object 24. $this-mBoCatalog = new BoCatalog(); 25. //if ProductID exists in the query string, we're viewing a product. 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; 28. else 29. $this-mSelectedProduct = -1; 30} 31. 32. //calls business tier to read products list and create the links 33. function init() 34. { 35. //get list of products from business tier 36. $this-mProducts = $this-mBoCatalog-GetProducts(); 37. //create the product links 38. for($i = 0; $i count($this-mProducts); $i++) 39. $this-mProducts[$i]['onclick'] = index.php?ProductID= . 40. $this-mProducts[$i]['product_id']; 41. } 42. } 43. ? Just in case Im going to include the template file: {*products_list.tpl*} {load_products_list assign=products_list} {*start products_list*} pProducts/p {*loop through the list of products*} {section name=i loop=$products_list-mProducts} {if ($products_list-mSelectedProduct == $products_list-mProducts[i].product_id)} {assign var=class_d value=ProductSelected} {else} {assign var=class_d value=ProductUnselected} {/if} {*generate a link for a new product in the list*} a href={$products_list-mProducts[i].onclick} $raquo; {$products_list-mProducts[i].make}/a {/section} -- Blessings, David M. Line 27 is this: $this-mSelectedProduct = (init)$_GET['ProductID']; Shouldn't it be (int) not (init)? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Can't find my error
On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry
Re: [PHP] Can't find my error
On 5 May 2010 18:55, David McGlone da...@dmcentral.net wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: Parse error: syntax error, unexpected T_VARIABLE in /home/david/www/Joe/current/presentation/smarty_plugins/function.load_products_list.php on line 27. Can anyone spot my error? I'd appreciate the help. Here is the function.load_products_list.php file: 1. ?php 2. function smarty_function_load_products_list($params, $smarty) 3. { 4. $products_list = new $ProductsList(); 5. $products_list-init(); 6. 7. //assign the template variable 8. $smarty-assign($params['assign'], $products_list); 9. } 10. 11. //Manage the products list 12. class ProductsList 13. { 14. public $mProducts; 15. public $mSelectedProduct; 16. 17. private $mBoCatalog; 18. 19. //constructor initializes business tier object 20. //and reads query string parameter 21. function __construct() 22. { 23. //creating the middle tier object 24. $this-mBoCatalog = new BoCatalog(); 25. //if ProductID exists in the query string, we're viewing a product. 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; pretty sure (init) is not a valid cast ... Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind Flickr: http://www.flickr.com/photos/fake51 BeWelcome: Fake51 Couchsurfing: Fake51 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Wednesday 05 May 2010 12:51:00 Ashley Sheridan wrote: On Wed, 2010-05-05 at 12:55 -0400, David McGlone wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: Parse error: syntax error, unexpected T_VARIABLE in /home/david/www/Joe/current/presentation/smarty_plugins/function.load_pro ducts_list.php on line 27. Can anyone spot my error? I'd appreciate the help. Here is the function.load_products_list.php file: 1. ?php 2. function smarty_function_load_products_list($params, $smarty) 3. { 4. $products_list = new $ProductsList(); 5. $products_list-init(); 6. 7. //assign the template variable 8. $smarty-assign($params['assign'], $products_list); 9. } 10. 11. //Manage the products list 12. class ProductsList 13. { 14. public $mProducts; 15. public $mSelectedProduct; 16. 17. private $mBoCatalog; 18. 19. //constructor initializes business tier object 20. //and reads query string parameter 21. function __construct() 22. { 23. //creating the middle tier object 24. $this-mBoCatalog = new BoCatalog(); 25. //if ProductID exists in the query string, we're viewing a product. 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; 28. else 29. $this-mSelectedProduct = -1; 30 } 31. 32. //calls business tier to read products list and create the links 33. function init() 34. { 35. //get list of products from business tier 36. $this-mProducts = $this-mBoCatalog-GetProducts(); 37. //create the product links 38. for($i = 0; $i count($this-mProducts); $i++) 39. $this-mProducts[$i]['onclick'] = index.php?ProductID= . 40. $this-mProducts[$i]['product_id']; 41. } 42. } 43. ? Just in case Im going to include the template file: {*products_list.tpl*} {load_products_list assign=products_list} {*start products_list*} pProducts/p {*loop through the list of products*} {section name=i loop=$products_list-mProducts} {if ($products_list-mSelectedProduct == $products_list-mProducts[i].product_id)} {assign var=class_d value=ProductSelected} {else} {assign var=class_d value=ProductUnselected} {/if} {*generate a link for a new product in the list*} a href={$products_list-mProducts[i].onclick} $raquo; {$products_list-mProducts[i].make}/a {/section} -- Blessings, David M. Line 27 is this: $this-mSelectedProduct = (init)$_GET['ProductID']; Shouldn't it be (int) not (init)? Thanks, Ash http://www.ashleysheridan.co.uk WOW I have spent at least 4 hours reading and re-reading it and it took you 3 seconds. That was the problem. How, how, how could I have overlooked that so many times Thank you Ashley, I should have asked you 3 hours ago. ;-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Wednesday 05 May 2010 12:59:00 Peter Lind wrote: On 5 May 2010 18:55, David McGlone da...@dmcentral.net wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: Parse error: syntax error, unexpected T_VARIABLE in /home/david/www/Joe/current/presentation/smarty_plugins/function.load_pro ducts_list.php on line 27. Can anyone spot my error? I'd appreciate the help. Here is the function.load_products_list.php file: 1. ?php 2. function smarty_function_load_products_list($params, $smarty) 3. { 4. $products_list = new $ProductsList(); 5. $products_list-init(); 6. 7. //assign the template variable 8. $smarty-assign($params['assign'], $products_list); 9. } 10. 11. //Manage the products list 12. class ProductsList 13. { 14. public $mProducts; 15. public $mSelectedProduct; 16. 17. private $mBoCatalog; 18. 19. //constructor initializes business tier object 20. //and reads query string parameter 21. function __construct() 22. { 23. //creating the middle tier object 24. $this-mBoCatalog = new BoCatalog(); 25. //if ProductID exists in the query string, we're viewing a product. 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; pretty sure (init) is not a valid cast ... Your hunch is correct. LOL Still can't believe I overlooked that so many times. -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! LOL sometimes a second set of eyes is required. We've all been in your shoes! -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry
Re: [PHP] Can't find my error
On Wed, May 05, 2010 at 01:03:41PM -0400, David McGlone wrote: On Wednesday 05 May 2010 12:51:00 Ashley Sheridan wrote: On Wed, 2010-05-05 at 12:55 -0400, David McGlone wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: snip WOW I have spent at least 4 hours reading and re-reading it and it took you 3 seconds. That was the problem. How, how, how could I have overlooked that so many times Thank you Ashley, I should have asked you 3 hours ago. ;-) Yeah, David, the rest of us are really disappointed in you. I mean, it's not like that's ever happened to *us*. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Wednesday 05 May 2010 13:12:58 Dan Joseph wrote: On Wed, May 5, 2010 at 1:06 PM, David McGlone da...@dmcentral.net wrote: On Wednesday 05 May 2010 12:59:07 Dan Joseph wrote: On Wed, May 5, 2010 at 12:55 PM, David McGlone da...@dmcentral.net wrote: 26. if(isset($_GET['ProductID'])) 27. $this-mSelectedProduct = (init)$_GET['ProductID']; You've got (init) instead of (int). Its always those little characters causing trouble! Tell me about it. I kept telling myself for the last 4 hours I can find it, I can find it I don't need to ask the list Huh! I was wrong! LOL sometimes a second set of eyes is required. We've all been in your shoes! True. I need to learn to ask for help, but I don't want to fall into the habit of taking it for granted. I'm still learning so I need to try my hardest before I go getting an answer. -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find my error
On Wednesday 05 May 2010 16:19:35 Paul M Foster wrote: On Wed, May 05, 2010 at 01:03:41PM -0400, David McGlone wrote: On Wednesday 05 May 2010 12:51:00 Ashley Sheridan wrote: On Wed, 2010-05-05 at 12:55 -0400, David McGlone wrote: I've checked and checked and re-checked and I can't figure out what I've done wrong. I'm getting a parse error: snip WOW I have spent at least 4 hours reading and re-reading it and it took you 3 seconds. That was the problem. How, how, how could I have overlooked that so many times Thank you Ashley, I should have asked you 3 hours ago. ;-) Yeah, David, the rest of us are really disappointed in you. I mean, it's not like that's ever happened to *us*. ;-} I've been studying PHP for at least 2 years straight now, after dabbling in it for about a year 6 years ago. So even though I've had my nose to the grind for a good 2 years now, I don't think I can call my mistake a rookie mistake. Thats what's frustrating to me. LOL -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php