[PHP] resize and upload image problem

2007-06-16 Thread Ross
Here is my script. The file is not uploading. In my orignal script it is $_FILES['userfile']['tmp_name'][$i]; that gets uploaded as I have an array of images and it loops through. It must be something to do with this line $tmpName = imagecopyresampled($image_resized, $image, 0, 0, 0, 0,

Re[6]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-16 Thread tedd
At 3:19 PM +0100 6/13/07, Richard Davey wrote: ?php $filter['flags'] = 0; if( $allow_fraction ) { $filter['flags'] |= FILTER_FLAG_ALLOW_FRACTION; } if( $allow_thousand ) { $filter['flags'] |= FILTER_FLAG_ALLOW_THOUSAND; } if( $allow_scientific ) {

Re: [PHP] PHP Competition - Win a copy of Zend Studio

2007-06-16 Thread tedd
At 1:08 AM +0100 6/16/07, Stut wrote: tedd wrote: At 12:45 PM +0100 6/14/07, Stut wrote: Hi All, I've been asked to be a judge in a PHP competition, and I thought I'd let you all know about it. Zend have donated some prizes, including a copy of Zend Studio Professional with 1 year of

[PHP] Undefined index:

2007-06-16 Thread WeberSites LTD
I'm using this code to check if a cookie has a value : If(!IsSet($HTTP_COOKIE_VARS[LoggedIn])) In case that this cookie is not set, how can i avoid the Undefined index: line in the error log? berber

Re: [PHP] Updating dropdown list

2007-06-16 Thread tedd
At 12:55 PM -0600 6/11/07, Ashley M. Kirchner wrote: But I also hate JavaScript. So if I can avoid it and use PHP, then I will. Hence me asking here first to see if I can get it accomplished with PHP. :) Don't hate it -- Javascript is just another cool language. You can do some amazing

Re: [PHP] Updating dropdown list

2007-06-16 Thread tedd
At 8:57 PM +0200 6/11/07, Tijnema wrote: On 6/11/07, Ashley M. Kirchner [EMAIL PROTECTED] wrote: Tijnema wrote: But Javascript != PHP, so if this is what you want, you're on the wrong list... Ik weet dat meneer. But I also hate JavaScript. So if I can avoid it and use PHP, then I will.

Re: [PHP] Undefined index:

2007-06-16 Thread tedd
At 2:37 PM +0200 6/16/07, WeberSites LTD wrote: I'm using this code to check if a cookie has a value : If(!IsSet($HTTP_COOKIE_VARS[LoggedIn])) In case that this cookie is not set, how can i avoid the Undefined index: line in the error log? berber berber: Try this: $loggedIn =

[PHP] Automatic mail forwarding (using cpanel) -------------------------------------------------- (Maybe a bit 0T)

2007-06-16 Thread Ryan A
Hey! I have a pal who has a pretty interesting domain, he wants to offer emails @ his_domain_name.com (example) which gets forwarded to thier normal email address. eg: i make an account at x.com with username genphp and give my real email address of genphp AT yahoo.com all

Re: [PHP] Updating dropdown list

2007-06-16 Thread tedd
At 12:38 PM -0600 6/11/07, Ashley M. Kirchner wrote: I have a page containing two drop down lists. I need to figure out a way to populate/update the second drop down list based on a selection of the first one (the data for both drop down lists is in a MySQL database). Is this something I

Re: [PHP] Automatic mail forwarding (using cpanel) -------------------------------------------------- (Maybe a bit 0T)

2007-06-16 Thread Crayon Shin Chan
On Saturday 16 June 2007 22:00, Ryan A wrote: This is already possible via cpanel but rather than enter each address by hand in cpanel... is there anyway to do this via a php script so that as the user creates a userid and specifies his real address the forward is created? Yeah, find out

[PHP] Re: Automatic mail forwarding (using cpanel) -------------------------------------------------- (Maybe a bit 0T)

2007-06-16 Thread Joker7
In news: [EMAIL PROTECTED] - Ryan A wrote : Hey! I have a pal who has a pretty interesting domain, he wants to offer emails @ his_domain_name.com (example) which gets forwarded to thier normal email address. eg: i make an account at x.com with username genphp and give my real email

Re: [PHP] Form Data Filtering

2007-06-16 Thread Stut
kvigor wrote: if (in_array(strtolower($value), $profanity)) { $profanity[$field] = bad; } on php.net I haven't seen any example on using strtolower w/ arrays. I tried this an I get the following output: Please REMOVE the profanity in the following fields. Immediately! Notice: Undefined

Re: [PHP] Undefined index:

2007-06-16 Thread Stut
WeberSites LTD wrote: I'm using this code to check if a cookie has a value : If(!IsSet($HTTP_COOKIE_VARS[LoggedIn])) In case that this cookie is not set, how can i avoid the Undefined index: line in the error log? The isset function does not give an error if you pass it a

Re: [PHP] Form Data Filtering

2007-06-16 Thread K. Hayes
if(@sizeof($profanity) 0) { echo div class='ermess1'br /Please bREMOVE/b the profanity in the following fields. Immediately!/div; foreach($profanity as $field = $value) { echo nbsp;nbsp;div{$label_array[$field]}/div; //line 114 } } - Original Message - From: Stut [EMAIL

[PHP] The data get lost when click back button

2007-06-16 Thread Tom
My problem: I have a form for that the users register indicating a user's name and password and other data. Previously to add the user in the data base I verify that user's name doesn't already exist. In that case I show an error message and I ask him to attempt it again. But, when the user

Re: [PHP] The data get lost when click back button

2007-06-16 Thread Paul Scott
On Sat, 2007-06-16 at 12:47 -0300, Tom wrote: How can I make in simple way that, the data in the fields don't get lost when the user returning to the form? You can add the field data to a session: $field1 = $_GET['field1']; $_SESSION['field1'] = $field1; // then to get them back again

[PHP] Re: Undefined index:

2007-06-16 Thread Al
There is obviously something else wrong. That's the purpose of isset(); Comment out your line and see what happens. I'd guess the real problem is later in your code when you are trying to do something with $HTTP_COOKIE_VARS[LoggedIn] even though your isset() test said it didn't exist.

[PHP] Are IP addresses reliable?

2007-06-16 Thread PHP Developer
I wanna know that is there a way to forge someone's IP address? for example, I have a client with an static ip address, and she is a superuser. Can i rely on her IP address? or somebody else can forge her IP? I don't want her to enter a username and a password.. Cheers, Daniel

Re: [PHP] Are IP addresses reliable?

2007-06-16 Thread Tijnema
On 6/16/07, PHP Developer [EMAIL PROTECTED] wrote: I wanna know that is there a way to forge someone's IP address? for example, I have a client with an static ip address, and she is a superuser. Can i rely on her IP address? or somebody else can forge her IP? I don't want her to enter a

Re: [PHP] Are IP addresses reliable?

2007-06-16 Thread william(at)elan.net
On Sat, 16 Jun 2007, PHP Developer wrote: I wanna know that is there a way to forge someone's IP address? for example, I have a client with an static ip address, and she is a superuser. Can i rely on her IP address? or somebody else can forge her IP? I don't want her to enter a username and

Re[7]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-16 Thread Richard Davey
Hi tedd, Saturday, June 16, 2007, 1:18:58 PM, you wrote: How about? switch (1) { case $allow_fraction: $filter['flags'] = FILTER_FLAG_ALLOW_FRACTION; break; case $allow_thousand: $filter['flags'] = FILTER_FLAG_ALLOW_THOUSAND;

Re: [PHP] The data get lost when click back button

2007-06-16 Thread tedd
At 12:47 PM -0300 6/16/07, Tom wrote: My problem: I have a form for that the users register indicating a user's name and password and other data. Previously to add the user in the data base I verify that user's name doesn't already exist. In that case I show an error message and I ask him to

[PHP] How to catch any url request

2007-06-16 Thread gd007
Hi, I want to catch any request of the form http://www.abcd.com/somereq.php without creating the somereq.php file. Thanks in advance. --Gautam http://www.funnydomainnames.com/ -- View this message in context: http://www.nabble.com/How-to-catch-any-url-request-tf3934596.html#a11159190 Sent

Re: [PHP] How to catch any url request

2007-06-16 Thread Robert Cummings
On Sat, 2007-06-16 at 16:52 -0700, gd007 wrote: Hi, I want to catch any request of the form http://www.abcd.com/somereq.php without creating the somereq.php file. Thanks in advance. You can either use mod_rewrite in Apache, or set a 404 handler. Probably similar things for webservers other

[PHP] php framework, large site

2007-06-16 Thread martins
hi, can some body help me, how to start php framwork for large site? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] $_SERVER['HTTP_ACCEPT_ENCODING'] unavailable

2007-06-16 Thread Vlad Vlasceanu
Did anyone experience this? I am working on a script that compresses the output, thus relying on $_SERVER['HTTP_ACCEPT_ENCODING'] to figure out how to encode it. The problem is 'http_accept_encoding' is missing from $_SERVER. I realize the value may not be available all the time, but it seems

[PHP] I have a problem with nobody!

2007-06-16 Thread BSumrall
I have been googling this to death and have many references to this, but all solutions seem to either 1 not apply 2 result in parse error The code: mail ($to, $subject, $message, $header); The error Email is sent to recipient as [EMAIL PROTECTED] (fqdn = fully qualified domain name) I have

Re: [PHP] I have a problem with nobody!

2007-06-16 Thread Stut
BSumrall wrote: I have read about a -f function. I tried mail ($to, $subject, $message, -f$header); mail -f($to, $subject, $message, $header); both result in parse error. Boy did you not read the documentation carefully! mail($to, $subject, $message, $headers, '[EMAIL PROTECTED]'); Go

RE: [PHP] I have a problem with nobody!

2007-06-16 Thread BSumrall
PS mail ($to, $subject, $message, $header, '-f [EMAIL PROTECTED]'); doesn't work either. Still have nobody to deal with. As per being RFC compliant! -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Sunday, June 17, 2007 12:15 AM To: BSumrall Cc: php-general@lists.php.net

[PHP] Appending to an Array

2007-06-16 Thread Keith Spiller
Hi Folks, RE: Appending to an Array Here is my code: # PREVIOUS MONTH - $days = array( 10=array(/weblog/archive/2004/Jan/02,linked-day), 12=array(/weblog/archive/2004/Jan/03,linked-day),

RE: [PHP] I have a problem with nobody!

2007-06-16 Thread BSumrall
Well, I am now 1 step closer The php file do nor reference the importance of having no spaces between the -f and email address. [EMAIL PROTECTED] is key! But, still can't get rid of nobody. How do I make nobody disappear? Here is my message header now. Nobody [EMAIL PROTECTED] Using: mail

RE: [PHP] I have a problem with nobody!

2007-06-16 Thread BSumrall
Let's take it one step further for arguments sake. What is I wanted to change nobody as the sender to, let's just say Larry or Curly, or Moe? Making message header as; Larry Shmuckatelli [EMAIL PROTECTED] Or Curly Shmuckatelli [EMAIL PROTECTED] Or Moe Shmuckatelli [EMAIL PROTECTED] What is

[PHP] Re: Appending to an Array

2007-06-16 Thread Vlad Vlasceanu
. is the concatenation operator, usually applies only to strings try: $days[] = array($this_day=array(#,today-day)); or actually: $days[$this_day] = array(#,today-day); since it looks like you're indexing based on the day Keith Spiller wrote: Hi Folks, RE: Appending to an Array Here is

RE: [PHP] I have a problem with nobody! SOLVED!

2007-06-16 Thread BSumrall
The last paragraph of the page Go figure! The appropriate code is; mail ($to, $subject, $message, $header = 'From: Larry, Curly and Moe [EMAIL PROTECTED]'); -Original Message- From: BSumrall [mailto:[EMAIL PROTECTED] Sent: Sunday, June 17, 2007 12:39 AM To: php-general@lists.php.net

RE: [PHP] I have a problem with nobody!

2007-06-16 Thread Robert Cummings
Can't you just set the From and Reply-to headers? ?php $headers = From: [EMAIL PROTECTED] .Reply-to: [EMAIL PROTECTED] .\n; mail( $to, $subject, $message, $headers ); ? BTW, if you look at Stut's post, and you're response, you've placed the parameters parameter in the headers

Re: [PHP] Re: Appending to an Array

2007-06-16 Thread Keith Spiller
Awesome Vlad. You fixed it with your second example perfectly! Thank you so much. Keith - Original Message - From: Vlad Vlasceanu [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Saturday, June 16, 2007 10:43 PM Subject: [PHP] Re: Appending to an Array . is the

[PHP] Previous and Next Month and Year

2007-06-16 Thread Keith Spiller
Hi, RE: Previous and Next Month and Year This is my code: $next_month = date('F Y', time()+$month); $prev_month = date('F Y', time()-$month); echo $prev_month br / \n; #Result June 2007 echo $next_month br / \n; #Result June 2007 What I am trying to do is get the month and year