Re: [PHP] Question about form submitting

2007-04-03 Thread Tijnema !
On 4/3/07, Dave Goodchild [EMAIL PROTECTED] wrote: Not true. You can submit the form back to itself as many times as required by making the form action $_SERVER['PHP_SELF'] and checking for various sequences and outputting different html in each case. You're then leaving the page and reloading

Re: [PHP] Question about form submitting

2007-04-03 Thread Myron Turner
Mário Gamito wrote: Hi, Sorry for the lame question, but i didn't find a satisfactory answer in the web. I have this subscribe form (subscribe.php) and on submit i have to check for errors: a) password and password confirmation mismatch; b) missing filled fields c) check e-mail validity d)

Re: [PHP] Question about form submitting

2007-04-03 Thread Lori Lay
Tijnema ! wrote: On 4/3/07, Mário Gamito [EMAIL PROTECTED] wrote: Hi, Sorry for the lame question, but i didn't find a satisfactory answer in the web. I have this subscribe form (subscribe.php) and on submit i have to check for errors: a) password and password confirmation mismatch; b)

Re: [PHP] Question about form submitting / clarification

2007-04-03 Thread Mário Gamito
Hi, Of the three items you specify a and b should be handled with Javascript in an onsubmit handler. The error messages would be generated by this handler. Email validity would have to be handled by the web server and your php script, usually by trying the address. I think i was

Re: [PHP] Question about form submitting / clarification

2007-04-03 Thread Lori Lay
Mário Gamito wrote: Hi, Of the three items you specify a and b should be handled with Javascript in an onsubmit handler. The error messages would be generated by this handler. Email validity would have to be handled by the web server and your php script, usually by trying the address.

Re: [PHP] Question about form submitting

2007-04-03 Thread Philip Thompson
On Apr 3, 2007, at 1:13 PM, Mário Gamito wrote: Hi, Sorry for the lame question, but i didn't find a satisfactory answer in the web. I have this subscribe form (subscribe.php) and on submit i have to check for errors: a) password and password confirmation mismatch; b) missing filled

Re: [PHP] Question before upgrading to 5

2007-03-23 Thread Jochem Maas
Jake McHenry wrote: I'll think about it.. We only use php for intranet applications I create, so the server is basically dead at nights, which is when I do most of my work. I have worked like that in the past - at some point I decided that going to bed when I was tired rather then

Re: [PHP] Question before upgrading to 5

2007-03-23 Thread Richard Lynch
No, you can't load both PHP4 and PHP5 into the same Apache as Modules. You can run one as CGI. You can use proxy_server in one to shuttle requests to a different Apache pool. On Thu, March 22, 2007 12:07 am, Jake McHenry wrote: Hi everyone, I just got done going through all my configure

RE: [PHP] Question before upgrading to 5

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 6:23 am, Jake McHenry wrote: Sorry about the delivery and read requests.. I was tired and forgot to turn them off for the list.. alternatively you can search for 'Rasmus' and 'ProxyPass' in the list archive and use Rasmus' rather cool ProxyPass solution to

RE: [PHP] Question before upgrading to 5

2007-03-23 Thread Jake McHenry
minutes... No biggie.. Thanks Jake -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, March 23, 2007 8:59 PM To: Jake McHenry Cc: php-general@lists.php.net Subject: RE: [PHP] Question before upgrading to 5 On Thu, March 22, 2007 6:23 am, Jake McHenry

Re: [PHP] Question before upgrading to 5

2007-03-22 Thread Tijnema !
On 3/22/07, Jake McHenry [EMAIL PROTECTED] wrote: Hi everyone, I just got done going through all my configure options for php5, and finally configure finished successfully... I didn't install it yet, have a question. Can I have both 4 and 5 installed temporarily until I'm sure all my scripts

Re: [PHP] Question before upgrading to 5

2007-03-22 Thread Jochem Maas
alternatively you can search for 'Rasmus' and 'ProxyPass' in the list archive and use Rasmus' rather cool ProxyPass solution to running both php4 and php5 ... his explanation should give you enough info to set it up. Tijnema ! wrote: On 3/22/07, Jake McHenry [EMAIL PROTECTED] wrote: Hi

RE: [PHP] Question before upgrading to 5

2007-03-22 Thread Jake McHenry
Sorry about the delivery and read requests.. I was tired and forgot to turn them off for the list.. alternatively you can search for 'Rasmus' and 'ProxyPass' in the list archive and use Rasmus' rather cool ProxyPass solution to running both php4 and php5 ... his explanation should give

Re: [PHP] Question before upgrading to 5

2007-03-22 Thread Jochem Maas
Jake McHenry wrote: Sorry about the delivery and read requests.. I was tired and forgot to turn them off for the list.. alternatively you can search for 'Rasmus' and 'ProxyPass' in the list archive and use Rasmus' rather cool ProxyPass solution to running both php4 and php5 ... his

RE: [PHP] Question before upgrading to 5

2007-03-22 Thread Jake McHenry
I don't want 2 instances of apache running, your over thinking this... I only asked if I need to change only the prefix, or if there is anything else, to get both php versions installed. Once I see my scripts are working ok, or not, I'll be getting rid of php4. I'm not running a dev machine, this

Re: [PHP] Question before upgrading to 5

2007-03-22 Thread Tijnema !
On 3/22/07, Jake McHenry [EMAIL PROTECTED] wrote: I don't want 2 instances of apache running, your over thinking this... I only asked if I need to change only the prefix, or if there is anything else, to get both php versions installed. Once I see my scripts are working ok, or not, I'll be

Re: [PHP] Question before upgrading to 5

2007-03-22 Thread Jochem Maas
Jake McHenry wrote: I don't want 2 instances of apache running, your over thinking this... I whatever, I guess we have different opinions about trying to do things 'properly'. only asked if I need to change only the prefix, or if there is anything else, to get both php versions installed.

RE: [PHP] Question before upgrading to 5

2007-03-22 Thread Jake McHenry
I'll think about it.. We only use php for intranet applications I create, so the server is basically dead at nights, which is when I do most of my work. Jake McHenry wrote: I don't want 2 instances of apache running, your over thinking this... I whatever, I guess we have

Re: [PHP] Question before upgrading to 5

2007-03-22 Thread Myron Turner
Jochem Maas wrote: Jake McHenry wrote: I don't need them running parallel, only both installed I think you missed the point. you would have 2 apaches running, that is correct but the trick is to set it up so that they use the same document roots for each site that you are trying to

[PHP] Question after php5

2007-03-22 Thread Jake McHenry
Hi everyone, I decided I would spend the extra time and install separate copies of apache and php5. All went successfully, I thought. Apache starts and runs on 8080, I get pages. But not php pages. I added a php.conf file which is included in httpd.conf, I just copied the layout of the rest of

RE: [PHP] Question after php5

2007-03-22 Thread Jake McHenry
In my index.php file, I have this: ?php echo PHP hello world; ? HTML Hello World I get the HTML Hello World output, but not the php? So the conf/extra/php.conf file is somewhat being included, but I'm not getting any output And now there is a 200 entry in the log file. So with just php,

RE: [PHP] Question after php5 SOLVED... For now

2007-03-22 Thread Jake McHenry
: Thursday, March 22, 2007 10:43 PM To: php-general@lists.php.net Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Question after php5 In my index.php file, I have this: ?php echo PHP hello world; ? HTML Hello World I get the HTML Hello World output, but not the php? So the conf/extra

[PHP] Question before upgrading to 5

2007-03-21 Thread Jake McHenry
Hi everyone, I just got done going through all my configure options for php5, and finally configure finished successfully... I didn't install it yet, have a question. Can I have both 4 and 5 installed temporarily until I'm sure all my scripts work ok? They should, I've been careful, but I want to

[PHP] Question

2007-03-20 Thread Dan Shirah
Looking for some direction here. I have a form that collects user data. When an employee opens the form they enter in all of the user data for an account, however the account can have multiple users so the employee has the option to Enter another user for this account and they can do this for

Re: [PHP] Question

2007-03-20 Thread Tijnema !
On 3/20/07, Dan Shirah [EMAIL PROTECTED] wrote: Looking for some direction here. I have a form that collects user data. When an employee opens the form they enter in all of the user data for an account, however the account can have multiple users so the employee has the option to Enter

Re: [PHP] Question

2007-03-20 Thread Richard Lynch
On Tue, March 20, 2007 12:46 pm, Dan Shirah wrote: Looking for some direction here. I have a form that collects user data. When an employee opens the form they enter in all of the user data for an account, however the account can have multiple users so the employee has the option to Enter

Re: [PHP] variables in CSS in PHP question/problems

2007-03-14 Thread Richard Lynch
Surf directly to your CSS URL and see what happens. There are several possibiliies: #1. Your CSS has ?php ... ? in its output, because you have not convinced your web-server to run your CSS file through PHP to compute the dynamic result. You need something like this in .htacces: File

Re: [PHP] question regarding form filtering

2007-03-14 Thread Richard Lynch
I use PCRE for filtering all the time. As a general rule, be sure you are using a pattern that says allow these valid characters and not one that says deny these invalid characters. You never know when some user will send Unicode or something so far outside what you expected that your deny

Re: [PHP] variables in CSS in PHP question/problems

2007-03-14 Thread tedd
At 2:15 AM -0500 3/14/07, Richard Lynch wrote: Surf directly to your CSS URL and see what happens. There are several possibiliies: #1. Your CSS has ?php ... ? in its output, because you have not convinced your web-server to run your CSS file through PHP to compute the dynamic result. You need

[PHP] question for translating fsockopen into CURL

2007-03-13 Thread Yeni Setiawan
dear all. I'm currently writing a script that connect to specific IP (server) at a specific port (1950). then I need to send some parameters and the server will give me a reply. too bad, my current webhost no longer accept fsockopen(). so I need to translate my script into CURL thingie. here's

[PHP] variables in CSS in PHP question/problems

2007-03-13 Thread Bruce Gilbert
I stumbled upon this article http://www.chrisjdavis.org/2005/10/16/php-in-css/ and was trying out variables with PGP, but can't get it to work. I wanted to have a variable image that changes on refresh, and also set the body color with PHP/CSS and maybe get that to change on refresh too. sp

Re: [PHP] Intro to PHP question

2007-03-12 Thread Richard Lynch
You sure you don't have something like: ?php html . . . Or, perhaps, if you are usin CGI, and you have JUST set it up, and you have the wrong command line flags to execute the input as PHP directly somehow... Does ?php phpinfo();? work? On Thu, March 8, 2007 11:43 am, Jonathan Kahan wrote:

Re: [PHP] Intro to PHP question

2007-03-12 Thread Richard Lynch
To: Tijnema ! Cc: Jonathan Kahan ; php-general@lists.php.net Sent: Thursday, March 08, 2007 12:43 PM Subject: Re: [PHP] Intro to PHP question If you are running that from the command line, why do you need html? Not sure why you're doing that. -- Some people have a gift link here. Know what

Re: [PHP] Intro to PHP question

2007-03-09 Thread Tijnema !
On 3/8/07, Ben Ramsey [EMAIL PROTECTED] wrote: On 3/8/07 1:44 PM, Tijnema ! wrote: He wanted to use it for the web, so why should he try it out on CL first? Because there are some advantages to being able to run something quickly through the CLI without having to load it in a web browser. He

[PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Hi all, I am using a linux server. When the php file below (uri.php) is run from the command line I get the following error. Any ideas on what I could do differently? Thanks for any help, Jonathan ../uri.php: line 1: syntax error near unexpected token `newline' ../uri.php: line 1: `html'

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan [EMAIL PROTECTED] wrote: Hi all, I am using a linux server. When the php file below (uri.php) is run from the command line I get the following

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
@lists.php.net Sent: Thursday, March 08, 2007 12:03 PM Subject: Re: [PHP] Intro to PHP question Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan [EMAIL PROTECTED] wrote: Hi all

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
] *To:* Jonathan Kahan [EMAIL PROTECTED] *Cc:* php-general@lists.php.net *Sent:* Thursday, March 08, 2007 12:03 PM *Subject:* Re: [PHP] Intro to PHP question Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
!; ? - Original Message - From: Dave Goodchild To: Tijnema ! Cc: Jonathan Kahan ; php-general@lists.php.net Sent: Thursday, March 08, 2007 12:43 PM Subject: Re: [PHP] Intro to PHP question If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Satyam
that, not sure. Anyway, it is just the guess of a non-expert. Satyam - Original Message - From: Jonathan Kahan [EMAIL PROTECTED] To: php-general@lists.php.net Cc: Jonathan Kahan [EMAIL PROTECTED] Sent: Thursday, March 08, 2007 5:43 PM Subject: [PHP] Intro to PHP question Hi all, I am using

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
a nice day!; ? - Original Message - *From:* Dave Goodchild [EMAIL PROTECTED] *To:* Tijnema ! [EMAIL PROTECTED] *Cc:* Jonathan Kahan [EMAIL PROTECTED] ; php-general@lists.php.net *Sent:* Thursday, March 08, 2007 12:43 PM *Subject:* Re: [PHP] Intro to PHP question If you are running that from

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Why not learn in a web environment if your goal is to build a website? Just create the following file: ?php phpinfo(); ? save it, upload it and view it. If you see the php details you have the system set up as you need it and can just start writing php-driven web pages (the file you are using

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ben Ramsey
On 3/8/07 12:59 PM, Dave Goodchild wrote: If you really want to run that on the command line, you will need the path to php on the first line of the file. Or, he can run it through the PHP CLI with: $ php uri.php Please, forget the command line stuff unless you want to write command line

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Goodchild ; php-general@lists.php.net Sent: Thursday, March 08, 2007 12:54 PM Subject: Re: [PHP] Intro to PHP question AFAIK you can't run a php file directly, or you need to add #!/bin/php or something to the first line, but you can run it with php ../uri.php but i suggest you to run

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
He wanted to use it for the web, so why should he try it out on CL first? I can offer a few MBs for everyone that wants to get learning PHP. Tijnema On 3/8/07, Ben Ramsey [EMAIL PROTECTED] wrote: On 3/8/07 12:59 PM, Dave Goodchild wrote: If you really want to run that on the command line,

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ben Ramsey
On 3/8/07 1:44 PM, Tijnema ! wrote: He wanted to use it for the web, so why should he try it out on CL first? Because there are some advantages to being able to run something quickly through the CLI without having to load it in a web browser. He was just doing a simple test, so the PHP CLI

RE: [PHP] Intro to PHP question

2007-03-08 Thread Jim Moseby
He wanted to use it for the web, so why should he try it out on CL first? I agree, though trying something out at the CLI may be his only option if he doesn't have/want a webserver set up. I can offer a few MBs for everyone that wants to get learning PHP. Motherboards? JM -- PHP

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jake McHenry
- From: Jonathan Kahan [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, March 08, 2007 1:43 PM Subject: Re: [PHP] Intro to PHP question Hi all, I went to a website called php-cli.com and found that i needed to type #!/usr/bin/php -q in the header line. Once I typed that, my

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ashley M. Kirchner
Tijnema ! wrote: I can offer a few MBs for everyone that wants to get learning PHP. Mariachi Bands! Yes, of course they can teach you how to PHP to the music and Tequila!. :) -- W | It's not a bug - it's an undocumented feature.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jim Lucas
Dave Goodchild wrote: Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved. Just to point out, the last person did not say to

[PHP] question

2007-03-03 Thread Riyadh S. Alshaeiq
Dear sir, Kindly, don't neglect my email since I need your feedback desperately. 1. I have been trying to find a php function for getting a file size not the size on disk.. Every script I have used comes back with the size on disk result.. That is not what I am looking for since I am

Re: [PHP] question

2007-03-03 Thread Stut
Riyadh S. Alshaeiq wrote: Kindly, don't neglect my email since I need your feedback desperately. Sure, but first a question... where did you get the impression that starting your email like a Nigerian scammer would convince us to help you any more than we would without it? 1. I have

Re: [PHP] question

2007-03-03 Thread Stut
Riyadh S. Alshaeiq wrote: Ok.. let me start by thanking you for replying to my question so soon. Secondly, this the first time that I have posted a question here and I have read some of the instructions and rules regarding posting a question that is probably not a big deal to most programmers.

Re: [PHP] Question on virus/worms

2007-02-08 Thread Robert Cummings
On Thu, 2007-02-08 at 18:44 +0100, Seak, Teng-Fong wrote: My company's got a web site using PHP. But the server is actually an IIS 5 sitting inside a Win2K server. So naturally, I'm using php dll filter. (Please don't tell me to use Apache because we need IIS for other services). This

[PHP] Question on virus/worms

2007-02-08 Thread Seak, Teng-Fong
My company's got a web site using PHP. But the server is actually an IIS 5 sitting inside a Win2K server. So naturally, I'm using php dll filter. (Please don't tell me to use Apache because we need IIS for other services). This server also has got an anti-virus installed (McAfee to be

[PHP] question about str_replace function

2007-01-08 Thread Kencana
Hi all, I got a doubt about the str_replace function. ?php $string=avenue 1, ave 1; $words=str_replace (ave,avenue, $string); echo $words; ? the php code above will return me avenuenue 1, avenue 1. i expect the result will be avenue 1, avenue 1. any idea of how can i get such result? Thank

RE: [PHP] question about str_replace function

2007-01-08 Thread Dick Jiang
I think you'd better use regular expression to replace the word Regards, Dick -Original Message- From: Kencana [mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 5:12 PM To: php-general@lists.php.net Subject: [PHP] question about str_replace function Hi all, I got a doubt about

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-08 Thread Jochem Maas
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Sat 1/6/2007 0:17 To: Karl Pflästerer Cc: php-general@lists.php.net Subject: Re: [PHP] Question regarding include() and symlinks to directories On Thu, January 4, 2007 2:47 pm, Karl Pflästerer wrote: In my opinion

Re: [PHP] question about str_replace function

2007-01-08 Thread Jochem Maas
)#, avenue, $string); Regards, Dick -Original Message- From: Kencana [mailto:[EMAIL PROTECTED] Sent: Monday, January 08, 2007 5:12 PM To: php-general@lists.php.net Subject: [PHP] question about str_replace function Hi all, I got a doubt about the str_replace function

Re: [PHP] question about str_replace function

2007-01-08 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-08 11:35:06 +0100: Dick Jiang wrote: I think you'd better use regular expression to replace the word agreed - only it a serious dive in the deep end of regexps - the OP may have to use a negative lookahead assertion, something like: $string=avenue 1, ave 1

Re: [PHP] question about str_replace function

2007-01-08 Thread Jochem Maas
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-08 11:35:06 +0100: Dick Jiang wrote: I think you'd better use regular expression to replace the word agreed - only it a serious dive in the deep end of regexps - the OP may have to use a negative lookahead assertion, something like:

RE: [PHP] Question regarding include() and symlinks to directories

2007-01-07 Thread Vincent DUPONT
) and more flexible than simlinks. Vincent Dupont Ausy Belgium -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Sat 1/6/2007 0:17 To: Karl Pflästerer Cc: php-general@lists.php.net Subject: Re: [PHP] Question regarding include() and symlinks to directories On Thu

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-08 08:13:11 +0100: From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Sat 1/6/2007 0:17 To: Karl Pflästerer Cc: php-general@lists.php.net Subject: Re: [PHP] Question regarding include() and symlinks to directories On Thu, January 4, 2007 2:47 pm, Karl

[PHP] Question regarding include() and symlinks to directories

2007-01-05 Thread spam
Hi let's say we have the follwing directory structure: directory test, with to subdirectories: a and b; both have ssi subdirectory; a has also a subdirectory c with an index.php file in it and in b we habe a symbolic link to a/c. On the shell it looks like this: , | /htdocs/testls -gG * | a:

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-05 Thread Jochem Maas
reply at the bottom ... (Karl Pflästerer) wrote: Hi let's say we have the follwing directory structure: directory test, with to subdirectories: a and b; both have ssi subdirectory; a has also a subdirectory c with an index.php file in it and in b we habe a symbolic link to a/c. On the

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-05 Thread Robert Cummings
On Fri, 2007-01-05 at 22:07 +0100, Jochem Maas wrote: reply at the bottom ... (Karl Pflästerer) wrote: Hi let's say we have the follwing directory structure: directory test, with to subdirectories: a and b; both have ssi subdirectory; a has also a subdirectory c with an index.php file

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-05 Thread Jochem Maas
Robert Cummings wrote: On Fri, 2007-01-05 at 22:07 +0100, Jochem Maas wrote: ... ` In my opinion include() should respect symlinks to directories and not dereference them before finding the file to include. Or am I wrong here? I have tested using your exact description and get the

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-05 Thread Richard Lynch
On Thu, January 4, 2007 2:47 pm, Karl Pflästerer wrote: In my opinion include() should respect symlinks to directories and not dereference them before finding the file to include. Or am I wrong here? The PHP version is 5.1.6 (will soon be updated). Honestly... My answer would be Don't do

Re: [PHP] Question regarding include() and symlinks to directories

2007-01-05 Thread Richard Lynch
On Thu, January 4, 2007 2:47 pm, Karl Pflästerer wrote: In my opinion include() should respect symlinks to directories and not dereference them before finding the file to include. Or am I wrong here? The PHP version is 5.1.6 (will soon be updated). WHOOPS! My fingers slipped and I keyboarded

Re: [PHP] HTML Forms, PHP Question

2006-11-19 Thread Robert Cummings
On Sun, 2006-11-19 at 11:00 -0500, Stephen wrote: Hi First question to the list. I am writing a control panel for a web site and there will be about 20 HTML forms. Instead of creating 20 PHP files to process the submit data, is there a way that I can do this with a single PHP file.

[PHP] HTML Forms, PHP Question

2006-11-19 Thread Stephen
Hi First question to the list. I am writing a control panel for a web site and there will be about 20 HTML forms. Instead of creating 20 PHP files to process the submit data, is there a way that I can do this with a single PHP file. Either specify a specific function for each form, or use

Re: [PHP] HTML Forms, PHP Question

2006-11-19 Thread tedd
At 11:00 AM -0500 11/19/06, Stephen wrote: Hi First question to the list. I am writing a control panel for a web site and there will be about 20 HTML forms. Instead of creating 20 PHP files to process the submit data, is there a way that I can do this with a single PHP file. Either

Re: [PHP] Question about Arrays

2006-10-11 Thread tedd
At 7:04 PM +0100 10/10/06, Alex Major wrote: Hi List. I have a table, which contains 'setting' information for my website. The table has the following columns: setting_id, setting_name and setting_value. Now there are currently 30 settings stored in this table, however i am having trouble

[PHP] Question about Arrays

2006-10-10 Thread Alex Major
Hi List. I have a table, which contains 'setting' information for my website. The table has the following columns: setting_id, setting_name and setting_value. Now there are currently 30 settings stored in this table, however i am having trouble pulling values out on a 'as needed' basis. At

Re: [PHP] Question about Arrays

2006-10-10 Thread Richard Lynch
On Tue, October 10, 2006 1:04 pm, Alex Major wrote: I have a table, which contains 'setting' information for my website. The table has the following columns: setting_id, setting_name and setting_value. Now there are currently 30 settings stored in this table, however i am having trouble

Re: [PHP] Question on explode and join.

2006-09-15 Thread Google Kreme
On 13 Sep 2006, at 11:02 , Dave Goodchild wrote: $_SESSION['profane'] = false; foreach ($_POST as $value) { foreach ($swearbox as $profanity) { if (preg_match(/$profanity/i, $value)) { $errors = true; $_SESSION['profane'] = true;

Re: [PHP] Question on explode and join.

2006-09-15 Thread Richard Lynch
$clean = $input; foreach($badwords as $badword){ $clean = preg_replace('/(\\W)$badword(\\W)/ims', '\\1' . str_repeat('*', strlen($badword)) . '\\2', $clean); } On Wed, September 13, 2006 11:51 am, Beauford wrote: Hi, I have a form which I want to check for inappropriate words before it is

RE: [PHP] Question on explode and join.

2006-09-14 Thread tedd
Message- From: Ducarom [mailto:[EMAIL PROTECTED] Sent: September 13, 2006 2:26 PM To: Beauford Cc: php Subject: Re: [PHP] Question on explode and join. I made some changes to the script from Butera. Now it only replaces complete words. $dirty = array( 'ipsum', 'eloquentiam', 'Vero

Re: [PHP] Question on explode and join.

2006-09-14 Thread Ray Hauge
On Wednesday 13 September 2006 11:51, Beauford wrote: Hi, I have a form which I want to check for inappropriate words before it is posted. I have used explode to put the string into an array using a space as the delimiter and then I check it against another array that contains the

Re: [PHP] Question on explode and join.

2006-09-14 Thread Ray Hauge
On Thursday 14 September 2006 09:47, Ray Hauge wrote: On Wednesday 13 September 2006 11:51, Beauford wrote: Hi, I have a form which I want to check for inappropriate words before it is posted. I have used explode to put the string into an array using a space as the delimiter and then I

RE: [PHP] Question on explode and join.

2006-09-14 Thread Beauford
I read your email, but I'm not using sessions and not really planning too. But some of your code may be able to be modified to do what I need. Thanks for the input. B _ From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: September 14, 2006 8:52 AM To: Beauford Subject: Re: [PHP

[PHP] Question on explode and join.

2006-09-13 Thread Beauford
Hi, I have a form which I want to check for inappropriate words before it is posted. I have used explode to put the string into an array using a space as the delimiter and then I check it against another array that contains the inappropriate words. I then replace the inappropriate words with *'s

Re: [PHP] Question on explode and join.

2006-09-13 Thread Dave Goodchild
Hi. I have just added a profanity filter to a current project which runs like so (all form values are passed into the session after checking for required fields etc). $swearbox is an array containing profanities so I won't include it here! $_SESSION['profane'] = false; foreach ($_POST as

Re: [PHP] Question on explode and join.

2006-09-13 Thread Eric Butera
On 9/13/06, Beauford [EMAIL PROTECTED] wrote: Hi, I have a form which I want to check for inappropriate words before it is posted. I have used explode to put the string into an array using a space as the delimiter and then I check it against another array that contains the inappropriate words.

Re: [PHP] Question on explode and join.

2006-09-13 Thread Christopher Watson
Definitely look into preg_match or even preg_replace, instead of tokenizing the string and rubbing it up against an array of your own. Iterate on your array of bad words, and then use Regular Expressions to selectively hunt and squash. You MAY be able to do it in one regex operation by building

RE: [PHP] Question on explode and join.

2006-09-13 Thread Beauford
_ From: Eric Butera [mailto:[EMAIL PROTECTED] Sent: September 13, 2006 1:07 PM To: Beauford Cc: php Subject: Re: [PHP] Question on explode and join. On 9/13/06, Beauford [EMAIL PROTECTED] wrote: Hi, I have a form which I want to check for inappropriate words before it is posted. I have

Re: [PHP] Question on explode and join.

2006-09-13 Thread Jon Anderson
Beauford wrote: I have a form which I want to check for inappropriate words before it is posted. I have used explode to put the string into an array using a space as the delimiter and then I check it against another array that contains the inappropriate words. I then replace the inappropriate

Re: [PHP] Question on explode and join.

2006-09-13 Thread Ducarom
I made some changes to the script from Butera. Now it only replaces complete words. $dirty = array( 'ipsum', 'eloquentiam', 'Vero' ); foreach ($dirty as $key = $word) { $dirty[$key] = '/\b'. $word . '\b/'; } $string = Lorem ipsum ius no etiam veniam, usu alii novum ne, sed cu

RE: [PHP] Question on explode and join.

2006-09-13 Thread Beauford
: [PHP] Question on explode and join. I made some changes to the script from Butera. Now it only replaces complete words. $dirty = array( 'ipsum', 'eloquentiam', 'Vero' ); foreach ($dirty as $key = $word) { $dirty[$key] = '/\b'. $word . '\b/'; } $string = Lorem ipsum ius no etiam

Re: [PHP] Question on explode and join.

2006-09-13 Thread Ducarom
with it, but ideas are welcome. Thanks -Original Message- From: Ducarom [mailto:[EMAIL PROTECTED] Sent: September 13, 2006 2:26 PM To: Beauford Cc: php Subject: Re: [PHP] Question on explode and join. I made some changes to the script from Butera. Now it only replaces complete words

Re: [PHP] question about how php handles post'd and get'd data

2006-08-09 Thread tedd
At 10:27 AM +1000 8/9/06, Ligaya Turmelle wrote: jonathan wrote: i was having a conversation and was wondering where in the source code for php is the process for writing get'd and post'd data to their corresponding arrays? Also, is there a way to view the source code online? thanks,

Re: [PHP] question about how php handles post'd and get'd data

2006-08-09 Thread Ligaya Turmelle
tedd wrote: At 10:27 AM +1000 8/9/06, Ligaya Turmelle wrote: jonathan wrote: i was having a conversation and was wondering where in the source code for php is the process for writing get'd and post'd data to their corresponding arrays? Also, is there a way to view the source code online?

Re: [PHP] question about how php handles post'd and get'd data

2006-08-08 Thread Ligaya Turmelle
jonathan wrote: i was having a conversation and was wondering where in the source code for php is the process for writing get'd and post'd data to their corresponding arrays? Also, is there a way to view the source code online? thanks, jonathan PHP's cvs is available online at

Re: [PHP] xml v php question

2006-08-04 Thread Richard Lynch
On Tue, July 25, 2006 8:33 am, David Tulloh wrote: Larry Garfield wrote: Disable short tags. The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) Can you find anywhere where this was announced? I don't recall seeing any decision on it. A quick

Re: [PHP] xml v php question

2006-07-25 Thread David Tulloh
Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: a) Use PHP to print out the XML declaration as a string: ?php

Re: [PHP] xml v php question

2006-07-25 Thread tedd
At 11:01 PM -0500 7/24/06, Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: Bingo ! That works : ) Apparently the better

Re: [PHP] xml v php question

2006-07-25 Thread Kevin Waterson
This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin -- Democracy is two wolves and a

Re: [PHP] xml v php question

2006-07-25 Thread Larry Garfield
On Tue, July 25, 2006 3:15 pm, Kevin Waterson said: This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly

<    2   3   4   5   6   7   8   9   10   11   >