Re: [PHP] Couple of beginner questions

2009-01-11 Thread Paul M Foster
On Mon, Jan 12, 2009 at 12:04:15AM -0500, John Corry wrote: > One of the best things that ever happened to me (with regards to > writing PHP) was deciding not to embed it in HTML anymore. > > I either: > a) generate the HTML from classes I've built (HTML, Forms, Tables, > Images, etc) or use an e

Re: [PHP] Couple of beginner questions

2009-01-11 Thread John Corry
One of the best things that ever happened to me (with regards to writing PHP) was deciding not to embed it in HTML anymore. I either: a) generate the HTML from classes I've built (HTML, Forms, Tables, Images, etc) or use an equivalent PEAR class - or - b) Use Smarty templates...in which I still

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Chris
tedd wrote: At 11:35 AM -0800 1/9/09, VamVan wrote: -- Remember as you re still a beginner try to avoid using ?> at the end of complete PHP code page. or else if you have empty lines at the end of the file "then you wont see blank page of death in PHP". I'm not a beginner, but this is a pract

Re: [PHP] String variable

2009-01-11 Thread Lars Torben Wilson
2009/1/11 Ashley Sheridan : > On Sun, 2009-01-11 at 14:36 +, Ashley Sheridan wrote: >> On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote: >> > Hello, >> > I am trying yo get THIS: >> > where ref_id = '1234' >> > from this. >> > $where="where ref_id="."'$Reference[$x][ref_id]'"; >> > >> > but i cer

Re: [PHP] Referencing variable in calling class?

2009-01-11 Thread Murray
Hi Paul, To be honest, I'm still finding my way around as to how I want to approach this application, but my question is valid in some sense no matter which direction I pursue. I finally opted to make the relevant variables in my front controller class static, so I could directly reference them f

Re: [PHP] Editing in a text area field

2009-01-11 Thread Ross McKay
On Sun, 11 Jan 2009 09:59:22 -0500, tedd.sperling wrote: >I've tried stripping out all Gremlins, like so: That looks like a great (slow) way to rip out characters that probably ought to be there, like left and right single and double quotes, em and en dashes, ellipses, copyright and trademark sym

Re: [PHP] Editing in a text area field

2009-01-11 Thread Ross McKay
G'day Tedd, >Yes, when you have intelligent and cooperative clients -- have >any to spare? Hey, you keep your grubby mitts off my intelligent and cooperative clients, it took a while to get them that way :) Let's face it: people who pay other people to do a job for them usually don't understand

[PHP] Re: FirePHP -- pretty cool

2009-01-11 Thread Colin Guthrie
'Twas brillig, and Skip Evans at 11/01/09 19:19 did gyre and gimble: Hey Nitsan & all, I haven't been through it all, I just installed the plug in and download the file to include and started using it. I would imagine you have to use their log function to get any output, but it seems like th

Re: [PHP] pecl4win - any updates?

2009-01-11 Thread pan
"Chris" wrote in message news:496a6f34.1080...@gmail.com... > pan wrote: >> Has there been any progress reinstating pecl packages for >> windows? > > per the comment on php.net, join the "Windows Internals list" (or perhaps the > "Windows PHP users list" might have some info). > Thanks for the

Re: [PHP] pecl4win - any updates?

2009-01-11 Thread Chris
pan wrote: Has there been any progress reinstating pecl packages for windows? per the comment on php.net, join the "Windows Internals list" (or perhaps the "Windows PHP users list" might have some info). -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List

Re: [PHP] Re: redoing website after 7 years

2009-01-11 Thread Chris
Robert Cummings wrote: On Mon, 2009-01-12 at 09:00 +1100, Chris wrote: Robert Cummings wrote: On Fri, 2009-01-09 at 08:56 -0500, Andrew Ballard wrote: On Fri, Jan 9, 2009 at 2:09 AM, Robert Cummings wrote: On Fri, 2009-01-09 at 15:17 +1100, Chris wrote: I know many people will grin at me fo

Re: [PHP] Re: redoing website after 7 years

2009-01-11 Thread Robert Cummings
On Mon, 2009-01-12 at 09:00 +1100, Chris wrote: > Robert Cummings wrote: > > On Fri, 2009-01-09 at 08:56 -0500, Andrew Ballard wrote: > >> On Fri, Jan 9, 2009 at 2:09 AM, Robert Cummings > >> wrote: > >>> On Fri, 2009-01-09 at 15:17 +1100, Chris wrote: > > I know many people will grin at me f

Re: [PHP] Re: redoing website after 7 years

2009-01-11 Thread Chris
Robert Cummings wrote: On Fri, 2009-01-09 at 08:56 -0500, Andrew Ballard wrote: On Fri, Jan 9, 2009 at 2:09 AM, Robert Cummings wrote: On Fri, 2009-01-09 at 15:17 +1100, Chris wrote: I know many people will grin at me for this solution but may be faster way to overcome this problem to do a fi

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Robert Cummings
On Sun, 2009-01-11 at 21:01 +, Nathan Rixham wrote: > Robert Cummings wrote: > > > >> example: > >> http://www.w3.org/TR/xhtml1/ > >> > >> from the source: > >> > >> XHTML™ 1.0 The Extensible > HyperText Markup Language (Second Edition) > >> > >> because the document is the "XHTML™ 1.0 The Ext

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Nathan Rixham
Robert Cummings wrote: On Sun, 2009-01-11 at 18:14 +, Nathan Rixham wrote: Robert Cummings wrote: the above means that moving back to the original example(s) I'd simply whatever I'd probably do: Whatever Which would expand to: Whatever Which would expand to a bunch of

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Robert Cummings
On Sun, 2009-01-11 at 18:14 +, Nathan Rixham wrote: > Robert Cummings wrote: > > > >> the above means that moving back to the original example(s) I'd simply > >> > >> whatever > >> > > > > I'd probably do: > > > > Whatever > > > > Which would expand to: > > > > Whatever > name=

Re: [PHP] is_readable(http://.... text file) says not, but I canin browser

2009-01-11 Thread John Allsopp
Nathan Rixham wrote: John Allsopp wrote: Nathan Nobbe wrote: On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast))

Re: [PHP] FirePHP -- pretty cool

2009-01-11 Thread Skip Evans
Hey Nitsan & all, I haven't been through it all, I just installed the plug in and download the file to include and started using it. I would imagine you have to use their log function to get any output, but it seems like the kind of thing that could be left in the code without any ill-affect

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:42, Nathan Rixham wrote: > > pedantic: really you'd want to check the http status header returned and > take the appropriate action depending on what header was returned. > > I'm sure there's a way to get the headers from a file_get_contents using one > of the stream_get

Re: [PHP] FirePHP -- pretty cool

2009-01-11 Thread Nitsan Bin-Nun
I'm using FireBug 24/7/365 and I also knew FirePHP before but I never tried it or had any experience with it that I can share. There are any other options and functions that FirePHP gives which not require you to involve changing your code? Nitsan On Sun, Jan 11, 2009 at 6:46 PM, Skip Evans wrot

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Nathan Rixham
Daniel Brown wrote: On Sun, Jan 11, 2009 at 13:07, John Allsopp wrote: Thanks, that worked a treat except I was getting warnings on 404. I looked around for solutions to that and it appears curl might handle that better, so I'm currently working on that. Many thanks tho .. let me know if you kn

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:10, John Allsopp wrote: > > So far I'm getting a lot of *Warning*: curl_setopt(): supplied argument is > not a valid cURL handle resource in */home/myAcc/public_html/test.php* on > line *58 > * > I searched phpinfo for 'curl' and it came up nothing, so I'm just checking

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread Daniel Brown
On Sun, Jan 11, 2009 at 13:07, John Allsopp wrote: > > Thanks, that worked a treat except I was getting warnings on 404. I looked > around for solutions to that and it appears curl might handle that better, > so I'm currently working on that. Many thanks tho .. let me know if you know > how to sto

Re: [PHP] is_readable(http://.... text file) says not, but I canin browser

2009-01-11 Thread Nathan Rixham
John Allsopp wrote: Daniel Brown wrote: On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose(

Re: [PHP] is_readable(http://.... text file) says not, but I canin browser

2009-01-11 Thread Nathan Rixham
John Allsopp wrote: Nathan Nobbe wrote: On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fo

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Nathan Rixham
Robert Cummings wrote: On Sun, 2009-01-11 at 17:01 +, Nathan Rixham wrote: i love these discussions on pedantics and semantics! personally (when I need to) I always go for a bit of concatenation so in the example above: // somewhere in the business logic / functional layer $imgHTML =

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread John Allsopp
Nathan Nobbe wrote: On Sun, Dec 28, 2008 at 11:02 AM, John Allsopp wrote: Hi I'm sure this is simple for yous all but I'm not sure I know the answer. $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r')

Re: [PHP] is_readable(http://.... text file) says not, but I can in browser

2009-01-11 Thread John Allsopp
Daniel Brown wrote: On Sun, Dec 28, 2008 at 13:02, John Allsopp wrote: $myFileLast = "http://www.myDomain.com/text.txt";; if (is_readable($myFileLast)) { $fh = fopen($myFileLast, 'r'); $theDataLast = fread($fh, 200); fclose($fh); echo

[PHP] RSS feeder in PHP5?

2009-01-11 Thread Michelle Konzack
Hello, on my website I have a NEWS section on and the news are stored in a SQL table with "date", "summary", "fulltext" Now I like to add an RSS feed with something like which require only an add

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Robert Cummings
On Sun, 2009-01-11 at 17:01 +, Nathan Rixham wrote: > > i love these discussions on pedantics and semantics! > > personally (when I need to) I always go for a bit of concatenation so in > the example above: > > // somewhere in the business logic / functional layer > $imgHTML = ''; I do the

Re: [PHP] String variable

2009-01-11 Thread Nathan Rixham
Ashley Sheridan wrote: On Sun, 2009-01-11 at 14:36 +, Ashley Sheridan wrote: On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote: Hello, I am trying yo get THIS: where ref_id = '1234' from this. $where="where ref_id="."'$Reference[$x][ref_id]'"; but i certainly have a quote problem. Any help?

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Nathan Rixham
Ashley Sheridan wrote: On Sun, 2009-01-11 at 10:16 -0500, tedd wrote: At 3:02 PM + 1/11/09, Ashley Sheridan wrote: On Sun, 2009-01-11 at 09:46 -0500, tedd wrote: At 1:49 PM + 1/11/09, Ashley Sheridan wrote: > > >Unless it's something like this: > >echo "$whatever"; > >?> >

[PHP] FirePHP -- pretty cool

2009-01-11 Thread Skip Evans
Hey all, I'm sure many of you use Firebug in Firefox for help debugging, and some of you also no doubt know about FirePHP, the PHP class that let's you write logs to the Firebug console. In case you don't know about it, Joe Bob Briggs says, "Check it out." I just installed and it's pretty co

Re: [PHP] Editing in a text area field

2009-01-11 Thread Al
c...@l-i-e.com wrote: Rule #1. Never, ever, ever, alter the user's input, EXCEPT for sanitizing/filtering. Specifically, do NOT add tags in place of newlines. Store the newlines. Upon OUTPUT, you can use nl2br() to get tags. Or str_replace if you want instead. This is crucial as a habit, d

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Ashley Sheridan
On Sun, 2009-01-11 at 10:44 -0500, Eric Butera wrote: > On Sun, Jan 11, 2009 at 10:36 AM, Ashley Sheridan > wrote: > > echo " > Gross! If that is what you're doing use a printf or change attr > quotes to '. I've seen entire html pages escaped out like that. > No it was just an example, normall

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Eric Butera
On Sun, Jan 11, 2009 at 10:36 AM, Ashley Sheridan wrote: > echo "http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Ashley Sheridan
On Sun, 2009-01-11 at 10:16 -0500, tedd wrote: > At 3:02 PM + 1/11/09, Ashley Sheridan wrote: > >On Sun, 2009-01-11 at 09:46 -0500, tedd wrote: > >> At 1:49 PM + 1/11/09, Ashley Sheridan wrote: > > > > > >> >Unless it's something like this: > >> > > >> > >> >echo "$whatever"; > > > >

Re: [PHP] Couple of beginner questions

2009-01-11 Thread tedd
At 3:02 PM + 1/11/09, Ashley Sheridan wrote: On Sun, 2009-01-11 at 09:46 -0500, tedd wrote: At 1:49 PM + 1/11/09, Ashley Sheridan wrote: > > >Unless it's something like this: > >echo "$whatever"; > >?> > Here's the alterative I would use: > I'm not wanting ti nitpick, bu

Re: [PHP] Editing in a text area field

2009-01-11 Thread tedd
At 9:02 AM -0500 1/11/09, Eric Butera wrote: I tried using tidy to clean up some of that stuff but it was giving me even more problems. I enjoyed having valid docs with all the crap ripped out, but I use my editor blocks on lots of different parts of the site, so having it remove/combine style t

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Ashley Sheridan
On Sun, 2009-01-11 at 09:46 -0500, tedd wrote: > At 1:49 PM + 1/11/09, Ashley Sheridan wrote: > > > >Unless it's something like this: > > > > >echo "$whatever"; > >?> > > > >Which is unlikely for a header tag, but I know this sort of format gets > >used a lot by me and others, especially for se

Re: [PHP] Couple of beginner questions

2009-01-11 Thread tedd
At 1:49 PM + 1/11/09, Ashley Sheridan wrote: Unless it's something like this: $whatever"; ?> Which is unlikely for a header tag, but I know this sort of format gets used a lot by me and others, especially for setting alternate row styles on tables (damn browsers and not supporting alternat

Re: [PHP] Editing in a text area field

2009-01-11 Thread tedd
At 11:24 AM +1100 1/11/09, Ross McKay wrote: Nathan Rixham wrote: HTML is a markup language used to describe the structure of a document; presentation of HTML is controlled by either a client, with optional instructions via attributes (bad) or css (good) I almost agree, except that there are

Re: [PHP] String variable

2009-01-11 Thread Ashley Sheridan
On Sun, 2009-01-11 at 14:36 +, Ashley Sheridan wrote: > On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote: > > Hello, > > I am trying yo get THIS: > > where ref_id = '1234' > > from this. > > $where="where ref_id="."'$Reference[$x][ref_id]'"; > > > > but i certainly have a quote problem. > > > >

Re: [PHP] String variable

2009-01-11 Thread Ashley Sheridan
On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote: > Hello, > I am trying yo get THIS: > where ref_id = '1234' > from this. > $where="where ref_id="."'$Reference[$x][ref_id]'"; > > but i certainly have a quote problem. > > Any help? > Thanks > Mike > > > > It should look like this: $where="whe

Re: [PHP] String variable

2009-01-11 Thread Eric Butera
On Sun, Jan 11, 2009 at 8:59 AM, MikeP wrote: > Hello, > I am trying yo get THIS: > where ref_id = '1234' > from this. > $where="where ref_id="."'$Reference[$x][ref_id]'"; > > but i certainly have a quote problem. > > Any help? > Thanks > Mike > > > > > -- > PHP General Mailing List (http://www.ph

Re: [PHP] Editing in a text area field

2009-01-11 Thread Eric Butera
On Sun, Jan 11, 2009 at 8:50 AM, tedd wrote: > At 11:12 AM +1100 1/11/09, Ross McKay wrote: >> >> With a little cooperation from the client, and a properly configured >> TinyMCE, you can fairly easily limit what HTML tags they use. > > Yes, when you have intelligent and cooperative clients -- have

Re: [PHP] Editing in a text area field

2009-01-11 Thread tedd
At 11:19 AM +1100 1/11/09, Ross McKay wrote: tedd wrote: The argument over what HTML is, will never be resolved. I say it's a delivery mechanism and tags such as and are unwanted elements. They simply confuse/blur the purpose of the language. I should have said and , I guess. No, my com

Re: [PHP] Editing in a text area field

2009-01-11 Thread tedd
At 11:12 AM +1100 1/11/09, Ross McKay wrote: With a little cooperation from the client, and a properly configured TinyMCE, you can fairly easily limit what HTML tags they use. Yes, when you have intelligent and cooperative clients -- have any to spare? You can then provide a set of CSS clas

Re: [PHP] Couple of beginner questions

2009-01-11 Thread Ashley Sheridan
On Sun, 2009-01-11 at 08:08 -0500, tedd wrote: > At 4:16 PM -0500 1/10/09, Paul M Foster wrote: > >And let me present an alternative perspective. Never do something like: > > > > > > > >Let Apache (or whatever) interpret HTML as HTML, and don't make it > >interpret PHP code as HTML. > > > >Instead,

Re: [PHP] Editing in a text area field

2009-01-11 Thread tedd
At 7:02 PM -0500 1/10/09, Phpster wrote: That can and should be done with a simple str_replace() on the display portion of the code. Bastien Really? Then how do you handle these examples of client input? This is I have to say. This is what I have to say. This is what I have to say. This

Re: [PHP] Couple of beginner questions

2009-01-11 Thread tedd
At 4:16 PM -0500 1/10/09, Paul M Foster wrote: And let me present an alternative perspective. Never do something like: Let Apache (or whatever) interpret HTML as HTML, and don't make it interpret PHP code as HTML. Instead, do: Hello world If you're going to use PHP in the middle of a bunch

Re: [PHP] Re: Unique Object Instance ID..?

2009-01-11 Thread Robert Cummings
On Sun, 2009-01-11 at 00:07 +, Nathan Rixham wrote: > Colin Guthrie wrote: > > 'Twas brillig, and Nathan Rixham at 10/01/09 23:31 did gyre and gimble: > >> all I need is a completely unique id for each object instance that can > >> never be repeated at any time, even in a multiserver environme

Re: [PHP] Re: hello

2009-01-11 Thread Robert Cummings
On Sat, 2009-01-10 at 23:58 +0100, Björn Bartels wrote: > *rofl* > > damn... i love this list... so much for on- ehmmm off-list posts :p ... It's not just a list... it's a community :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailin