Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 7:18 AM, Paul M Foster wrote: > > Tedd's perfectly capable of speaking for himself, but I can tell you > he's been on this list for a long time, and his skills are plenty > adequate for this task. He's just asking for second opinions. > Wouldn't someone with adequate DB ski

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 8:22 AM, Jochem Maas wrote: > > first off - wasn't there a cut'n'dried piece of survey software out there > that did the job? don't know off hand what the 'market' currently offers but > I'm pretty sure there are a number of candidate php-based wotsits. > > as such they mig

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 11:15 +0100, Rene Veerman wrote: > On Sun, Mar 14, 2010 at 7:18 AM, Paul M Foster > wrote: > > > > Tedd's perfectly capable of speaking for himself, but I can tell you > > he's been on this list for a long time, and his skills are plenty > > adequate for this task. He's jus

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 11:16 AM, Ashley Sheridan wrote: > That function won't always work. You're using a PHP version check for > mysql_real_escape_string() when the most likely failure point for it is if > no database connection has been opened. > I never call it without an open db connection.

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 12:14 +0100, Rene Veerman wrote: > > > > On Sun, Mar 14, 2010 at 11:16 AM, Ashley Sheridan > wrote: > > > > > That function won't always work. You're using a PHP version > check for mysql_real_escape_string() when the most likel

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 12:13 PM, Ashley Sheridan wrote: > > I have to deal with a lot of CMS's, so I expect the users to enter some > HTML code through a rich-text editor, and they expect to be able to. > I'd love to have a copy of whatever function you use to filter out bad HTML/js/flash for us

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Rene Veerman
On Sun, Mar 14, 2010 at 12:24 PM, Rene Veerman wrote: > > I'd love to have a copy of whatever function you use to filter out bad > HTML/js/flash for use cases where users are allowed to enter html. > I'm aware of strip_tags() "allowed tags" param, but haven't got a good list > for it. > oh, and e

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 12:25 +0100, Rene Veerman wrote: > On Sun, Mar 14, 2010 at 12:24 PM, Rene Veerman wrote: > > > > I'd love to have a copy of whatever function you use to filter out bad > > HTML/js/flash for use cases where users are allowed to enter html. > > I'm aware of strip_tags() "allow

[PHP] SimpleXML: convert xml to text

2010-03-14 Thread Dasn
Hello, I want to convert some xml stuff to simple string using php, say: left center1okcenter2right XML; $xml = simplexml_load_string($string); echo $xml; ?> The code will output "left right" while all the central stuff was lost. How should I print it as "left center1 ok center2 right" ? Tha

Re: [PHP] SimpleXML: convert xml to text

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 21:58 +0800, Dasn wrote: > Hello, I want to convert some xml stuff to simple string using php, say: > > > $string = << left center1okcenter2right > XML; > > $xml = simplexml_load_string($string); > echo $xml; > ?> > The code will output "left right" while all the centra

[PHP] gmail filter test

2010-03-14 Thread bruce
test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] gmail filter test

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 08:37 -0700, bruce wrote: > test > test received! what were we test bunnies for again? :p Thanks, Ash http://www.ashleysheridan.co.uk

[PHP] php - page flow issue...

2010-03-14 Thread bruce
hi. got a situation for a potential page that i'm playing with. i'm trying to figure out how to implement it, and the best/good approach to this. i'm actually considering integrating this kind of process within a cms (joomla/mambo/cmsms/etc..) but right now, this is in the initia thought stage...

[PHP] php-cli

2010-03-14 Thread Rick Pasotto
Has cli php changed recently? I've got a php script (script1) that creates a php script (script2) by opening a file and then writing to it. When I try to run it from the command line script1 is simply copied to stdout. When I run it from the browser it works as expected. The directory has 777 perm

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > Has cli php changed recently? > > I've got a php script (script1) that creates a php script (script2) by > opening a file and then writing to it. When I try to run it from the > command line script1 is simply copied to stdout. When I run it

[PHP] Re: CodeBubbles -- the coolest IDE innovation since since syntax highlighting and intellisense

2010-03-14 Thread Nathan Rixham
Daevid Vincent wrote: > Wow. Maybe the coolest IDE innovation I've seen since syntax highlighting > and intellisense. > > > http://www.cs.brown.edu/people/acb/codebubbles_site.htm > > http://www.cs.brown.edu/people/acb/codebubbles_beta_

[PHP] Using FreeType2 without having to suffer GD

2010-03-14 Thread PmI
Hi, is there a FreeType extension that doesn't rely on not-calling-freetype-in-the-slightest through GD? GD is lacking lots of function wrappers for things that are part of the standard FreeType2 API, like the super basic "get char index" function, which are essential for any kind of intelligent t

Re: [PHP] php - page flow issue...

2010-03-14 Thread Rene Veerman
sounds like you want to build an ajax site with global config settings per subpart(=functionality) for each browser-client. if it got it right your other requirements are; - you have run-time config/state settings per subpart instance that other subparts' instances need to access. - you want to be

[PHP] Change displayed file name to download

2010-03-14 Thread Php Developer
Hi, I'm using the following code: $fp = fopen($filename, 'r+'); $content = fread($fp, filesize($filename)); fclose($fp); header("Content-type: application/msword"); header("Content-Disposition: attachment; filename=$filename"); echo $content; exit; ___

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > Has cli php changed recently? > > > > I've got a php script (script1) that creates a php script (script2) by > > opening a file and then writing to it. When I try to run

Re: [PHP] Change displayed file name to download

2010-03-14 Thread Kim Madsen
Hi Make a $new_filename and put that in the header: $neW_filename = "downloadfile." . $filetype; header("Content-Disposition: attachment; filename=$new_filename"); (the content of the file is now in $content, so if you like you could also change the value of $filename if you preferrer that) Y

Re: [PHP] Change displayed file name to download

2010-03-14 Thread Peter Lind
You can set the name to display as you see fit, just change $filename to your liking right before the header() call. If you just want to cut the path, use basename($filename) Regards Peter On 14 March 2010 21:29, Php Developer wrote: > Hi, > > I'm using the following code: >

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > > > Has cli php changed recently? > > > > > > I've got a php script (script1) that creates a php script (scri

Re: [PHP] SimpleXML: convert xml to text

2010-03-14 Thread Dasn
On Sun, 14 Mar 2010 22:02:22 +0800, Ashley Sheridan wrote: On Sun, 2010-03-14 at 21:58 +0800, Dasn wrote: Hello, I want to convert some xml stuff to simple string using php, say: left center1okcenter2right XML; $xml = simplexml_load_string($string); echo $xml; ?> The code will output "left

Re: [PHP] I need a fresh look at storing variables in MySQL

2010-03-14 Thread Jochem Maas
Op 3/14/10 11:45 AM, Ashley Sheridan schreef: > On Sun, 2010-03-14 at 12:25 +0100, Rene Veerman wrote: > >> On Sun, Mar 14, 2010 at 12:24 PM, Rene Veerman wrote: >>> >>> I'd love to have a copy of whatever function you use to filter out bad >>> HTML/js/flash for use cases where users are allowed

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > > > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > > > > > Has cli php changed recently?

Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban
Rick Pasotto wrote: On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: Has cli php changed recently?

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 20:27 -0400, Rick Pasotto wrote: > On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: > > On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > > > > > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > > > On Sun, 2010-03-14 at 14:15 -0400

Re: [PHP] SimpleXML: convert xml to text

2010-03-14 Thread Dasn
On Sun, 14 Mar 2010 22:02:22 +0800, Ashley Sheridan wrote: On Sun, 2010-03-14 at 21:58 +0800, Dasn wrote: Hello, I want to convert some xml stuff to simple string using php, say: left center1okcenter2right XML; $xml = simplexml_load_string($string); echo $xml; ?> The code will output "left

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > > > >I repeat: is there more than one way to run a php script from the cli? > > > > On *nix, you can add "#!/usr/bin/php" as first line and make file > executable (chmod +x). Functionally the same. php is still

Re: [PHP] php-cli

2010-03-14 Thread Ashley Sheridan
On Sun, 2010-03-14 at 21:24 -0400, Rick Pasotto wrote: > On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > > Rick Pasotto wrote: > > > > > >I repeat: is there more than one way to run a php script from the cli? > > > > > > > On *nix, you can add "#!/usr/bin/php" as first line and ma

Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban
Rick Pasotto wrote: On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: Rick Pasotto wrote: I repeat: is there more than one way to run a php script from the cli? On *nix, you can add "#!/usr/bin/php" as first line and make file executable (chmod +x). Functionally the same. php is

[PHP] Splitting a string ...

2010-03-14 Thread Ashley M. Kirchner
I'm not a regexp person (wish I was though), and I'm hoping someone can give me a hand here. Consider the following strings: - domain\usern...@example.org - domain\username - the same as above but with / instead of \ (hey, it happens) - usern...@example.

Re: [PHP] Splitting a string ...

2010-03-14 Thread Jochem Maas
Op 3/15/10 1:54 AM, Ashley M. Kirchner schreef: > I'm not a regexp person (wish I was though), and I'm hoping someone can give > me a hand here. Consider the following strings: > > > > - domain\usern...@example.org > > - domain\username > > - the same as above but

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 02:35:54PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > >On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > >>Rick Pasotto wrote: > >>>I repeat: is there more than one way to run a php script from the cli? > >>> > >>On *nix, you can add "#!/usr/bin/php" as