php-general Digest 7 Jul 2008 10:27:09 -0000 Issue 5555

2008-07-07 Thread php-general-digest-help
php-general Digest 7 Jul 2008 10:27:09 - Issue Topics (messages 276338 through 276346): Re: Multiple words str_shuffle 276338 by: David Giragosian 276339 by: Brady Mitchell Re: No Database Connection possible (mySQL) 276340 by: Chris Haensel Problem with

[PHP] Problem with special characters - PHP AJAX

2008-07-07 Thread bperquku
Hi all, I'm writing a simple dictionary with php and ajax. It works perfects with firefox but not in IE. Here is the link http://kllapa.com/fjahalori/test.html I used alerts in js and find out that in the following function: function updateMsgOnBrowser(testXML) { var test =

[PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread mike
I have never had a use for this feature. To me it introduces another register_globals style atttack vector. I see no need why people need to combine post/get/etc variables into the same superglobal. I actually run unset($_REQUEST) on it at the top of my library to discourage its use. For third

[PHP] Re: Session variables disappear (some of them only)

2008-07-07 Thread karma
Hi, Ted Fabrice, thanks for your answers. Sessions variables are only stored in a local file. The dir permissions are ok, and I've tried to store these files in another dir (/var/tmp/php) just to check. The session id is transmitted via cookies only : session.use_cookies = 1

Re: [PHP] Re: Session variables disappear (some of them only)

2008-07-07 Thread Chris
Then the errors sometimes occur in my apache2/ssl_error_log (undefined index in $_SESSION variable). When I check the sess_12345789... file, some of the variables are missing : $_SESSION[a] and [b] are there, but not $_SESSION[c], even an empty one, it is just gone. That's all I know. Sounds

Re: [PHP] Problem with special characters - PHP AJAX

2008-07-07 Thread Michael Kubler
Are the messages being sent as UTF-8 or something else? Is the server sending the headers as something different to that listed in the header? Actually, looking at it, you don't have a valid DOC-TYPE

Re: [PHP] Problem with special characters - PHP AJAX

2008-07-07 Thread Jason Norwood-Young
On Mon, 2008-07-07 at 19:35 +0930, Michael Kubler wrote: Are the messages being sent as UTF-8 or something else? Is the server sending the headers as something different to that listed in the header? Actually, looking at it, you don't have a valid DOC-TYPE

Re: [PHP] V4 Vs V5 Issue

2008-07-07 Thread Neil
Hi Thanks to those who got back to me on this. Turns out the issue was HTTP_POST_VARS..GET, SERVER being so depreciated that they no longer worked at all. Changed all to _POST..._GET, _SERVER etc and all worked fine. I guess they will make a programmer of me yet...hmmm one day maybe.

Re: [PHP] Re: class_is_loadable?

2008-07-07 Thread Eric Butera
On Sun, Jul 6, 2008 at 6:06 AM, Fabrice VIGNALS [EMAIL PROTECTED] wrote: Hi, The problem is not the autoload but the implementation of such function. class_is_loadable mean, hey php look at my class somewhere in my files. PHP should inspect some files, in some directories and list classes.

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 3:10 AM, mike [EMAIL PROTECTED] wrote: I have never had a use for this feature. To me it introduces another register_globals style atttack vector. I see no need why people need to combine post/get/etc variables into the same superglobal. I actually run unset($_REQUEST)

Re: [PHP] Multiple words str_shuffle

2008-07-07 Thread Andrew Ballard
On Sun, Jul 6, 2008 at 8:04 PM, Brady Mitchell [EMAIL PROTECTED] wrote: On Jul 6, 2008, at 305PM, Ron Piggott wrote: I am trying to scramble individual words and/or phrases. When it is a phrase I would like to keep the letters of each word together, with a space between each one. The code

[PHP] Fwd: [PHP-DOC] ftp help

2008-07-07 Thread Thiago H. Pojda
Forwarding to correct list. -- Forwarded message -- From: Dan [EMAIL PROTECTED] Date: Fri, Jul 4, 2008 at 1:56 PM Subject: [PHP-DOC] ftp help To: [EMAIL PROTECTED] I am using a php script to connect to an ftp server. However, the server requires a password change every 90 days.

Re: [PHP] Fwd: [PHP-DOC] ftp help

2008-07-07 Thread metastable
Thiago H. Pojda wrote: Forwarding to correct list. -- Forwarded message -- From: Dan [EMAIL PROTECTED] Date: Fri, Jul 4, 2008 at 1:56 PM Subject: [PHP-DOC] ftp help To: [EMAIL PROTECTED] I am using a php script to connect to an ftp server. However, the server requires a

Re: [PHP] Fwd: [PHP-DOC] ftp help

2008-07-07 Thread metastable
Thiago H. Pojda wrote: Forwarding to correct list. -- Forwarded message -- From: Dan [EMAIL PROTECTED] Date: Fri, Jul 4, 2008 at 1:56 PM Subject: [PHP-DOC] ftp help To: [EMAIL PROTECTED] I am using a php script to connect to an ftp server. However, the server requires a

[PHP] Re: [PHP-DOC] Network Interface Card Name

2008-07-07 Thread Thiago H. Pojda
Forwarding to correct list. On Mon, Jul 7, 2008 at 10:25 AM, Kapil Kapil [EMAIL PROTECTED] wrote: No, I want the name of network interface cards of server, not of client. Thanks regards Kapil On Mon, Jul 7, 2008 at 6:38 PM, Thiago H. Pojda [EMAIL PROTECTED] wrote: That's client-side

Re: [PHP] Re: [PHP-DOC] Network Interface Card Name

2008-07-07 Thread Per Jessen
Thiago H. Pojda wrote: On Mon, Jul 7, 2008 at 8:19 AM, Kapil Kapil [EMAIL PROTECTED] wrote: Hi ! I want to get the name of network interface card, like - VIA Rhine I Fast Ethernet Adapter. Is there any function in php for this or perhaps a way to find it out? Not really a PHP question,

[PHP] Keeping POST values when paging

2008-07-07 Thread Mayer, Jonathan
Hiya all, I have coded a PHP site on an intranet which forms a MySQL query based on multiple inputs on a large form. The form results are POSTed back to itself, and query is formed, and the results are returned from the database and echoed. I am looking to set up a basic paging system

Re: [PHP] Keeping POST values when paging

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 9:51 AM, Mayer, Jonathan [EMAIL PROTECTED] wrote: Hiya all, I have coded a PHP site on an intranet which forms a MySQL query based on multiple inputs on a large form. The form results are POSTed back to itself, and query is formed, and the results are returned from the

Re: [PHP] Keeping POST values when paging

2008-07-07 Thread Wolf
Mayer wrote: Hiya all, I have coded a PHP site on an intranet which forms a MySQL query based on multiple inputs on a large form. The form results are POSTed back to itself, and query is formed, and the results are returned from the database and echoed. I am looking to set up a

RE: [PHP] Keeping POST values when paging

2008-07-07 Thread Mayer, Jonathan
Thanks Wolf and Eric, I shall experiment with the two options you have suggested. Cheers, Jon. -Original Message- From: Wolf [mailto:[EMAIL PROTECTED] Sent: 07 July 2008 14:58 To: Mayer, Jonathan Cc: 'php-general@lists.php.net' Subject: Re: [PHP] Keeping POST values when paging

Re: [PHP] Keeping POST values when paging

2008-07-07 Thread Per Jessen
Mayer, Jonathan wrote: Is there some way of forcing the page to remember and reload the POST variables when clicking next? Or, if that's difficult, can anyone suggest a good way of addressing this problem without too much recoding? I'm sure there must be a neater way of doing it then simply

Re: [PHP] Another instance of shameless self promotion

2008-07-07 Thread Daniel Brown
On Sat, Jun 28, 2008 at 5:04 PM, Richard Heyes [EMAIL PROTECTED] wrote: This time its a line chart: http://www.phpguru.org/line/test.html BTW Is anyone else dumbfounded at the inability of the CANVAS tag to render text natively? A gross oversight IMO. I'm dumbfounded by the inability of

Re: [PHP] Execute command line as a different user

2008-07-07 Thread Daniel Brown
On Tue, Jul 1, 2008 at 1:17 PM, Matt palermo [EMAIL PROTECTED] wrote: My PHP is running as a user with limited rights. I'd like to execute a command line as a different user. I'm trying to delete a file and the PHP user doesn't have access to do this. I know the username and password for

Re: [PHP] Splitting up long URLs

2008-07-07 Thread Philip Thompson
On Jul 1, 2008, at 4:27 PM, Nate Tallman wrote: If you want to do it on the php side, I would do something like this: a href=$fullURLsubstr($fullURL, 0, 9)/a It would provide a valid link using the full url, but chop off everything after the 10th character and replace with a Nate

[PHP] Re: Session variables disappear (some of them only)

2008-07-07 Thread Shawn McKenzie
karma wrote: Hi, Ted Fabrice, thanks for your answers. Sessions variables are only stored in a local file. The dir permissions are ok, and I've tried to store these files in another dir (/var/tmp/php) just to check. The session id is transmitted via cookies only : session.use_cookies =

[PHP] Re: Session variables disappear (some of them only)

2008-07-07 Thread Shawn McKenzie
karma wrote: Hi, Ted Fabrice, thanks for your answers. Sessions variables are only stored in a local file. The dir permissions are ok, and I've tried to store these files in another dir (/var/tmp/php) just to check. The session id is transmitted via cookies only : session.use_cookies =

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Shawn McKenzie
Eric Butera wrote: On Mon, Jul 7, 2008 at 3:10 AM, mike [EMAIL PROTECTED] wrote: I have never had a use for this feature. To me it introduces another register_globals style atttack vector. I see no need why people need to combine post/get/etc variables into the same superglobal. I actually run

Re: [PHP] Re: [PHP-DOC] Network Interface Card Name

2008-07-07 Thread Shawn McKenzie
Per Jessen wrote: Thiago H. Pojda wrote: On Mon, Jul 7, 2008 at 8:19 AM, Kapil Kapil [EMAIL PROTECTED] wrote: Hi ! I want to get the name of network interface card, like - VIA Rhine I Fast Ethernet Adapter. Is there any function in php for this or perhaps a way to find it out? Not really

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 11:23 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: When you use register_globals it extracts the vars from get, post, cookie and session, or used to. But, I don't think session vars are in $_REQUEST. -Shawn http://us2.php.net/manual/en/ini.core.php#ini.request-order --

RE: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Jay Blanchard
[snip] When you use register_globals it extracts the vars from get, post, cookie and session, or used to. But, I don't think session vars are in $_REQUEST. [/snip] $_REQUEST is no different than $_POST or $_GET from a security standpoint. And using register_globals did not carry a security risk

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Shawn McKenzie
Eric Butera wrote: On Mon, Jul 7, 2008 at 11:23 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: When you use register_globals it extracts the vars from get, post, cookie and session, or used to. But, I don't think session vars are in $_REQUEST. -Shawn

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 11:23 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: When you use register_globals it extracts the vars from get, post, cookie and session, or used to. But, I don't think session vars are in $_REQUEST. They can be. Google EGPCS. -- /Daniel P. Brown Dedicated Servers

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 11:36 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: So I was 50% correct. That's better than my normal 0%-33%. Haha ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Shawn McKenzie
They can be what? I was wrong, the S is $_SERVER not $_SESSION. -Shawn Daniel Brown wrote: On Mon, Jul 7, 2008 at 11:23 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: When you use register_globals it extracts the vars from get, post, cookie and session, or used to. But, I don't think session

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 11:43 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: They can be what? I was wrong, the S is $_SERVER not $_SESSION. Sorry, Shawn. That message was meant for the OP, but I clipped your message to send a response to you as well. Disregard. The body is here, but the

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread metastable
Daniel Brown wrote: On Mon, Jul 7, 2008 at 11:43 AM, Shawn McKenzie [EMAIL PROTECTED] wrote: They can be what? I was wrong, the S is $_SERVER not $_SESSION. Sorry, Shawn. That message was meant for the OP, but I clipped your message to send a response to you as well.

[PHP] rfc822_write_address() / CVE-2008-2829 problem

2008-07-07 Thread Matt Graham
Hello, list. A few days ago, a security scan said that our machines that were running PHP had potential vulnerability CVE-2008-2829 , a buffer overflow in rfc822_write_address(). Discussions about this are relatively easy to find with Google, but check out http://bugs.php.net/bug.php?id=42862

[PHP] Re: rfc822_write_address() / CVE-2008-2829 problem

2008-07-07 Thread M. Sokolewicz
Matt Graham wrote: Hello, list. A few days ago, a security scan said that our machines that were running PHP had potential vulnerability CVE-2008-2829 , a buffer overflow in rfc822_write_address(). Discussions about this are relatively easy to find with Google, but check out

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 12:33 PM, metastable [EMAIL PROTECTED] wrote: Cliff, is that you ? Cliff Clavin ? Very astute of you, but I consider myself more of a Norm Peterson. ;-P -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no

[PHP] Re: rfc822_write_address() / CVE-2008-2829 problem

2008-07-07 Thread Matt Graham
From: M. Sokolewicz [EMAIL PROTECTED] Matt Graham wrote: PHP had potential vulnerability CVE-2008-2829 http://bugs.php.net/bug.php?id=42862 for a reasonable discussion and an (unofficial) patch. I'm just curious as to what other PHP users are doing about the problem, since Redhat says meh

Re: [PHP] Keeping POST values when paging

2008-07-07 Thread tedd
At 2:51 PM +0100 7/7/08, Mayer, Jonathan wrote: Hiya all, I have coded a PHP site on an intranet which forms a MySQL query based on multiple inputs on a large form. The form results are POSTed back to itself, and query is formed, and the results are returned from the database and echoed. I am

Re: [PHP] Re: [PHP-DOC] Network Interface Card Name

2008-07-07 Thread Thiago H. Pojda
No, there isn't. It's a system-related info and doesn't affect how PHP works. And, IMHO, it's good that PHP is not aware of these stuff. Use exec(), `, or system() to run these commands. Regards, Thiago On Mon, Jul 7, 2008 at 2:51 PM, Kapil Kapil [EMAIL PROTECTED] wrote: This is a way, I

[PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Jay Moore
Greetings folks. I seem to be having a problem with PHP's mail() function and sending 'From' headers properly. Here's my setup: I have a site I set up for a client that has a form their clients can fill out to submit some data. When the form is submitted, I have PHP gather the data and create

[PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Jay Moore
**Apologies if this posts twice. I got some crazy response from the server after sending this the first time.** I have a site I set up for a client that has a form their clients can fill out to submit some data. When the form is submitted, I have PHP gather the data and create the body of an

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Dan Shirah
You missed the period in your header to join the name and the line break?? 'From: [EMAIL PROTECTED]' . \r\n On 7/7/08, Jay Moore [EMAIL PROTECTED] wrote: Greetings folks. I seem to be having a problem with PHP's mail() function and sending 'From' headers properly. Here's my setup: I have a

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 2:06 PM, Dan Shirah [EMAIL PROTECTED] wrote: You missed the period in your header to join the name and the line break?? That's not required, since the OP is using double quotes (translation will occur). -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 2:06 PM, Dan Shirah [EMAIL PROTECTED] wrote: You missed the period in your header to join the name and the line break?? 'From: [EMAIL PROTECTED]' . \r\n On 7/7/08, Jay Moore [EMAIL PROTECTED] wrote: Greetings folks. I seem to be having a problem with PHP's mail()

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 1:50 PM, Jay Moore [EMAIL PROTECTED] wrote: Greetings folks. I seem to be having a problem with PHP's mail() function and sending 'From' headers properly. Here's my setup: [snip!] I am getting bounce emails from certain ISPs (AOL, Roadrunner, some local ISPs) saying

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 2:13 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Mon, Jul 7, 2008 at 1:50 PM, Jay Moore [EMAIL PROTECTED] wrote: Greetings folks. I seem to be having a problem with PHP's mail() function and sending 'From' headers properly. Here's my setup: [snip!] I am getting

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 2:17 PM, Eric Butera [EMAIL PROTECTED] wrote: Yep! Just a note on this though. You have to control the domain you're forcing the return-path on or else it will get rejected by a lot of servers because of SPF rules. It has bit my company in the behind quite a bit

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Stut
On 7 Jul 2008, at 18:50, Jay Moore wrote: Greetings folks. I seem to be having a problem with PHP's mail() function and sending 'From' headers properly. Here's my setup: I have a site I set up for a client that has a form their clients can fill out to submit some data. When the form is

[PHP] Re: rfc822_write_address() / CVE-2008-2829 problem

2008-07-07 Thread Shawn McKenzie
Matt Graham wrote: From: M. Sokolewicz [EMAIL PROTECTED] Matt Graham wrote: PHP had potential vulnerability CVE-2008-2829 http://bugs.php.net/bug.php?id=42862 for a reasonable discussion and an (unofficial) patch. I'm just curious as to what other PHP users are doing about the problem, since

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread mike
On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: Laziness/convenience. I always get my data from the exact source I want. If someone chooses to use REQUEST it shouldn't break their application. You say it is a security risk, but not really. As long as everything is filtered/escaped

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Shawn McKenzie
mike wrote: On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: Laziness/convenience. I always get my data from the exact source I want. If someone chooses to use REQUEST it shouldn't break their application. You say it is a security risk, but not really. As long as everything is

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 2:47 PM, mike [EMAIL PROTECTED] wrote: I don't see why if you -know- you need $_COOKIE['username'] someone would be lazy and use $_REQUEST['username'] That's the point --- it's intended as a fallback where you *don't* know the method that will be used, or if you want

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Bastien Koert
On Mon, Jul 7, 2008 at 2:55 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: mike wrote: On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: Laziness/convenience. I always get my data from the exact source I want. If someone chooses to use REQUEST it shouldn't break their application. You say

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread mike
On 7/7/08, Daniel Brown [EMAIL PROTECTED] wrote: That's the point --- it's intended as a fallback where you *don't* know the method that will be used, or if you want to be lackadaisical with your code (which, as we all know, is HIGHLY unrecommended). Then you should code for that, not

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 3:08 PM, mike [EMAIL PROTECTED] wrote: Then code for it :P I understand the idea, I don't see the need to create a dedicated construct in PHP for it. Part of PHP's power to me was finally getting away from the lazy ASP (VB-based) Request.Value('foo') or whatever it was

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Shawn McKenzie
mike wrote: On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: Laziness/convenience. I always get my data from the exact source I want. If someone chooses to use REQUEST it shouldn't break their application. You say it is a security risk, but not really. As long as everything is

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 2:47 PM, mike [EMAIL PROTECTED] wrote: On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: Laziness/convenience. I always get my data from the exact source I want. If someone chooses to use REQUEST it shouldn't break their application. You say it is a security risk, but

[PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Jason Pruim
Hi everyone! So it's been a nice long weekend, I come in to work and try and mess with a project that I'm working on to get some new features added. All was going well until I realized that now my application is breaking... Here's the details... PHP 5.2 MySQL 5.2 I store the info in the

[PHP] Re: rfc822_write_address() / CVE-2008-2829 problem

2008-07-07 Thread M. Sokolewicz
Matt Graham wrote: From: M. Sokolewicz [EMAIL PROTECTED] Matt Graham wrote: PHP had potential vulnerability CVE-2008-2829 http://bugs.php.net/bug.php?id=42862 for a reasonable discussion and an (unofficial) patch. I'm just curious as to what other PHP users are doing about the problem, since

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread mike
On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: If your app is written correctly it doesn't matter what is thrown at it, it should always work. Even if a variable gets overridden it should still be forced to play with the rules of the app and work like a valid request does. That is not an

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Per Jessen
Jason Pruim wrote: The problem I'm running into though, is when a value has not changed it doesn't get $_POSTed back Are you certain about that? I'm pretty certain _all_ values are posted back, regardless of whether they've changed or not. Otherwise, how would you ever get a hidden value

[PHP] Re: Question before I end up writing alot of extra code...

2008-07-07 Thread Shawn McKenzie
Jason Pruim wrote: Hi everyone! So it's been a nice long weekend, I come in to work and try and mess with a project that I'm working on to get some new features added. All was going well until I realized that now my application is breaking... Here's the details... PHP 5.2 MySQL 5.2 I

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Wolf
Jason Pruim [EMAIL PROTECTED] wrote: Hi everyone! So it's been a nice long weekend, I come in to work and try and mess with a project that I'm working on to get some new features added. All was going well until I realized that now my application is breaking... Here's the

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Dan Shirah
The problem I'm running into though, is when a value has not changed it doesn't get $_POSTed back and my update script erases the info in the database... I'm trying to avoid using $_GET since it can be quite a few variables. Is there anyway I can do it without comparing the original field

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Jason Pruim
On Jul 7, 2008, at 3:36 PM, Wolf wrote: Jason Pruim [EMAIL PROTECTED] wrote: Hi everyone! So it's been a nice long weekend, I come in to work and try and mess with a project that I'm working on to get some new features added. All was going well until I realized that now my application

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Shawn McKenzie
Jason Pruim wrote: MAIN PAGE: ?PHP echo $row['Tab']; //what do you get? if($row['Tab'] == done){ $Tchecked1 = CHECKED; $Tchecked2 = NULL; }else{ $Tchecked1 = NULL; $Tchecked2 = CHECKED; } echo fieldsetTabBR input type=radio name=rdoTab value=done $Tchecked1Done BR input

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread tedd
At 3:25 PM -0400 7/7/08, Jason Pruim wrote: Hi everyone! So it's been a nice long weekend, I come in to work and try and mess with a project that I'm working on to get some new features added. All was going well until I realized that now my application is breaking... Here's the details...

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread mike
please oh please also run that through filter_input() before throwing a $_POST directly into the db query ;p On 7/7/08, Shawn McKenzie [EMAIL PROTECTED] wrote: Jason Pruim wrote: MAIN PAGE: ?PHP echo $row['Tab']; //what do you get? if($row['Tab'] == done){ $Tchecked1 =

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread mike
doh - and mysql_escape_string or equivalent. On 7/7/08, mike [EMAIL PROTECTED] wrote: please oh please also run that through filter_input() before throwing a $_POST directly into the db query ;p On 7/7/08, Shawn McKenzie [EMAIL PROTECTED] wrote: Jason Pruim wrote: MAIN PAGE:

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Wolf
Oh, and make sure you bottom post too so you actually follow everything! ;) mike [EMAIL PROTECTED] wrote: doh - and mysql_escape_string or equivalent. On 7/7/08, mike [EMAIL PROTECTED] wrote: please oh please also run that through filter_input() before throwing a $_POST

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread tedd
At 3:00 PM -0400 7/7/08, Bastien Koert wrote: Where I see this used a lot is in searching/pagination type scenarios...for the submission, the form is POSTED and then on subsequent pages, the data is stored in the url and posted back to the same script. Using $_REQUEST means that you won't

RE: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Boyd, Todd M.
-Original Message- From: mike [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2008 2:09 PM To: Daniel Brown Cc: Eric Butera; php-general@lists.php.net Subject: Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists On 7/7/08, Daniel Brown [EMAIL PROTECTED]

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Bastien Koert
*cough* ... Request.Value? That seems like lazy VB.NET/ASP.NET code to me. :) It can be split into either Request.QueryString (for GET) or Request.Form (for POST). Anyway, a bit OT... Todd Boyd Web Programmer ASP is the best *hack hack* :-P -- Bastien Cat, the other other white

Re: [PHP] CURL de-bugging: So why am I not getting the results page on the target site?

2008-07-07 Thread ioannes
My code is as below. It comes back with 'Bad session variable name - CompanySerialNo' from the site.but the COOKIEJAR does not show this variable name and it is not sent, it just shows: www.targetsite.comFALSE/FALSE0 ASPSESSIONIDQCSQDTABLKAONANAFJPNMFFECLFNCLBP There

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Eric Butera
On Mon, Jul 7, 2008 at 3:28 PM, mike [EMAIL PROTECTED] wrote: On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: If your app is written correctly it doesn't matter what is thrown at it, it should always work. Even if a variable gets overridden it should still be forced to play with the rules

Re: [PHP] PHP's mail(): proper way to send a 'From' header

2008-07-07 Thread Chris
?php $to = [EMAIL PROTECTED]; $from = [EMAIL PROTECTED]; $subject = This is a test!; $body = \tThis is a test email.\n; $body .= That is all.; $headers = From: .$from.\r\n; $headers .= Reply-To: .$from.\r\n; $headers .= X-Mailer: .basename(__FILE__).-PHP/.phpversion().\r\n;

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread mike
On 7/7/08, Eric Butera [EMAIL PROTECTED] wrote: You asked for an explanation. I was just stating that is how I've seen some people write apps. I've also stated that isn't how I write them either. I use something along these lines: This is true. I really wanted to ask the internals folks

Re: [PHP] Question before I end up writing alot of extra code...

2008-07-07 Thread Chris
Here is a VERY simplified test :) MAIN PAGE: ?PHP if($row['Tab'] == done){ $Tchecked1 = CHECKED; $Tchecked2 = NULL; }else{ $Tchecked1 = NULL; $Tchecked2 = CHECKED; } echo fieldsetTabBR input type=radio name=rdoTab value=done $Tchecked1Done BR input type=radio

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Daniel Brown
On Mon, Jul 7, 2008 at 8:08 PM, mike [EMAIL PROTECTED] wrote: The problem is, the cat's out of the bag now and a lot of people are just being lazy (in my mind) especially those who are used to ASP's Request.Value() which unfortunately is a lot of our developers at work. They don't have a real

Re: [PHP] Multiple words str_shuffle

2008-07-07 Thread Jochem Maas
grrr ... I rear my ugly head, briefly ... Ron Piggott schreef: I am trying to scramble individual words and/or phrases. try harder. ?php function mixit($m) { return trim(chunk_split(str_shuffle(strtoupper($m[1])),1,' ')); } echo preg_replace_callback('#(\w+)#', 'mixit', 'The rain.

Re: [PHP] Looking for a reasonable explanation as to why $_REQUEST exists

2008-07-07 Thread Jochem Maas
Daniel Brown schreef: On Mon, Jul 7, 2008 at 2:47 PM, mike [EMAIL PROTECTED] wrote: I don't see why if you -know- you need $_COOKIE['username'] someone would be lazy and use $_REQUEST['username'] That's the point --- it's intended as a fallback where you *don't* know the method that will

Re: [PHP] Multiple words str_shuffle

2008-07-07 Thread Jochem Maas
Jochem Maas schreef: /snip this is a little better: ?php // $argv[1] is the first script argument on the CLI $phrase = isset($argv[1]) is_string($argv[1]) ? $argv[1] : 'The rain. in Spain falls, mainly on the plain!'; $phrase = preg_replace_callback('#(\w+)#', 'mixit', str_replace( , ,

[PHP] php my admin

2008-07-07 Thread Karl James
Team, Can anyone help me create a form, so I can just insert from a website to my players profile database? I am trying to learn php all over again, so bare with me please. I just need into use form to submit player into players database. Or, should I continue to use the phpmyadmin