Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread mike
This list is democratic as well. Personal experience has led me there from many Google queries, and none of the code has been usable. I give you props for creating a site and classes on it and such, but this list is for people to ask and share opinions. I said it was not to badmouth you but my

RE: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Andrés Robinet
-Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 1:11 AM To: Wang Chen Cc: php-general@lists.php.net Subject: Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA Why not look at phpmailer? Probably more robust than some random

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Manuel Lemos
Hello, on 01/16/2008 02:11 AM mike said the following: Why not look at phpmailer? Probably more robust than some random classes. I did not suggest any random classes. I developed those classes since 1999 and I know they work reliably because they are used by me and tens of thousands of users

[PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Wang Chen
Manuel Lemos said the following on 2008-1-16 13:14: But it's strange that php should send a DATA command out, but tcpdump didn't capture this packet. :( I don't know why you are using tcpdump, but maybe you are only capturing a network interface that is not the one that your code used to

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Manuel Lemos
Hello, on 01/16/2008 03:25 AM mike said the following: This list is democratic as well. Personal experience has led me there from many Google queries, and none of the code has been usable. That does not give you the right to generalize and call all the code in the site crappy, including the

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread mike
On 1/15/08, Manuel Lemos [EMAIL PROTECTED] wrote: You are missing my point. One thing is disliking somebody's work for whatever reasons, another this is acting disrespectfully and call it crappy in a public forum. If you don't know how to act respectfully with other PHP developers, I have

Re: [PHP] Re: [QUESTION] MAIL: Send a NOOP instead of DATA

2008-01-15 Thread Wang Chen
mike said the following on 2008-1-16 12:11: Why not look at phpmailer? Probably more robust than some random classes. http://phpmailer.codeworxtech.com/ Thanks Mike. I will try both and tell you guys I like which one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: Question about urlencode....

2007-11-30 Thread Colin Guthrie
TG wrote: Unless your URL is more complicated than your example, you shouldn't need to use urlencode() at all. You'd need to use it in a case where your string may contain characters that aren't valid in URLs like spaces and such: $baseurl = http://www.somesearchsite.com/search=;;

Re: [PHP] Re: Question on Portfoilo's

2007-04-12 Thread Tijnema !
On 4/11/07, Steve [EMAIL PROTECTED] wrote: If you're working under an NDA or on code that doesn't belong to you, you'll most likely need to hit up the hobbiest side of programming to build your portfolio. Sit down, plan some app that would make your life easier (or someone else's), go through

[PHP] Re: Question on Portfoilo's

2007-04-11 Thread Steve
If you're working under an NDA or on code that doesn't belong to you, you'll most likely need to hit up the hobbiest side of programming to build your portfolio. Sit down, plan some app that would make your life easier (or someone else's), go through the design process, and then code it to

[PHP] Re: Question after php5

2007-03-23 Thread Jochem Maas
Jake McHenry wrote: 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

[PHP] Re: Question

2007-03-20 Thread Greg Beaver
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 another user for this account

[PHP] Re: Question

2007-03-20 Thread Dan Shirah
In my database I have two tables. One table stores all of the account information, the other table stores all of the user information. Table 1 account_id - is the primary key and is unique to each account Table 2 user_id - is the primary key and is unique to each user account_id - will be

[PHP] Re: Question

2007-03-20 Thread Greg Beaver
Dan Shirah wrote: In my database I have two tables. One table stores all of the account information, the other table stores all of the user information. Table 1 account_id - is the primary key and is unique to each account Table 2 user_id - is the primary key and is unique to each

[PHP] Re: Question

2007-03-20 Thread Dan Shirah
I had thought about having the multiple submissions on a single form, but with the amount of user information that is collected and the variable amount of users that may need to be entered this method would not be ideal. (A single form that you have to scroll down a far way and the potential to

Re: [PHP] Re: Question

2007-03-20 Thread Jim Lucas
Dan Shirah wrote: I had thought about having the multiple submissions on a single form, but with the amount of user information that is collected and the variable amount of users that may need to be entered this method would not be ideal. (A single form that you have to scroll down a far way and

Re: [PHP] Re: Question

2007-03-20 Thread Dan Shirah
Because in my application it is VERY VERY VERY important that I track the specific details for any given user in any given account. The user data changes frequently and I need to be able to track user information changes, numbers of accounts they are assigned to etc. So rather than updating the

Re: [PHP] Re: Question

2007-03-20 Thread Németh Zoltán
2007. 03. 20, kedd keltezéssel 16.31-kor Dan Shirah ezt írta: Because in my application it is VERY VERY VERY important that I track the specific details for any given user in any given account. The user data changes frequently and I need to be able to track user information changes, numbers

Re: [PHP] Re: Question

2007-03-20 Thread Richard Lynch
On Tue, March 20, 2007 2:05 pm, Dan Shirah wrote: Each account is unique. It is possible that the same user could be on multiple accounts, therefore the account will be tied to the user each time. If each account can have multiple users, AND each user can have multiple accounts, then you have

Re: [PHP] Re: Question

2007-03-20 Thread Richard Lynch
On Tue, March 20, 2007 3:31 pm, Dan Shirah wrote: Because in my application it is VERY VERY VERY important that I track the specific details for any given user in any given account. The user data changes frequently and I need to be able to track user information changes, numbers of

Re: [PHP] Re: Question

2007-03-20 Thread Jim Lucas
Richard Lynch wrote: On Tue, March 20, 2007 3:31 pm, Dan Shirah wrote: Because in my application it is VERY VERY VERY important that I track the specific details for any given user in any given account. The user data changes frequently and I need to be able to track user information changes,

[PHP] Re: [PHP-WIN] Re: [PHP] Re: Question on virus/worms

2007-03-15 Thread Seak, Teng-Fong
Stut wrote: Seak, Teng-Fong wrote: But after I've spent some time reading the log files, I've finally found out how the hackers managed to achieve worm infiltration. Actually, they're using an URL like this:

Re: [PHP] Re: [PHP-WIN] Re: [PHP] Re: Question on virus/worms

2007-03-15 Thread Dave Goodchild
Turn off register_globals - if you pollute your scripts with global variables like that you are asking for trouble. If you can't make sure you clean the variable. Using include($page.php) is asking for trouble. If you can get register_globals switched off (it's off by default in PHP5 for this

RE: [PHP] Re: question regarding form filtering

2007-03-15 Thread Tim
-Message d'origine- De : Richard Lynch [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 mars 2007 23:45 À : Tim Cc : 'Haydar Tuna'; php-general@lists.php.net Objet : RE: [PHP] Re: question regarding form filtering On Wed, March 14, 2007 9:07 am, Tim wrote: You almost for sure

[PHP] Re: [PHP-WIN] Re: [PHP] Re: Question on virus/worms

2007-03-15 Thread Seak, Teng-Fong
Seak, Teng-Fong wrote: No, I don't deserve anything because, as I've written in the original post (but I suppose you didn't notice), the website is outsourced and made by a 3rd company. Well, I've just realised (and checked) that I forgot to mention that my company's website was outsourced.

RE: [PHP] Re: [PHP-WIN] Re: [PHP] Re: Question on virus/worms

2007-03-15 Thread Jim Moseby
Seak, Teng-Fong wrote: No, I don't deserve anything because, as I've written in the original post (but I suppose you didn't notice), the website is outsourced and made by a 3rd company. Then you should be having this conversation with the 3rd party. They need to validate *EVERY* bit of

Re: [PHP] Re: [PHP-WIN] Re: [PHP] Re: Question on virus/worms

2007-03-15 Thread Richard Lynch
On Thu, March 15, 2007 9:15 am, Seak, Teng-Fong wrote: Stut wrote: Seak, Teng-Fong wrote: But after I've spent some time reading the log files, I've finally found out how the hackers managed to achieve worm infiltration. Actually, they're using an URL like this:

RE: [PHP] Re: question regarding form filtering

2007-03-14 Thread Richard Lynch
expect many on this list to disagree with the preceding 2 paragraphs. YMMV On Tue, March 13, 2007 9:36 am, Tim wrote: -Message d'origine- De : Haydar Tuna [mailto:[EMAIL PROTECTED] Envoyé : mardi 13 mars 2007 14:53 À : php-general@lists.php.net Objet : [PHP] Re: question regarding

[PHP] Re: question for translating fsockopen into CURL

2007-03-14 Thread Chin
Yeni Setiawan wrote: 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

[PHP] Re: question for translating fsockopen into CURL

2007-03-14 Thread Chin
Yeni Setiawan wrote: 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

RE: [PHP] Re: question regarding form filtering

2007-03-14 Thread Tim
-Message d'origine- De : Richard Lynch [mailto:[EMAIL PROTECTED] Envoyé : mercredi 14 mars 2007 09:48 À : Tim Cc : 'Haydar Tuna'; php-general@lists.php.net Objet : RE: [PHP] Re: question regarding form filtering I personally would not presume that PHP and JS regex patterns

RE: [PHP] Re: question regarding form filtering

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 9:07 am, Tim wrote: You almost for sure do *NOT* want to attempt to send the entire Webster's 2nd Edition dictionary to the browser as JS data so that the JS can check. :-) Hehe, oh? Really? ;-) I suppose you could do a Web 2.0 Ajax-y thingie for that... Not a

[PHP] Re: question regarding form filtering

2007-03-13 Thread Haydar Tuna
Hello, You can write some basic functions such as checking length of variable, removing special character, checking number or string, trimming blank lines and so on. And then you can use this functions together and you can write new functions. For example, if you want to check number

RE: [PHP] Re: question regarding form filtering

2007-03-13 Thread Tim
-Message d'origine- De : Haydar Tuna [mailto:[EMAIL PROTECTED] Envoyé : mardi 13 mars 2007 14:53 À : php-general@lists.php.net Objet : [PHP] Re: question regarding form filtering Hello, You can write some basic functions such as checking length of variable, removing

RE: [PHP] Re: Question on virus/worms

2007-03-03 Thread Tim
-Message d'origine- De : Stut [mailto:[EMAIL PROTECTED] Envoyé : vendredi 2 mars 2007 20:23 À : Seak, Teng-Fong Cc : php-windows@lists.php.net; php-general@lists.php.net Objet : Re: [PHP] Re: Question on virus/worms Seak, Teng-Fong wrote: But after I've spent some time

RE: [PHP] Re: Question on virus/worms

2007-03-03 Thread Robert Cummings
On Sat, 2007-03-03 at 14:02 +0100, Tim wrote: Once you are comfortable with this, before you use a script downloaded from the inet in a production environment, go through the code and make sure you don't see any backdoor code (unecessary fsockopen(), exec() etc.. That isn't related to the

Re: [PHP] Re: Question on virus/worms

2007-03-02 Thread Stut
Seak, Teng-Fong wrote: But after I've spent some time reading the log files, I've finally found out how the hackers managed to achieve worm infiltration. Actually, they're using an URL like this: http://my-domain.com/index.php?page=http://hacker-domain.com/some-worm-file.txt? And

[PHP] Re: question about str_replace function

2007-01-08 Thread M.Sokolewicz
change it to ?php $string=avenue 1, ave 1; $words=str_replace (ave ,avenue , $string); echo $words; ? Kencana wrote: 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

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

2007-01-07 Thread spam
On 6 Jan 2007, [EMAIL PROTECTED] wrote: On Thu, January 4, 2007 2:47 pm, Karl Pfl=E4sterer 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).

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

2007-01-07 Thread spam
On 5 Jan 2007, [EMAIL PROTECTED] wrote: 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

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

2007-01-07 Thread Robert Cummings
On Sun, 2007-01-07 at 19:39 +0100, [EMAIL PROTECTED] wrote: On 5 Jan 2007, [EMAIL PROTECTED] wrote: 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,

[PHP] Re: Question about constructors and destructors

2006-06-28 Thread Mathieu Dumoulin
For all to know This bug is linux AND windows, the problem is caused when you have the zend.ze1_compatibility_mode = On in the php.ini file. This is a bug that was reported before several times without having been resolved. I commented and reactiveated the bug on the php bug submission

RE: [PHP] Re: Question about constructors and destructors

2006-06-28 Thread KermodeBear
For all to know This bug is linux AND windows, the problem is caused when you have the zend.ze1_compatibility_mode = On in the php.ini file. This is a bug that was reported before several times without having been resolved. I commented and reactiveated the bug on the php bug submission

Re: [PHP] Re: Question about constructors and destructors

2006-06-28 Thread Jochem Maas
I tested on linux also and found no problem ... Mathieu Dumoulin wrote: For all to know This bug is linux AND windows, the problem is caused when you have the zend.ze1_compatibility_mode = On now it makes sense ... someone else offered a pretty good explanation as to why you see the

Re: [PHP] Re: Question about constructors and destructors

2006-06-28 Thread Richard Lynch
On Wed, June 28, 2006 5:07 pm, Jochem Maas wrote: zend.ze1_compatibility_mode is next to useless in practice for anything but the most simple php4 OO code. certainly if you are wanting to use php5 specific OO functionality like __destruct() you should not be using ze1_compatibility_mode. My

Re: [PHP] Re: Question about constructors and destructors

2006-06-28 Thread Jochem Maas
Richard Lynch wrote: On Wed, June 28, 2006 5:07 pm, Jochem Maas wrote: zend.ze1_compatibility_mode is next to useless in practice for anything but the most simple php4 OO code. certainly if you are wanting to use php5 specific OO functionality like __destruct() you should not be using

Re: [PHP] Re: Question about C++ like macros on PHP

2006-02-01 Thread Andrei
Thnx for the tip. I wanted debug features only for this function. So working with debug_backtrace() was what I needed. Thnx again, Andrei Richard Lynch wrote: On Tue, January 31, 2006 6:40 am, Andrei wrote: Well I know, I wanted to know if any1 did find a workaround... To be more clear,

[PHP] Re: Question about C++ like macros on PHP

2006-01-31 Thread Barry
Andrei wrote: Hi list, For debugging purposes I want to send to a function the line and file where it is called. The problem is that I want these parameters to be added to function as default parameters (changing all function calls would not be an option for me) function my_func(

Re: [PHP] Re: Question about C++ like macros on PHP

2006-01-31 Thread Andrei
Well I know, I wanted to know if any1 did find a workaround... Barry wrote: Andrei wrote: Hi list, For debugging purposes I want to send to a function the line and file where it is called. The problem is that I want these parameters to be added to function as default parameters

Re: [PHP] Re: Question about C++ like macros on PHP

2006-01-31 Thread Richard Lynch
On Tue, January 31, 2006 6:40 am, Andrei wrote: Well I know, I wanted to know if any1 did find a workaround... To be more clear, since obviously several other posters aren't aware of it... http://php.net/set_error_handler allows you to write a function to be called when an error occurs and that

[PHP] Re: question about using $this as a method in a function argument

2006-01-21 Thread Bogdan Ribic
I have a question about using $this as an argument in a method. As I understand it, the only issue here is if you are passing $this from constructor of your class from PHP 4. In short, when you do $var = new MyClass(); you are actually storing a copy of what constructor was seeing as

[PHP] Re: question about compositing objects

2006-01-12 Thread Mark
jonathan wrote: I have a class which creates another class within it such as: class Loc{ public function outputInfo() { $map=new Map(); $map-setKey(); } } In my main page can I access the $map object like this: $loc=new Loc(); $loc-map-publicMapFunction(); I

[PHP] Re: Question about Request.php

2005-12-01 Thread James Benson
Try checking for the error after:- $Req-sendRequest(); Example:- $response = $Req-sendRequest(); if (PEAR::isError($response)) { die($response-getMessage()); } $Response = $Req-getResponseBody(); You may also want to include some options like so:- $options = array( 'method' = 'GET',

[PHP] Re: Question about Request.php

2005-12-01 Thread Danilo Azevedo
Jonathan, thanks for ur assistence, i did the print_r($_REQUEST) , its working fine all my get vars returned i did all my website using the Request.php/PEAR class but only this page dont work, because i never used a Tag with attributes before :(

[PHP] Re: question

2005-11-27 Thread M. Sokolewicz
I see by your questions that you lack the basic insight into what is what exactly in the php/ICT/etc.-world. This is obviously not a bad thing(tm), all of us started with no knowledge and slowly grew into it. So, I hereby will give you a couple of links: * http://en.wikipedia.org/wiki/Server

Re: [PHP] Re: question regarding Reflection

2005-11-03 Thread Jochem Maas
4 things you need to look into: 1. is_file() and is_readable() 2. $argv (contains what was passed along with the cmdline) 3. __autoload() 4. include_path (.ini setting) I trust that you capable of STFW and RTFM well enough to take those 4 and make a start at creating something that resembles

Re: [PHP] Re: question regarding Reflection

2005-11-02 Thread Manish Marathe
On 11/1/05, Curt Zirzow [EMAIL PROTECTED] wrote: On Tue, 01 Nov 2005 14:31:12 -0800, Manish Marathe wrote: ... My question is to use the Reflection API, I need to import the original class for which I am generating tests. For example to generate a tests for class Company which is in

Re: [PHP] Re: question regarding Reflection

2005-11-02 Thread Curt Zirzow
On Wed, 02 Nov 2005 10:29:25 -0800, Manish Marathe wrote: ... My current problem is this: Below is some chunk of the scrip I am writing to generate test code. include_once Company.php; class TestGenerator { public function TestGenerator() { } public function catchReflection() {

[PHP] Re: question regarding Reflection

2005-11-01 Thread Curt Zirzow
On Tue, 01 Nov 2005 14:31:12 -0800, Manish Marathe wrote: ... My question is to use the Reflection API, I need to import the original class for which I am generating tests. For example to generate a tests for class Company which is in Company.php: include_once('company.php'); $c = new

[PHP] Re: Question about including files and server load

2005-10-14 Thread Oliver Grätz
Jay Paulson schrieb: function xyz($abc) { return include(xyz_func.php); } function abc($xyz) { return include(abc_func.php); } Oh. My. God. Is this ugly. OK, it works, but that's not the way how one should abuse include(). I was wondering isn't this putting a bigger load on a server by

[PHP] Re: Question about including files and server load

2005-10-14 Thread Dan Baker
Jay Paulson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I just started working with a new company and they handed me some of their php code for me to look over. I noticed that they have a TON of include files being called into their scripts. For example, instead of having one

Re: [PHP] Re: Question about including files and server load

2005-10-14 Thread Greg Donald
On 10/14/05, Dan Baker [EMAIL PROTECTED] wrote: The concept is that only the code that actually gets executed is ever loaded/compiled. Pretty sneaky! I think that's the general idea behind PHP's autoload(): http://php.net/autoload Using a caching tool like APC or Zend Optimizer would be

[PHP] Re: Question on exec() to call a php script from a php script

2005-07-31 Thread Raj Shekhar
Liang ZHONG [EMAIL PROTECTED] writes: If my php is configured as ( http://liang.ns2user.info/php/info-train06.htm) an apache 2.0 filter module. The php is invoked by apache on request of http client. Can I do an exec() to call another php script to run in the background? If yes, how? This

[PHP] Re: Question to eregi Syntax

2005-07-07 Thread M. Sokolewicz
janbro wrote: Hi List, my research hasn't turned anything useful up. Probably 'cause I don't have enough info. I've been playing around with the ereg function. What I was wondering is what is the ^ for like in the below example? ereg('[^[:space:]a-zA-Z0-9_.-]{1,}', $name) thx janbro it

[PHP] Re: Question to eregi Syntax

2005-07-07 Thread janbro
thx, that's what I've figured. but looking for ^ with any search engine won't give you anything useful. thx JaNbro M. Sokolewicz schrieb: janbro wrote: Hi List, my research hasn't turned anything useful up. Probably 'cause I don't have enough info. I've been playing around with the ereg

Re: [PHP] Re: Question to eregi Syntax

2005-07-07 Thread Philip Hallstrom
janbro wrote: Hi List, my research hasn't turned anything useful up. Probably 'cause I don't have enough info. I've been playing around with the ereg function. What I was wondering is what is the ^ for like in the below example? ereg('[^[:space:]a-zA-Z0-9_.-]{1,}', $name) thx janbro it

Re: [PHP] Re: Question to eregi Syntax

2005-07-07 Thread M. Sokolewicz
Philip Hallstrom wrote: janbro wrote: Hi List, my research hasn't turned anything useful up. Probably 'cause I don't have enough info. I've been playing around with the ereg function. What I was wondering is what is the ^ for like in the below example? ereg('[^[:space:]a-zA-Z0-9_.-]{1,}',

Re: [PHP] Re: Question to eregi Syntax

2005-07-07 Thread david forums
Just for information preg_match is 4-5 times more faster. regards david Le Thu, 07 Jul 2005 19:26:32 +0200, M. Sokolewicz [EMAIL PROTECTED] a écrit: Philip Hallstrom wrote: janbro wrote: Hi List, my research hasn't turned anything useful up. Probably 'cause I don't have enough info.

[PHP] Re: Question to example from manual

2005-06-16 Thread Jason Barnett
janbro wrote: Hi, I've been working on this example and copied it in my webroot, it doesn't give me an output. Does anybody know why? System WinXP Apache 2.0.50 php 5.0.3 Because you've defined the function, but you've never called it. thx janbro Example 7-6. Static variables with

[PHP] Re: Question to example from manual

2005-06-16 Thread janbro
autsch, that's true, sorry for disturbing thx Jason janbro Jason Barnett schrieb: janbro wrote: Hi, I've been working on this example and copied it in my webroot, it doesn't give me an output. Does anybody know why? System WinXP Apache 2.0.50 php 5.0.3 Because you've defined the

[PHP] Re: Question to example from manual

2005-06-16 Thread janbro
autsch, that's true, sorry for disturbing thx Jason janbro Jason Barnett schrieb: janbro wrote: Hi, I've been working on this example and copied it in my webroot, it doesn't give me an output. Does anybody know why? System WinXP Apache 2.0.50 php 5.0.3 Because you've defined the

[PHP] Re: Question regarding PDF creation

2005-04-18 Thread Jason Barnett
Mário Gamito wrote: ... $pdf-Cell(40,10,'CV de ' . $full_name . ',' . 0,0 . ',C'); If I break down this argument to a simpler form, you are using: $pdf-Cell(40,10,'CV de Mario Gamito,0,0,C'); You aren't supplying the last 3 arguments! What I *think* you're going for instead here is:

Re: [PHP] Re: Question about shortening a string

2005-03-12 Thread Jochem Maas
Ashley M. Kirchner wrote: Mário Gamito wrote: ... Does anyone knows how to do this ? ?php $parts = explode(' ', $fullName); $shortenedName = $parts[0].' '.$parts[count($parts)-1]; ? This might solve one problem. What about people who have names like 'Pablo Ricardo del Rey' where you

[PHP] Re: Question about shortening a string

2005-03-11 Thread M. Sokolewicz
Mário Gamito wrote: Hi, In Portgal we have big names. My complete name, for instance, is Mário Augusto Machado dos Reis Gamito. Mário is the Christian name and Gamito - the last one - is always the last name of the father. I have a form where i want to let my users insert their full big name

Re: [PHP] Re: Question about shortening a string

2005-03-11 Thread Mário Gamito
Hi Sokolewicz, Thanks a lot. It just working really fine :) Thank you again. Warm regards, Mário Gamito M. Sokolewicz wrote: Mário Gamito wrote: Hi, In Portgal we have big names. My complete name, for instance, is Mário Augusto Machado dos Reis Gamito. Mário is the Christian name and

Re: [PHP] Re: Question about shortening a string

2005-03-11 Thread Ashley M. Kirchner
Mário Gamito wrote: Hi Sokolewicz, Thanks a lot. It just working really fine :) M. Sokolewicz wrote: Mário Gamito wrote: For example, if i fill the form with Mário Augusto Machado dos Reis Gamito, i want to change this string to only Mário Gamito. The total number of names is not fix. Could

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jochem Maas
Jackson Linux wrote: Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Maas wrote: M. Sokolewicz wrote: Jackson Linux

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jackson Linux
On 10 Mar 2005, at 07:38, Jochem Maas wrote: Jackson Linux wrote: Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jochem Maas
Jackson Linux wrote: all you need is 1 if (or if/else) statement, note that my example is the logical reverse of the first if statement I posted (in reply to your question): if (!isset($_GET['r']) || empty($_GET['r']) || !($r = intval($_GET['r']))) { // _GET['r'] is either not set, empty or

Re: [PHP] Re: Question re empty query SOLVED

2005-03-10 Thread Jackson Linux
Hi, Jochem and everyone This: On 10 Mar 2005, at 15:23, Jochem Maas wrote: if (!isset($_GET['r']) || empty($_GET['r']) || !($r = intval($_GET['r']))) { // show a list of R's include('showlist.inc.php'); } else { // process an R include('process.inc.php'); } Solved my issue entirely, as did

[PHP] Re: Question re empty query

2005-03-09 Thread M. Sokolewicz
Jackson Linux wrote: Hi, This: if (isset($_GET['r']) !empty($_GET['r']) ($r = intval($_GET['r'])) ){ $r = {$_GET['r']}; //Set the variable $r to mean the category number gods, that's an ugly statement... why don't you simply use $r = $_GET['r']; $fields = '*'; $sort = ORDER BY

Re: [PHP] Re: Question re empty query

2005-03-09 Thread Jochem Maas
M. Sokolewicz wrote: Jackson Linux wrote: Hi, This: if (isset($_GET['r']) !empty($_GET['r']) ($r = intval($_GET['r'])) ){ does nobody notice the last 'bit' of the if expression?? if the IF statement evaluates to true then $r _has_ been set!!! $r = {$_GET['r']}; //Set the variable $r to

[PHP] Re: Question regarding simplexml predefined constants

2005-03-09 Thread Jason Barnett
David Allan wrote: In reading the documentation on simplexml predefined constants, I see a note that says these were added to PHP 5.1.0. Am I reading that [future] version correctly, and I can expect that these are to be released in a forthcoming stable release, and in fact do not yet exist

Re: [PHP] Re: Question re empty query

2005-03-09 Thread Jackson Linux
Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Maas wrote: M. Sokolewicz wrote: Jackson Linux wrote: Hi, This: if

[PHP] Re: Question: re: Session-only cookies and Firefox

2005-02-14 Thread Jason Barnett
Rgl wrote: Question: Has anybody else noticed session-only cookies not disappearing when using Firefox? Is this a Firefox bug (should they be notified/ or I get latest Firefox) ? grinThey finally released 1.0, and yet you still use 0.8?/grin I use Firefox quite regularly, but I don't experience

[PHP] Re: Question

2005-02-02 Thread a_pyramidin
I have corrected your document. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: question about a cron job

2005-01-17 Thread Al
Al wrote: I've got a question about the following cronjob. #At 3:01 our time, run backups 1 0 * * * /usr/local/bin/php /www/r/rester/htdocs/auto_backup/back_em_up.php /www/r/rester/htdocs/auto_backup/cron.log 21 #At 3:02 clean up sessions folder 2 0 * * * (find /www/r/rester/htdocs/sessions/

[PHP] Re: Question in posting form-data

2004-12-15 Thread Manuel Lemos
Hello, on 12/15/2004 06:00 PM Minghua Yao said the following: It looks like receive.php didn't receive the posted value. Is there anything wrong with the program? Thanks in advance for any help. It seems that the line breaks are wrong. Anyway, instead of reinventing the wheel, you may want to try

[PHP] Re: Question: array_walk

2004-11-07 Thread M. Sokolewicz
Stuart Felenstein wrote: This array_walk() looks like a good function Would this be a legitimate call: array_walk($myarray, 'mysql_real_escape_string'); ? Thank you, Stuart array_map() is faster :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Question: Passing error messages

2004-11-06 Thread Daniel Schierbeck
Stuart Felenstein wrote: I've started getting into the habit of passing error messages through session variables, particularly on redirects. From some peoples reaction on this list I gather it's not the best practice. What is an alternative way ? I believe it's through a URL. not sure how to go

Re: [PHP] Re: Question: Passing error messages

2004-11-06 Thread Stuart Felenstein
--- Daniel Schierbeck [EMAIL PROTECTED] wrote: I'm not quite getting what you're saying - are you sending the error messages on to a new page?! The usual and simple way of doing this is the good 'ol OR operator: I'm saying, currently if there is an error and the script needs to exit,

Re: [PHP] Re: Question: Passing error messages

2004-11-06 Thread Daniel Schierbeck
Stuart Felenstein wrote: I'm saying, currently if there is an error and the script needs to exit, I'm doing this : if ..error { $_SESSION['ErMsg'] = Submit Failure; header (location: ) exit; } I want to know what alternatives there are to error messages aside from using a session variable.

Re: [PHP] Re: Question: Passing error messages

2004-11-06 Thread Stuart Felenstein
--- Daniel Schierbeck [EMAIL PROTECTED] wrote: Where are you redirecting the client to? An error page? Either an error page or back out to a main page. Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Question about function dns_check_record

2004-11-01 Thread Ben Ramsey
First of all, don't ask two questions in one message. Send two separate messages. You're more likely to get better answers to both questions. Bao Vu wrote: I have a problem regard to function - dns_check_record - dns_get_mx Can you tell me why the PHP said the Call to undefined function?

[PHP] Re: Question about executing PHP script

2004-06-28 Thread Lars Torben Wilson
Charlie Don wrote: Hello, I need to have some scripts that do database maintanance on my cron tab. However, some might take more time to execute that the maxtime set on php.ini. These are now web scripts but scripts that I execute on my command prompt or cron tab. I wonder if there is any way

[PHP] Re: question about M. Lemos's HTML forms generation and validation

2004-03-29 Thread Gimic
It's a simple algorythem, use a loop to enter the names from the database into an array, and compare each to the value in the array. or some hybred thereof. ?php function Compare($UserInput) { $db=mysql_connect($ServerAddress,$LoginName,$LoginPassword)); mysql_select_db($userDB,$db); $result =

[PHP] Re: question about M. Lemos's HTML forms generation and validation

2004-03-29 Thread Gimic
I just looked over the code I recently submitted.. the last if statement needs a semi-colon at the end of the echo(The name don't exist) part... sory if you copy/pasted and got an error.. ;) Gimic [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It's a simple algorythem, use a loop to

[PHP] Re: question about M. Lemos's HTML forms generation and validation

2004-03-26 Thread dr. zoidberg
Manuel Lemos wrote: Hello, On 03/25/2004 10:19 PM, Dr. Zoidberg wrote: I'm creating registration service with this great form script for creating forms within Smarty. Question is how can I validate 'username' against allready registered users in MySQL so that someone cannot register him self

[PHP] Re: question about M. Lemos's HTML forms generation and validation

2004-03-25 Thread Manuel Lemos
Hello, On 03/25/2004 10:19 PM, Dr. Zoidberg wrote: I'm creating registration service with this great form script for creating forms within Smarty. Question is how can I validate 'username' against allready registered users in MySQL so that someone cannot register him self if there is another

[PHP] Re: Question of Charset

2004-03-07 Thread Ligaya Turmelle
I don't understand what you are asking. Please explain. Respectfully, Ligaya Turmelle PHPCommunity: Open Source, Open Community For more information or to join the movement www.phpcommunity.org [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dear All, How to control php (

<    1   2   3   >