[PHP] Re: [PHP-WEBMASTER] Simple question

2011-05-09 Thread Richard Quadling
On 9 May 2011 14:53, Vincent McGinley vmcgin...@re-thinkitinc.com wrote:
 Can you remove the @.

 Do you get an error?
 Tried this and got same result (page loads up halfway and no error message).

 Can you change the location to ./folder/$Product.php ?
 Changed path and same result.


 Does the file actually exist?
 Yes. This all worked before. The only variable that has changed is the
 upgrade to php5

 Is the included file a PHP file?
 Yes

 If the file is required_once, it can only be used once. Is that the issue?
 I've tried required, include_once, include. The only difference is that
 require and require_once only loads up half the page and inluce and
 include_once loads up the whole page minus the information that the php is
 looking for.

 include may be a better option here.




 On 5/9/11 9:24 AM, Richard Quadling rquadl...@gmail.com wrote:

 On 9 May 2011 13:48, Vincent McGinley vmcgin...@re-thinkitinc.com wrote:
 Hello I have one line of php code that would switch out information on a
 webpage.

  ?php   @ require_once (folder/$Product.php);   ?

 This would pull in a div with an image and paragraph (the file would be
 located within the same folder or subfolder). This simple code worked fine
 until we upgraded to PHP5. Is there a slight tweak that needs to be done to
 the code to get it to work again?

 Any help would be greatly appreciated.


 Can you remove the @.

 Do you get an error?

 Can you change the location to ./folder/$Product.php ?

 Does it now work?

 Does the file actually exist?

 Is the included file a PHP file?

 If the file is required_once, it can only be used once. Is that the issue?

 include may be a better option here.





From conversation webmaster (related to The PHP Group's web servers)
to general (for general PHP support).

Can you add the following to the top of your script ...

?php
error_reporting(-1); // Report ALL errors, warnings, notices, etc.
ini_set('display_errors', 1); // Display them as part of the output.

// Your code below ...



-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-WEBMASTER] Simple question

2011-05-09 Thread Richard Quadling
On 9 May 2011 15:59, Vincent McGinley vmcgin...@re-thinkitinc.com wrote:
 Notice:  Undefined variable: Product in
 /Applications/MAMP/htdocs/Pages/Products/Bamboo_Zoo/index.php on line 181


And there's the issue.

In your old system, you probably had something called
register_globals enabled.

Please read http://php.net/manual/en/security.globals.php



-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A simple question, however it's urgent

2010-05-17 Thread Ashley Sheridan
On Mon, 2010-05-17 at 15:26 +0300, Andre Polykanine wrote:

 Hello everyone,
 Just can't imagine what happens. There is the simplest function in the
 world:
 
 function LineBreaks ($str) {
 $what=array(\r\n, \n, \r);
 $with=array(br);
 $str=str_replace($what, $with, $str);
 return $str;
 }
 
 And... it does work on one site and doesn't on another. Same hosting
 provider, same settings, all the same.
 When I call
 $_POST['uwork']=LineBreaks($_POST['uwork']);
 Nothing happens. Yes, it does see \r\n's but it doesn't replace them
 with br's. Tried built-in nl2br(), but no result...
 Thank you!..
 
 -- 
 With best regards from Ukraine,
 Andre
 Http://oire.org/ - The Fantasy blogs of Oire
 Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
 jabber.org
 Yahoo! messenger: andre.polykanine; ICQ: 191749952
 Twitter: http://twitter.com/m_elensule
 
 


If nl2br() doesn't even work, are you really sure that those character
exist in the string? Just for our own sake, could you demonstrate how
you determine that the carriage return and line break characters exist
in the string?

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] A simple question, however it's urgent

2010-05-17 Thread Al



On 5/17/2010 8:53 AM, Andre Polykanine wrote:

Ash,

Magic quotes are disabled:
http://gviragon.org/study/php.php
Any ideas?
Thanks a lot!




Your code should work for something as simple as this, almost regardless of the 
php setup.


Change your
$what=array(\r\n, \n, \r);
$with=array(br);

To this, so you can see exactly what's happening.

$what=array(\r\n, \n, \r);
$with=array([*rn*], [*n*], [*r*]);

Echo the string.

There is an error in your $what. You have not included \n\r which is the most 
likely case.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably) FINISHED!!!!!

2007-07-11 Thread Jason Pruim


So after many days and many questions and the help of many many  
people, I have finished my task scheduler!


I just wanted to say thank you to all who helped. Now I just need to  
make it look pretty and add some comments so I know why I did what I  
did. :)


Anyone interested in looking at my code can do so here:
HTTP://www.raoset.com/tests/ticklers/viewall.txt
HTTP://www.raoset.com/tests/ticklers/update.txt

and just as a reminder, this is for a totally internal system at this  
point so I can control all the data going into the database. Maybe I  
should release it as a package or tutorial... I'll think about it, if  
you guys think the code is up to snuff.


Thanks again everyone!



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably) FINISHED!!!!!

2007-07-11 Thread Daniel Brown

On 7/11/07, Jason Pruim [EMAIL PROTECTED] wrote:


So after many days and many questions and the help of many many
people, I have finished my task scheduler!

I just wanted to say thank you to all who helped. Now I just need to
make it look pretty and add some comments so I know why I did what I
did. :)

Anyone interested in looking at my code can do so here:
HTTP://www.raoset.com/tests/ticklers/viewall.txt
HTTP://www.raoset.com/tests/ticklers/update.txt

and just as a reminder, this is for a totally internal system at this
point so I can control all the data going into the database. Maybe I
should release it as a package or tutorial... I'll think about it, if
you guys think the code is up to snuff.

Thanks again everyone!



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]





   Keeping in mind that you'll still be getting jabs about coding
styles from the list (it's an inescapable and inevitable fact here,
you know that), I just wanted to be the first to say, congrats on
finally getting it done.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 9, 2007, at 9:09 AM, Shafiq Rehman wrote:


Hi,

correct syntax for mktime is mktime( int hour, int minute, int  
second,  int

month, int day, int year)


When I did that I got this error:
[Tue Jul 10 09:33:12 2007] [error] PHP Parse error:  syntax error,  
unexpected T_LNUMBER in /Volumes/RAIDer/webserver/Documents/tests/ 
ticklers/update.php on line 34


And line 34 has this:
$taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int  
$year);


So do I have a typo in the syntax? Or is there something I'm missing?





--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote:


Jason Pruim wrote:

Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);


where are you getting the $_POST['txtReschedule'] var from?

in the html below, your var is $_POST['tasks'][#]['txtReschedule']

What does this var value look like?

try strtotime() on it and see what you get.


I was getting it because that's how I always pull posted variables :)  
I did try using the one you posted, even switching out the # for $row 
['id'] and couldn't get that to work.


strtotime() wasn't reporting anything that I could see.

I feel like I am so close to having this right, but yet, so far

Thanks for looking!



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread David Giragosian

On 7/10/07, Jason Pruim [EMAIL PROTECTED] wrote:




Currently that is the date I get when I try to submit any date
through the form. I'm sure I just have something messed up in my
mktime, or in the way I'm grabbing the variable





$taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int $year);


I may be coming in late on this but the above should have parens around the
datatype, e.g., (int). Otherwise, works fine with hardcoded values for the
variables.

David


Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 10, 2007, at 9:52 AM, David Giragosian wrote:


On 7/10/07, Jason Pruim [EMAIL PROTECTED] wrote:




Currently that is the date I get when I try to submit any date
through the form. I'm sure I just have something messed up in my
mktime, or in the way I'm grabbing the variable




$taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int  
$year);


I may be coming in late on this but the above should have parens  
around the
datatype, e.g., (int). Otherwise, works fine with hardcoded values  
for the

variables.

David


So mktime((int) 00, (int)$month) etc. etc. etc.?

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread David Giragosian

On 7/10/07, Jason Pruim [EMAIL PROTECTED] wrote:



On Jul 10, 2007, at 9:52 AM, David Giragosian wrote:

 On 7/10/07, Jason Pruim [EMAIL PROTECTED] wrote:



 Currently that is the date I get when I try to submit any date
 through the form. I'm sure I just have something messed up in my
 mktime, or in the way I'm grabbing the variable



 $taskTime=mktime(int 00,int 00,int 00, int $month, int $day, int
 $year);

 I may be coming in late on this but the above should have parens
 around the
 datatype, e.g., (int). Otherwise, works fine with hardcoded values
 for the
 variables.

 David

So mktime((int) 00, (int)$month) etc. etc. etc




Right. Assuming that $month, etc... have valid values.

For example:
$taskTime=mktime((int) 00, (int) 00, (int) 00, (int) 07, (int) 10, (int)
2007);
echo date('Y', $taskTime);

outputs 2007.


Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Tijnema

On 7/10/07, Jason Pruim [EMAIL PROTECTED] wrote:

While we are on the subject of certain dates, does this date mean
anything? :)

Tue, Nov-30-99 12:00:00?



November 30th, 1999 - In Seattle, Washington, United States, protests
against the WTO meeting by anti-globalization protesters catch police
unprepared and force the cancellation of opening ceremonies.

November 30th, 1999 - British Aerospace and Marconi Electronic Systems
merge to form BAE Systems, Europe's largest defence contractor and the
fourth largest aerospace firm in the world.



Currently that is the date I get when I try to submit any date
through the form. I'm sure I just have something messed up in my
mktime, or in the way I'm grabbing the variable.

Thanks for looking!
--

Jason Pruim


All weird dates here  :P, seems to be no relation to any Unix/PHP things ;)

Tijnema

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 10, 2007, at 10:07 AM, Tijnema wrote:


On 7/10/07, Jason Pruim [EMAIL PROTECTED] wrote:

While we are on the subject of certain dates, does this date mean
anything? :)

Tue, Nov-30-99 12:00:00?



November 30th, 1999 - In Seattle, Washington, United States, protests
against the WTO meeting by anti-globalization protesters catch police
unprepared and force the cancellation of opening ceremonies.

November 30th, 1999 - British Aerospace and Marconi Electronic Systems
merge to form BAE Systems, Europe's largest defence contractor and the
fourth largest aerospace firm in the world.



Currently that is the date I get when I try to submit any date
through the form. I'm sure I just have something messed up in my
mktime, or in the way I'm grabbing the variable.

Thanks for looking!
--

Jason Pruim


All weird dates here  :P, seems to be no relation to any Unix/PHP  
things ;)


Tijnema


Story of my life! I am a master at finding all the weird/hard  
problems :P







--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim
While we are on the subject of certain dates, does this date mean  
anything? :)


Tue, Nov-30-99 12:00:00?

Currently that is the date I get when I try to submit any date  
through the form. I'm sure I just have something messed up in my  
mktime, or in the way I'm grabbing the variable.


Thanks for looking!
--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas

Jason Pruim wrote:


On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote:


Jason Pruim wrote:

Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);


where are you getting the $_POST['txtReschedule'] var from?

in the html below, your var is $_POST['tasks'][#]['txtReschedule']

What does this var value look like?

try strtotime() on it and see what you get.


I was getting it because that's how I always pull posted variables :) I 
did try using the one you posted, even switching out the # for 
$row['id'] and couldn't get that to work.


strtotime() wasn't reporting anything that I could see.

I feel like I am so close to having this right, but yet, so far

Thanks for looking!


Do a print_r() on your $_POST array and show us that.

--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 10, 2007, at 10:41 AM, Jim Lucas wrote:


Jason Pruim wrote:

On Jul 9, 2007, at 10:56 AM, Jim Lucas wrote:

Jason Pruim wrote:

Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);


where are you getting the $_POST['txtReschedule'] var from?

in the html below, your var is $_POST['tasks'][#]['txtReschedule']

What does this var value look like?

try strtotime() on it and see what you get.
I was getting it because that's how I always pull posted  
variables :) I did try using the one you posted, even switching  
out the # for $row['id'] and couldn't get that to work.

strtotime() wasn't reporting anything that I could see.
I feel like I am so close to having this right, but yet, so far
Thanks for looking!

Do a print_r() on your $_POST array and show us that.



here is the print_r($_POST);

Array ( [tasks] = Array ( [31] = Array ( [txtReschedule] =  
07/07/08 [chkDone] = 31 ) [39] = Array ( [txtReschedule] =  
07/08/08 [chkDone] = 39 ) [34] = Array ( [txtReschedule] =  
07/09/09 [chkDone] = 34 ) [36] = Array ( [txtReschedule] = ) [35]  
= Array ( [txtReschedule] = ) [32] = Array ( [txtReschedule] = )  
[33] = Array ( [txtReschedule] = ) [37] = Array ( [txtReschedule]  
= ) [38] = Array ( [txtReschedule] = ) ) )




--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas

Jason Pruim wrote:
  here is the print_r($_POST);


Array ( [tasks] = Array ( [31] = Array ( [txtReschedule] = 07/07/08 
[chkDone] = 31 ) [39] = Array ( [txtReschedule] = 07/08/08 [chkDone] 
= 39 ) [34] = Array ( [txtReschedule] = 07/09/09 [chkDone] = 34 ) 
[36] = Array ( [txtReschedule] = ) [35] = Array ( [txtReschedule] = 
) [32] = Array ( [txtReschedule] = ) [33] = Array ( [txtReschedule] 
= ) [37] = Array ( [txtReschedule] = ) [38] = Array ( 
[txtReschedule] = ) ) )


Just to clarify, your date format is YY/MM/DD ?

--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 10, 2007, at 11:08 AM, Jim Lucas wrote:


Jason Pruim wrote:
  here is the print_r($_POST);
Array ( [tasks] = Array ( [31] = Array ( [txtReschedule] =  
07/07/08 [chkDone] = 31 ) [39] = Array ( [txtReschedule] =  
07/08/08 [chkDone] = 39 ) [34] = Array ( [txtReschedule] =  
07/09/09 [chkDone] = 34 ) [36] = Array ( [txtReschedule] = )  
[35] = Array ( [txtReschedule] = ) [32] = Array  
( [txtReschedule] = ) [33] = Array ( [txtReschedule] = ) [37]  
= Array ( [txtReschedule] = ) [38] = Array ( [txtReschedule]  
= ) ) )


Just to clarify, your date format is YY/MM/DD ?


the date will be entered as MM/DD/YY (The dates listed in there are  
just test data right now :))




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas

Jason Pruim wrote:

here is the print_r($_POST);

Array ( [tasks] = Array ( [31] = Array ( [txtReschedule] = 07/07/08 
[chkDone] = 31 ) [39] = Array ( [txtReschedule] = 07/08/08 [chkDone] 
= 39 ) [34] = Array ( [txtReschedule] = 07/09/09 [chkDone] = 34 ) 
[36] = Array ( [txtReschedule] = ) [35] = Array ( [txtReschedule] = 
) [32] = Array ( [txtReschedule] = ) [33] = Array ( [txtReschedule] 
= ) [37] = Array ( [txtReschedule] = ) [38] = Array ( 
[txtReschedule] = ) ) )




ok, then from this, I assume that you are checking to make sure that [chkDone] is set when you loop 
through the data. something like this should do the trick


pre?php

$tasks = array (
31 = array( 'txtReschedule' = '07/07/08', 'chkDone' = 31 ) ,
39 = array( 'txtReschedule' = '07/08/08', 'chkDone' = 39 ) ,
34 = array( 'txtReschedule' = '07/09/09', 'chkDone' = 34 ) ,
36 = array( 'txtReschedule' = '' ),
35 = array( 'txtReschedule' = '' ),
32 = array( 'txtReschedule' = '' ),
33 = array( 'txtReschedule' = '' ),
37 = array( 'txtReschedule' = '' ),
38 = array( 'txtReschedule' = '' ),
);

# replace $tasks with $_POST['tasks'] to check your actual data

foreach ( $tasks AS $id = $data ) {
if ( !isset($data['chkDone']) ) {
continue;
}

list($month,$day,$year) = explode('/', $data['txtReschedule']);

$utime = mktime(0,0,0,(int)$month,(int)$day,(int)'20'.$year);

echo date('c', $utime).\n;

}


--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote:


Jason Pruim wrote:

here is the print_r($_POST);
Array ( [tasks] = Array ( [31] = Array ( [txtReschedule] =  
07/07/08 [chkDone] = 31 ) [39] = Array ( [txtReschedule] =  
07/08/08 [chkDone] = 39 ) [34] = Array ( [txtReschedule] =  
07/09/09 [chkDone] = 34 ) [36] = Array ( [txtReschedule] = )  
[35] = Array ( [txtReschedule] = ) [32] = Array  
( [txtReschedule] = ) [33] = Array ( [txtReschedule] = ) [37]  
= Array ( [txtReschedule] = ) [38] = Array ( [txtReschedule]  
= ) ) )


ok, then from this, I assume that you are checking to make sure  
that [chkDone] is set when you loop through the data. something  
like this should do the trick


pre?php

$tasks = array (
31 = array( 'txtReschedule' = '07/07/08', 'chkDone' = 31 ) ,
39 = array( 'txtReschedule' = '07/08/08', 'chkDone' = 39 ) ,
34 = array( 'txtReschedule' = '07/09/09', 'chkDone' = 34 ) ,
36 = array( 'txtReschedule' = '' ),


Okay, I think I see where you are going here, But my question is how  
can I set the date dynamically? The context that this is being used  
in is to store a date of the NEXT time the task is needing to be  
done. I'm also not sure why you have the 31, 39, 34, 36  
numbers in there? Those are the database record number so I know  
which one to mark as completed :)


Maybe a page is in order to make it make more sense, also, I'm  
willing to post all the code, but don't want to litter the list with  
a whole bunch of unnecessary info.


HTTP://www.raoset.com/tests/ticklers/viewall.php



--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas

Jason Pruim wrote:


On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote:


Jason Pruim wrote:

here is the print_r($_POST);
Array ( [tasks] = Array ( [31] = Array ( [txtReschedule] = 
07/07/08 [chkDone] = 31 ) [39] = Array ( [txtReschedule] = 
07/08/08 [chkDone] = 39 ) [34] = Array ( [txtReschedule] = 
07/09/09 [chkDone] = 34 ) [36] = Array ( [txtReschedule] = ) [35] 
= Array ( [txtReschedule] = ) [32] = Array ( [txtReschedule] = ) 
[33] = Array ( [txtReschedule] = ) [37] = Array ( [txtReschedule] 
= ) [38] = Array ( [txtReschedule] = ) ) )


ok, then from this, I assume that you are checking to make sure that 
[chkDone] is set when you loop through the data. something like this 
should do the trick


pre?php

$tasks = array (
31 = array( 'txtReschedule' = '07/07/08', 'chkDone' = 31 ) ,
39 = array( 'txtReschedule' = '07/08/08', 'chkDone' = 39 ) ,
34 = array( 'txtReschedule' = '07/09/09', 'chkDone' = 34 ) ,
36 = array( 'txtReschedule' = '' ),


Okay, I think I see where you are going here, But my question is how can 
I set the date dynamically? The context that this is being used in is to 
store a date of the NEXT time the task is needing to be done.

This is just information that you submit from your form.  I just used static 
information instead.

I'm also

not sure why you have the 31, 39, 34, 36 numbers in there?

because that is the data that you posted from your print_r($_POST) that I asked 
for
I reformatted it to understand the structure of it.

Those

are the database record number so I know which one to mark as completed :)

np



Maybe a page is in order to make it make more sense, also,

Would be good

I'm willing
to post all the code, but don't want to litter the list with a whole 
bunch of unnecessary info.

Not needed.



HTTP://www.raoset.com/tests/ticklers/viewall.php
Not sure what I am looking for.  Is the Day to complete column the one that needs to have the date 
entered into it formatted as mm/dd/yy ?





--Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]





--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jason Pruim


On Jul 10, 2007, at 3:25 PM, Jim Lucas wrote:


Jason Pruim wrote:

On Jul 10, 2007, at 11:56 AM, Jim Lucas wrote:

Jason Pruim wrote:

here is the print_r($_POST);
Array ( [tasks] = Array ( [31] = Array ( [txtReschedule] =  
07/07/08 [chkDone] = 31 ) [39] = Array ( [txtReschedule] =  
07/08/08 [chkDone] = 39 ) [34] = Array ( [txtReschedule] =  
07/09/09 [chkDone] = 34 ) [36] = Array ( [txtReschedule] = )  
[35] = Array ( [txtReschedule] = ) [32] = Array  
( [txtReschedule] = ) [33] = Array ( [txtReschedule] = ) [37]  
= Array ( [txtReschedule] = ) [38] = Array ( [txtReschedule]  
= ) ) )


ok, then from this, I assume that you are checking to make sure  
that [chkDone] is set when you loop through the data. something  
like this should do the trick


pre?php

$tasks = array (
31 = array( 'txtReschedule' = '07/07/08', 'chkDone' =  
31 ) ,
39 = array( 'txtReschedule' = '07/08/08', 'chkDone' =  
39 ) ,
34 = array( 'txtReschedule' = '07/09/09', 'chkDone' =  
34 ) ,

36 = array( 'txtReschedule' = '' ),
Okay, I think I see where you are going here, But my question is  
how can I set the date dynamically? The context that this is being  
used in is to store a date of the NEXT time the task is needing to  
be done.
This is just information that you submit from your form.  I just  
used static information instead.


I'm also

not sure why you have the 31, 39, 34, 36 numbers in there?
because that is the data that you posted from your print_r($_POST)  
that I asked for

I reformatted it to understand the structure of it.

Those
are the database record number so I know which one to mark as  
completed :)

np


Maybe a page is in order to make it make more sense, also,

Would be good

I'm willing
to post all the code, but don't want to litter the list with a  
whole bunch of unnecessary info.

Not needed.


HTTP://www.raoset.com/tests/ticklers/viewall.php
Not sure what I am looking for.  Is the Day to complete column  
the one that needs to have the date entered into it formatted as mm/ 
dd/yy ?


Yes, the text box that is currently showing up under Day to  
Complete  is the one that will have the date entered as MM/DD/YY  
then that info will be displayed in the Reschedule Date field. Once  
I can get it storing the date correctly I want to make it show up if  
it's not been completed, from the date that it is supposed to have  
been done, until it is completed :)










--Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare



--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]



--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare




--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-10 Thread Jim Lucas

Jason Pruim wrote:
Yes, the text box that is currently showing up under Day to Complete  
is the one that will have the date entered as MM/DD/YY then that info 
will be displayed in the Reschedule Date field. Once I can get it 
storing the date correctly I want to make it show up if it's not been 
completed, from the date that it is supposed to have been done, until it 
is completed :)


Ok, then where is the problem?

I'm not sure what else there is that I can do.  As far as I can tell, you have all the pieces to put 
this all together as you want it.


Maybe I missed a question in the last couple responses???

Oh, I remember, you asked what about making the date dynamic.

Well, just take out the array $tasks that I statically placed in the example and change the $tasks 
variable in the foreach() loop with $_POST['tasks'] and you should get what you are looking for.


That help?

--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-09 Thread clive

Jason Pruim wrote:

Okay so given this section of code:

$taskTime=mktime(00,00,00,$_POST['txtReschedule']);


im not certain, but I dont think you can pass the date to mktime as 1 
variable, the function requires the following


 mktime($hour, $minute,$second, $month , $day ,$year);

so maybe you need to split up your posted variable

clive




echo HTML

tr
td bgcolor={$rowColor}ID#, {$row['id']} /td
td bgcolor={$rowColor}TicklerName, {$row['task_name']}  /td
td bgcolor={$rowColor}Instructions, a 
href='{$row['task_desc']}'Instructions/a/td

td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td
td bgcolor={$rowColor}DateToReschedule, input type='text' 
name='tasks[{$row['id']}][txtReschedule]' value=''/td

td bgcolor={$rowColor}DateRescheduled, {$Date}/td
td bgcolor={$rowColor}a 
href='update.php?taskid={$row['id']}taskdate={$taskdate}'Click 
here!/a/td

td bgcolor={$rowColor}CheckboxForWhenDone,
input  type='checkbox' name='tasks[{$row['id']}][chkDone]' 
value='{$row['id']}'/td

/tr

HTML;

Why am I getting a time stamp of:

1165640400
Sat, Dec-09-06?

I have been fighting with trying to figure this out and finally decided 
to show my ignorance of the language and ask for help :) Besides, the 
boss wants this done :)


Jason
?PHP

if($brain ==Monday){
echo Let me go home!
};

?




--
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of 
this email. However, many were excited and some may well have enjoyed 
the experience.}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Shafiq Rehman

Hi,

correct syntax for mktime is mktime( int hour, int minute, int second,  int
month, int day, int year)

--
Shafiq Rehman (ZCE)
http://www.phpgurru.com | http://shafiq.pk
Cell: +92 300 423 9385

On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote:


Okay so given this section of code:

$taskTime=mktime(00,00,00,$_POST['txtReschedule']);

echo HTML

tr
td bgcolor={$rowColor}ID#, {$row['id']} /td
td bgcolor={$rowColor}TicklerName, {$row['task_name']}  /td
td bgcolor={$rowColor}Instructions, a href='{$row
['task_desc']}'Instructions/a/td
td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td
td bgcolor={$rowColor}DateToReschedule, input type='text'
name='tasks[{$row['id']}][txtReschedule]' value=''/td
td bgcolor={$rowColor}DateRescheduled, {$Date}/td
td bgcolor={$rowColor}a href='update.php?taskid={$row['id']}
taskdate={$taskdate}'Click here!/a/td
td bgcolor={$rowColor}CheckboxForWhenDone,
input  type='checkbox'
name='tasks[{$row['id']}][chkDone]'
value='{$row['id']}'/td
/tr

HTML;

Why am I getting a time stamp of:

1165640400
Sat, Dec-09-06?

I have been fighting with trying to figure this out and finally
decided to show my ignorance of the language and ask for help :)
Besides, the boss wants this done :)

Jason
?PHP

if($brain ==Monday){
echo Let me go home!
};

?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Jason Pruim


On Jul 9, 2007, at 9:02 AM, clive wrote:


Jason Pruim wrote:

Okay so given this section of code:
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);


im not certain, but I dont think you can pass the date to mktime as  
1 variable, the function requires the following


 mktime($hour, $minute,$second, $month , $day ,$year);

so maybe you need to split up your posted variable

clive


So do an
explode($_POST['txtReschdeule'], /); // type of thing?




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Jim Lucas

Jason Pruim wrote:

Okay so given this section of code:

$taskTime=mktime(00,00,00,$_POST['txtReschedule']);


where are you getting the $_POST['txtReschedule'] var from?

in the html below, your var is $_POST['tasks'][#]['txtReschedule']

What does this var value look like?

try strtotime() on it and see what you get.



echo HTML

tr
td bgcolor={$rowColor}ID#, {$row['id']} /td
td bgcolor={$rowColor}TicklerName, {$row['task_name']}  /td
td bgcolor={$rowColor}Instructions, a 
href='{$row['task_desc']}'Instructions/a/td

td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td
td bgcolor={$rowColor}DateToReschedule, input type='text' 
name='tasks[{$row['id']}][txtReschedule]' value=''/td

td bgcolor={$rowColor}DateRescheduled, {$Date}/td
td bgcolor={$rowColor}a 
href='update.php?taskid={$row['id']}taskdate={$taskdate}'Click 
here!/a/td

td bgcolor={$rowColor}CheckboxForWhenDone,
input  type='checkbox' name='tasks[{$row['id']}][chkDone]' 
value='{$row['id']}'/td

/tr

HTML;

Why am I getting a time stamp of:

1165640400
Sat, Dec-09-06?

I have been fighting with trying to figure this out and finally decided 
to show my ignorance of the language and ask for help :) Besides, the 
boss wants this done :)


Jason
?PHP

if($brain ==Monday){
echo Let me go home!
};

?

--PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
Jim Lucas

   Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Daniel Brown

On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:

Hi,

correct syntax for mktime is mktime( int hour, int minute, int second,  int
month, int day, int year)

--
Shafiq Rehman (ZCE)
http://www.phpgurru.com | http://shafiq.pk
Cell: +92 300 423 9385

On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote:

 Okay so given this section of code:

 $taskTime=mktime(00,00,00,$_POST['txtReschedule']);

 echo HTML

 tr
 td bgcolor={$rowColor}ID#, {$row['id']} /td
 td bgcolor={$rowColor}TicklerName, {$row['task_name']}  /td
 td bgcolor={$rowColor}Instructions, a href='{$row
 ['task_desc']}'Instructions/a/td
 td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td
 td bgcolor={$rowColor}DateToReschedule, input type='text'
 name='tasks[{$row['id']}][txtReschedule]' value=''/td
 td bgcolor={$rowColor}DateRescheduled, {$Date}/td
 td bgcolor={$rowColor}a href='update.php?taskid={$row['id']}
 taskdate={$taskdate}'Click here!/a/td
 td bgcolor={$rowColor}CheckboxForWhenDone,
 input  type='checkbox'
 name='tasks[{$row['id']}][chkDone]'
 value='{$row['id']}'/td
 /tr

 HTML;

 Why am I getting a time stamp of:

 1165640400
 Sat, Dec-09-06?

 I have been fighting with trying to figure this out and finally
 decided to show my ignorance of the language and ask for help :)
 Besides, the boss wants this done :)

 Jason
 ?PHP

 if($brain ==Monday){
 echo Let me go home!
 };

 ?

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





   That's correct, but not all are explicitly required.  The function
should actually be written as follows:

   int mktime( [int hour [,int minute [,int second [,int month [,int
day [,int year [,int dst]]] )

   And by default, if date() is given a second parameter, but that
parameter is null or empty, date() will return `9 December, 2006`
(formatted accordingly).  I'm not certain of the significance of this,
nor am I sure that all versions of PHP will return this same value.
I'd have expected Unix epoch time, so 9 December, 2006, could be an
easter egg date.  Worth reading up on, but nothing I can find so far
explains it.  ANYONE ELSE KNOW?  I'd love to find out!

   Another thing to note is that, if date() is passed information it
doesn't understand in the second parameter, it will return `31 August,
2000` at midnight.  Once again, not sure why, but I'd love to hear the
reason if anyone else knows.

   Some other things to note:

   1.) While it's a Good Idea[tm] to follow the input structure for
mktime() as I listed above, it's actually not required for some dates
and formats.  However, I wasn't able to narrow-down a good algorithm
to prove it, so you should split() or explode() your date when it's
received.

   2.) HOWEVER when passing this information to date(), you have
to keep in mind that leading zeros may be interpreted as octal values
by date() itself.  If you keep getting a SNAFU result, try using a
different date() flag to represent the month or day.

   3.) Sometimes I don't make much sense considering that it's
Monday morning, this may be one of those times.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Tijnema

On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:

On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:
 Hi,

 correct syntax for mktime is mktime( int hour, int minute, int second,  int
 month, int day, int year)

 --
 Shafiq Rehman (ZCE)
 http://www.phpgurru.com | http://shafiq.pk
 Cell: +92 300 423 9385

 On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote:
 
  Okay so given this section of code:
 
  $taskTime=mktime(00,00,00,$_POST['txtReschedule']);
 
  echo HTML
 
  tr
  td bgcolor={$rowColor}ID#, {$row['id']} /td
  td bgcolor={$rowColor}TicklerName, {$row['task_name']}  /td
  td bgcolor={$rowColor}Instructions, a href='{$row
  ['task_desc']}'Instructions/a/td
  td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td
  td bgcolor={$rowColor}DateToReschedule, input type='text'
  name='tasks[{$row['id']}][txtReschedule]' value=''/td
  td bgcolor={$rowColor}DateRescheduled, {$Date}/td
  td bgcolor={$rowColor}a href='update.php?taskid={$row['id']}
  taskdate={$taskdate}'Click here!/a/td
  td bgcolor={$rowColor}CheckboxForWhenDone,
  input  type='checkbox'
  name='tasks[{$row['id']}][chkDone]'
  value='{$row['id']}'/td
  /tr
 
  HTML;
 
  Why am I getting a time stamp of:
 
  1165640400
  Sat, Dec-09-06?
 
  I have been fighting with trying to figure this out and finally
  decided to show my ignorance of the language and ask for help :)
  Besides, the boss wants this done :)
 
  Jason
  ?PHP
 
  if($brain ==Monday){
  echo Let me go home!
  };
 
  ?
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


   That's correct, but not all are explicitly required.  The function
should actually be written as follows:

   int mktime( [int hour [,int minute [,int second [,int month [,int
day [,int year [,int dst]]] )

   And by default, if date() is given a second parameter, but that
parameter is null or empty, date() will return `9 December, 2006`
(formatted accordingly).  I'm not certain of the significance of this,
nor am I sure that all versions of PHP will return this same value.
I'd have expected Unix epoch time, so 9 December, 2006, could be an
easter egg date.  Worth reading up on, but nothing I can find so far
explains it.  ANYONE ELSE KNOW?  I'd love to find out!



The only thing I could find about 9 dec 2006:
9 December, 2006 - Shuttle Discovery launches on the STS-116 mission
at 8:45 P.M., the first night launch in 4 years (STS-113 being the
last).

Tijnema

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Daniel Brown

On 7/9/07, Tijnema [EMAIL PROTECTED] wrote:

On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:
 On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:
  Hi,
 
  correct syntax for mktime is mktime( int hour, int minute, int second,  int
  month, int day, int year)
 
  --
  Shafiq Rehman (ZCE)
  http://www.phpgurru.com | http://shafiq.pk
  Cell: +92 300 423 9385
 
  On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote:
  
   Okay so given this section of code:
  
   $taskTime=mktime(00,00,00,$_POST['txtReschedule']);
  
   echo HTML
  
   tr
   td bgcolor={$rowColor}ID#, {$row['id']} /td
   td bgcolor={$rowColor}TicklerName, {$row['task_name']}  /td
   td bgcolor={$rowColor}Instructions, a href='{$row
   ['task_desc']}'Instructions/a/td
   td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td
   td bgcolor={$rowColor}DateToReschedule, input type='text'
   name='tasks[{$row['id']}][txtReschedule]' value=''/td
   td bgcolor={$rowColor}DateRescheduled, {$Date}/td
   td bgcolor={$rowColor}a href='update.php?taskid={$row['id']}
   taskdate={$taskdate}'Click here!/a/td
   td bgcolor={$rowColor}CheckboxForWhenDone,
   input  type='checkbox'
   name='tasks[{$row['id']}][chkDone]'
   value='{$row['id']}'/td
   /tr
  
   HTML;
  
   Why am I getting a time stamp of:
  
   1165640400
   Sat, Dec-09-06?
  
   I have been fighting with trying to figure this out and finally
   decided to show my ignorance of the language and ask for help :)
   Besides, the boss wants this done :)
  
   Jason
   ?PHP
  
   if($brain ==Monday){
   echo Let me go home!
   };
  
   ?
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 

That's correct, but not all are explicitly required.  The function
 should actually be written as follows:

int mktime( [int hour [,int minute [,int second [,int month [,int
 day [,int year [,int dst]]] )

And by default, if date() is given a second parameter, but that
 parameter is null or empty, date() will return `9 December, 2006`
 (formatted accordingly).  I'm not certain of the significance of this,
 nor am I sure that all versions of PHP will return this same value.
 I'd have expected Unix epoch time, so 9 December, 2006, could be an
 easter egg date.  Worth reading up on, but nothing I can find so far
 explains it.  ANYONE ELSE KNOW?  I'd love to find out!


The only thing I could find about 9 dec 2006:
9 December, 2006 - Shuttle Discovery launches on the STS-116 mission
at 8:45 P.M., the first night launch in 4 years (STS-113 being the
last).

Tijnema

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info



   Yeah, I saw that on Wikipedia that and the Moscow fire that
was the biggest since 1977 or something I think it said it killed
45 women.

   Damn.

--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Tijnema

On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:

On 7/9/07, Tijnema [EMAIL PROTECTED] wrote:
 On 7/9/07, Daniel Brown [EMAIL PROTECTED] wrote:
  On 7/9/07, Shafiq Rehman [EMAIL PROTECTED] wrote:
   Hi,
  
   correct syntax for mktime is mktime( int hour, int minute, int second,  
int
   month, int day, int year)
  
   --
   Shafiq Rehman (ZCE)
   http://www.phpgurru.com | http://shafiq.pk
   Cell: +92 300 423 9385
  
   On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote:
   
Okay so given this section of code:
   
$taskTime=mktime(00,00,00,$_POST['txtReschedule']);
   
echo HTML
   
tr
td bgcolor={$rowColor}ID#, {$row['id']} /td
td bgcolor={$rowColor}TicklerName, {$row['task_name']}  
/td
td bgcolor={$rowColor}Instructions, a href='{$row
['task_desc']}'Instructions/a/td
td bgcolor={$dowColor}DayOfWeekWord, {$dowword} /td
td bgcolor={$rowColor}DateToReschedule, input type='text'
name='tasks[{$row['id']}][txtReschedule]' value=''/td
td bgcolor={$rowColor}DateRescheduled, {$Date}/td
td bgcolor={$rowColor}a 
href='update.php?taskid={$row['id']}
taskdate={$taskdate}'Click here!/a/td
td bgcolor={$rowColor}CheckboxForWhenDone,
input  type='checkbox'
name='tasks[{$row['id']}][chkDone]'
value='{$row['id']}'/td
/tr
   
HTML;
   
Why am I getting a time stamp of:
   
1165640400
Sat, Dec-09-06?
   
I have been fighting with trying to figure this out and finally
decided to show my ignorance of the language and ask for help :)
Besides, the boss wants this done :)
   
Jason
?PHP
   
if($brain ==Monday){
echo Let me go home!
};
   
?
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
  
 
 That's correct, but not all are explicitly required.  The function
  should actually be written as follows:
 
 int mktime( [int hour [,int minute [,int second [,int month [,int
  day [,int year [,int dst]]] )
 
 And by default, if date() is given a second parameter, but that
  parameter is null or empty, date() will return `9 December, 2006`
  (formatted accordingly).  I'm not certain of the significance of this,
  nor am I sure that all versions of PHP will return this same value.
  I'd have expected Unix epoch time, so 9 December, 2006, could be an
  easter egg date.  Worth reading up on, but nothing I can find so far
  explains it.  ANYONE ELSE KNOW?  I'd love to find out!
 

 The only thing I could find about 9 dec 2006:
 9 December, 2006 - Shuttle Discovery launches on the STS-116 mission
 at 8:45 P.M., the first night launch in 4 years (STS-113 being the
 last).

 Tijnema

 --
 Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info


   Yeah, I saw that on Wikipedia that and the Moscow fire that
was the biggest since 1977 or something I think it said it killed
45 women.

   Damn.


Yes, the Moscow Hospital Fire [1] was also on 9 December, was it maybe
the wife of one of the developers of Unix that wife died there in the
hospital? :P

Tijnema

[1] http://en.wikipedia.org/wiki/Moscow_hospital_fire

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] array simple question

2005-09-13 Thread [EMAIL PROTECTED]

tray print the array this way:

echo 'pre';
print_r($array);
echo '/pre';

-afan


matt VanDeWalle wrote:


hello,
I have a simple question, not really a problem this time.
I know that the function print_r() will print an array but if that 
array has sub-arrays it prints everything and if you don't use more 
command or a pipe of some kind that could be useless in some cases, 
but I am just wondering, for an array that has several arrays in it, 
is there a way to print the array names that are contained in the 
main array but not the contents of each?

thanks
matt



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] array simple question

2005-09-13 Thread Jordan Miller
please provide code and an example output, and say how this is  
different than you would like. what you describe is unclear.


Jordan



On Sep 13, 2005, at 4:04 PM, matt VanDeWalle wrote:



hello,
I have a simple question, not really a problem this time.
I know that the function print_r() will print an array but if that  
array has sub-arrays it prints everything and if you don't use more  
command or a pipe of some kind that could be useless in some cases,  
but I am just wondering, for an array that has several arrays in  
it, is there a way to print the array names that are contained in  
the main array but not the contents of each?

thanks
matt

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php







--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] array simple question

2005-09-13 Thread Jasper Bryant-Greene

matt VanDeWalle wrote:

hello,
I have a simple question, not really a problem this time.
I know that the function print_r() will print an array but if that array 
has sub-arrays it prints everything and if you don't use more command or 
a pipe of some kind that could be useless in some cases, but I am just 
wondering, for an array that has several arrays in it, is there a way to 
print the array names that are contained in the main array but not the 
contents of each?


Note: untested code, and this preserves keys, which you might not want. 
It's reasonably simple to change it to not preserve keys.


?php

$array = array( 'this', 'is', 'my', array( 'array' ) );
$newArray = array();

foreach( $array as $key=$value ) {
if( !is_array( $value ) ) {
$newArray[$key] = $value;
}
}

print( 'pre' . print_r( $newArray, true ) . '/pre' );

?

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

If you find my advice useful, please consider donating to a poor
student! You can choose whatever amount you think my advice was
worth to you. http://tinyurl.com/7oa5s

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] array simple question

2005-09-13 Thread Mike Bellerby
If you want to print the keys for all the arrays in the main array then 
use allkeys.




matt VanDeWalle wrote:


hello,
I have a simple question, not really a problem this time.
I know that the function print_r() will print an array but if that 
array has sub-arrays it prints everything and if you don't use more 
command or a pipe of some kind that could be useless in some cases, 
but I am just wondering, for an array that has several arrays in it, 
is there a way to print the array names that are contained in the 
main array but not the contents of each?

thanks
matt



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A simple question

2004-11-13 Thread Brad Bonkoski
Read this..
http://www.php.net/release_4_1_0.php
(Especially the part about global variables...)
- Original Message - 
From: Chuck PUP Payne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, November 13, 2004 9:02 PM
Subject: [PHP] A simple question


Hey,
I have just upgrade my box and my forms are no longer passing information
into the database. I did a simple echo test and sure enough nothing. I was
using Apache 1.3 with php 4.1 I am now using Apache 2 with php 4.3.4, I
thinking there is something that needs to be turn on in my php.ini that I
need to turn to pass information.
Any clues,
Payne
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] A simple question

2004-11-13 Thread Chuck PUP Payne
If I was still on 4.1 I would understand, but I am on 4.3.4 now

I will read it but I think it will there is something that turn on in the
php.ini.

Payne

On 11/13/04 9:13 PM, Brad Bonkoski [EMAIL PROTECTED] wrote:

 Read this..
 http://www.php.net/release_4_1_0.php
 
 (Especially the part about global variables...)
 - Original Message -
 From: Chuck PUP Payne [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, November 13, 2004 9:02 PM
 Subject: [PHP] A simple question
 
 
 Hey,
 
 I have just upgrade my box and my forms are no longer passing information
 into the database. I did a simple echo test and sure enough nothing. I was
 using Apache 1.3 with php 4.1 I am now using Apache 2 with php 4.3.4, I
 thinking there is something that needs to be turn on in my php.ini that I
 need to turn to pass information.
 
 Any clues,
 
 Payne
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A simple question

2004-11-13 Thread Curt Zirzow
* Thus wrote Chuck PUP Payne:
 Hey,
 
 I have just upgrade my box and my forms are no longer passing information
 into the database. I did a simple echo test and sure enough nothing. I was
 using Apache 1.3 with php 4.1 I am now using Apache 2 with php 4.3.4, I
 thinking there is something that needs to be turn on in my php.ini that I
 need to turn to pass information.

4.1 is really old and very many changes have been made. The best
thing to do is to set up a simple form post test.  My bet is you
are probably running into a register_globals issue.

This might help with how to handle POST data:

  http://php.net/language.variables.external



Curt
-- 
Quoth the Raven, Nevermore.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A simple question

2004-11-13 Thread Chuck PUP Payne
Ugh, from what I read now I have to re-write all my forms. No fun. Thanks
guys, I was hoping it was something simple.

I would like to ask one thing, here is a simple code that I was using can
someone explain to what need to be change to work with 4.3.4 so that I can
work on my other pages

?

$db_name = mylinks;

$table_name = links;

$connection = @mysql_connect(localhost,xxx,xxx) or die (Couldn't
connect);

$db = @mysql_select_db($db_name, $connection) or die (Couldn't select
database.);

$sql = INSERT INTO $table_name
(abc, keywords, links, name)
VALUES
('$abc', '$keyword', '$links', '$name');

// echo what should be going into the table...

print A: $abc, KW: $keyword, LINKS: $links, NAME: $name, SQL: $sqlP;

$result = @mysql_query($sql, $connection) or die(Couldn't execute query.);

?


Sorry to ask, just nothing is inserting into the data, and most of the books
I have are from 2000 a little dated.

Payne  


PS. Before someone tells me that it not good to post information here,
things have been change to protect my database.

On 11/13/04 9:59 PM, Janet Valade [EMAIL PROTECTED] wrote:

 
 Actually, read this:
 
 http://us2.php.net/manual/en/security.globals.php
 
 Janet
 
 Chuck PUP Payne wrote:
 
 If I was still on 4.1 I would understand, but I am on 4.3.4 now
 
 I will read it but I think it will there is something that turn on in the
 php.ini.
 
 Payne
 
 On 11/13/04 9:13 PM, Brad Bonkoski [EMAIL PROTECTED] wrote:
 
 
 Read this..
 http://www.php.net/release_4_1_0.php
 
 (Especially the part about global variables...)
 - Original Message -
 From: Chuck PUP Payne [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, November 13, 2004 9:02 PM
 Subject: [PHP] A simple question
 
 
 
 Hey,
 
 I have just upgrade my box and my forms are no longer passing information
 into the database. I did a simple echo test and sure enough nothing. I was
 using Apache 1.3 with php 4.1 I am now using Apache 2 with php 4.3.4, I
 thinking there is something that needs to be turn on in my php.ini that I
 need to turn to pass information.
 
 Any clues,
 
 Payne
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Really simple question - /php directory above /web tree .htaccess contents

2003-03-08 Thread Ernest E Vogelsinger
At 17:58 08.03.2003, news.php.net said:
[snip]
I want to have the /php directory
one directory above the /web root
so it is not accessible from browser command line execution but
will execute from a click on an
html page.  CGI-PHP is installed
but I need to know the .htaccess
contents for the /cgi/php directory

Of course this is possible. You just cannot directly run any PHP script by
URL if it's located outside the web root, but you could easily use stub
files running that part of the application you wish to use.

I assume you have some libraries that you'd like to include in your stub files:

-- stub.php
?php
require_once('../php/library1.php');
?

So there's no real need for an .htaccess-based blocker.

However here's what you need in .htaccess )line numbers only for
explanation below):

1 AuthName The name of your realm
2 AuthType Basic
3 AuthUserFile /etc/httpd/.htpasswd
4 AuthGroupFile /etc/httpd/.htgroup
5 Require group authorized_users
6 Order deny,allow
7 Deny from all
8 Allow from 10.10.10.0/24
9 Allow from ##.##.##.##
10 Satisfy any

Explanation:
1 - This is the text that will appear on the authentication dialog at the
clients side.
2 - There are others (like NTLM) but I don't have any experience using
them. Take care that Basic doesn't provide any encryption of transmitted
UserID/Passwords; it just Base64-encodes it.
3 - Where the password file is located. It may be anywhere, even outside
the web root, as long as it is readable by Apache. You create and maintain
the .htpasswd file using the htpasswd command line utility.
4 - Optional; contains user groups. Maintained by text editor. Format:
group: user user user
group: user user user
5 - Names of user groups that may access the ddirectory. You may as well use
Require user user-id user-id
if you don't support groups.
6 - Order of ACL check (http://httpd.apache.org/docs/mod/mod_access.html#order)
7 - Deny all hosts and users (checked first, see 6)
8 - Allow from the internal network (example, not required)
9 - Allow from any other IP or subnet (example, not required)
10 - http://httpd.apache.org/docs/mod/core.html#satisfy
Allow access if _any_ of the above restrictions is met. If you specify
   Satisfy all
the above example would never allow access since no host can be on 
different addresses...

Note that AllowOverride AuthConfig must be set in the server or virtual
host definition if authentication is to be used via .htaccess.

The authentication directives can be used in the server config at the
Directory level, or in the .htaccess file.

Formore info on Apache directives read
http://httpd.apache.org/docs/mod/directives.html.

HTH,

-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] A simple question please.

2003-01-22 Thread Henry
it doesn't matter beforebody or after body as I know

- Original Message -
From: Denis L. Menezes [EMAIL PROTECTED]
To: PHP general list [EMAIL PROTECTED]
Sent: Wednesday, January 22, 2003 11:21 PM
Subject: [PHP] A simple question please.


Hello friends.

I need to add a part of html (the banner, top menus and the logo) in all
pages dynamically. I made this part of the html and converted same to php
code using Print  command.

Now, how do I add this code in the other pages? Should I inclue require or
include command? if yes? should I include after the body tag itself?

Thanks
denis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] A simple question please.

2003-01-22 Thread Clarkson, Nick


If the start of EVERY page is the same you could make your php include file
as follows;

?php
echo HTML;
echo TITLE;
echo /TITLE;
echo BODY;
?

Obviously padding it out a bit ;o)

Then at the top of every page put;

?php
require (header.php);
?

Similarly you coud do a footer for every page.

You can basically put it where you like as long as the HTML makes sense.

Nick

Another example, from http://www.php.net/manual/en/function.include.php

html 
?php 
  require($TEMPLATE_DIR/pages.header.inc); 
? 
 body 
 ?php require(content.inc);? 
/body 
/html 

...etc. 




-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2003 15:21
To: PHP general list
Subject: [PHP] A simple question please.


Hello friends.

I need to add a part of html (the banner, top menus and the logo) in all
pages dynamically. I made this part of the html and converted same to php
code using Print  command.

Now, how do I add this code in the other pages? Should I inclue require or
include command? if yes? should I include after the body tag itself?

Thanks
denis


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Simple Question

2001-12-12 Thread Tom Ray

oh no, Iv'e gotten two answers...

stripslashes() and strip_slashes()

which one? which one?! G

Gaylen Fraley wrote:

strip_slashes()

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite

Tom Ray [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

I have a quick question that I haven't been able to find the answer to
yet. I've made a couple of guest books via PHP but the biggest problem
I'm having is if any one inputs a ' or  or anything like that, the
output in the book shows the stupid \ for the escape. So the word
Tom's looks like Tom\'s Is there anyway for me to handle those
characters so the backslash doesn't appear in the output?

Thanks,
Tom








RE: [PHP] Re: Simple Question

2001-12-12 Thread Martin Towell

Gaylen is prob right - I didn't check me syntax :(

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 3:11 PM
To: Gaylen Fraley
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Simple Question


oh no, Iv'e gotten two answers...

stripslashes() and strip_slashes()

which one? which one?! G

Gaylen Fraley wrote:

strip_slashes()

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite

Tom Ray [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

I have a quick question that I haven't been able to find the answer to
yet. I've made a couple of guest books via PHP but the biggest problem
I'm having is if any one inputs a ' or  or anything like that, the
output in the book shows the stupid \ for the escape. So the word
Tom's looks like Tom\'s Is there anyway for me to handle those
characters so the backslash doesn't appear in the output?

Thanks,
Tom








Re: [PHP] Re: Simple Question

2001-12-12 Thread Rio Uniwaly

stripslashes() 

Rio :-)
- Original Message - 
From: Tom Ray [EMAIL PROTECTED]
To: Gaylen Fraley [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 11:10 AM
Subject: Re: [PHP] Re: Simple Question


 oh no, Iv'e gotten two answers...
 
 stripslashes() and strip_slashes()
 
 which one? which one?! G
 
 Gaylen Fraley wrote:
 
 strip_slashes()
 
 --
 Gaylen
 [EMAIL PROTECTED]
 Home http://www.gaylenandmargie.com
 PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite
 
 Tom Ray [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 I have a quick question that I haven't been able to find the answer to
 yet. I've made a couple of guest books via PHP but the biggest problem
 I'm having is if any one inputs a ' or  or anything like that, the
 output in the book shows the stupid \ for the escape. So the word
 Tom's looks like Tom\'s Is there anyway for me to handle those
 characters so the backslash doesn't appear in the output?
 
 Thanks,
 Tom
 
 
 
 
 
 


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Simple Question

2001-12-12 Thread Gaylen Fraley

Nope.  fatfingered :)  stripslashes() is correct!

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite

Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Gaylen is prob right - I didn't check me syntax :(

 -Original Message-
 From: Tom Ray [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 13, 2001 3:11 PM
 To: Gaylen Fraley
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Simple Question


 oh no, Iv'e gotten two answers...

 stripslashes() and strip_slashes()

 which one? which one?! G

 Gaylen Fraley wrote:

 strip_slashes()
 
 --
 Gaylen
 [EMAIL PROTECTED]
 Home http://www.gaylenandmargie.com
 PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite
 
 Tom Ray [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 I have a quick question that I haven't been able to find the answer to
 yet. I've made a couple of guest books via PHP but the biggest problem
 I'm having is if any one inputs a ' or  or anything like that, the
 output in the book shows the stupid \ for the escape. So the word
 Tom's looks like Tom\'s Is there anyway for me to handle those
 characters so the backslash doesn't appear in the output?
 
 Thanks,
 Tom
 
 
 
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Simple Question

2001-12-12 Thread Martin Towell

you look at the docs or did you do it the trail-and-error way?

-Original Message-
From: Gaylen Fraley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 3:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Simple Question


Nope.  fatfingered :)  stripslashes() is correct!

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite

Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Gaylen is prob right - I didn't check me syntax :(

 -Original Message-
 From: Tom Ray [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 13, 2001 3:11 PM
 To: Gaylen Fraley
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Simple Question


 oh no, Iv'e gotten two answers...

 stripslashes() and strip_slashes()

 which one? which one?! G

 Gaylen Fraley wrote:

 strip_slashes()
 
 --
 Gaylen
 [EMAIL PROTECTED]
 Home http://www.gaylenandmargie.com
 PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite
 
 Tom Ray [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 I have a quick question that I haven't been able to find the answer to
 yet. I've made a couple of guest books via PHP but the biggest problem
 I'm having is if any one inputs a ' or  or anything like that, the
 output in the book shows the stupid \ for the escape. So the word
 Tom's looks like Tom\'s Is there anyway for me to handle those
 characters so the backslash doesn't appear in the output?
 
 Thanks,
 Tom
 
 
 
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP] Re: Simple Question

2001-12-12 Thread Gaylen

RE: [PHP] Re: Simple QuestionTo be honest, the book PHP4 Developer's Guide by Blake 
Schwendiman has it listed as strip_slashes().  I just happened to be reading it when I 
saw the original message and copied it as it's listed in the index.  So, rather than 
blaming him, I took the blame :).  I then grabbed the Docs and saw it didn't have the 
underscore.  Am I vindicated?

Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite

  - Original Message - 
  From: Martin Towell 
  To: 'Gaylen Fraley' ; [EMAIL PROTECTED] 
  Sent: Wednesday, December 12, 2001 10:56 PM
  Subject: RE: [PHP] Re: Simple Question


  you look at the docs or did you do it the trail-and-error way? 

  -Original Message- 
  From: Gaylen Fraley [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, December 13, 2001 3:22 PM 
  To: [EMAIL PROTECTED] 
  Subject: Re: [PHP] Re: Simple Question 



  Nope.  fatfingered :)  stripslashes() is correct! 

  -- 
  Gaylen 
  [EMAIL PROTECTED] 
  Home http://www.gaylenandmargie.com 
  PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite 

  Martin Towell [EMAIL PROTECTED] wrote in message 
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 
   Gaylen is prob right - I didn't check me syntax :( 
   
   -Original Message- 
   From: Tom Ray [mailto:[EMAIL PROTECTED]] 
   Sent: Thursday, December 13, 2001 3:11 PM 
   To: Gaylen Fraley 
   Cc: [EMAIL PROTECTED] 
   Subject: Re: [PHP] Re: Simple Question 
   
   
   oh no, Iv'e gotten two answers... 
   
   stripslashes() and strip_slashes() 
   
   which one? which one?! G 
   
   Gaylen Fraley wrote: 
   
   strip_slashes() 

   -- 
   Gaylen 
   [EMAIL PROTECTED] 
   Home http://www.gaylenandmargie.com 
   PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite 

   Tom Ray [EMAIL PROTECTED] wrote in message 
   [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 

   I have a quick question that I haven't been able to find the answer to 
   yet. I've made a couple of guest books via PHP but the biggest problem 
   I'm having is if any one inputs a ' or  or anything like that, the 
   output in the book shows the stupid \ for the escape. So the word 
   Tom's looks like Tom\'s Is there anyway for me to handle those 
   characters so the backslash doesn't appear in the output? 

   Thanks, 
   Tom 




   
   




  -- 
  PHP General Mailing List (http://www.php.net/) 
  To unsubscribe, e-mail: [EMAIL PROTECTED] 
  For additional commands, e-mail: [EMAIL PROTECTED] 
  To contact the list administrators, e-mail: [EMAIL PROTECTED] 




RE: [PHP] Re: Simple Question

2001-12-12 Thread Martin Towell

it's just I would've gone ahead and tried one way to see if it gave me a
parse error - but then again, I like doing things the hard way... :)
 
-Original Message-
From: Gaylen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 13, 2001 4:05 PM
To: Martin Towell; [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Simple Question


To be honest, the book PHP4 Developer's Guide by Blake Schwendiman has it
listed as strip_slashes().  I just happened to be reading it when I saw the
original message and copied it as it's listed in the index.  So, rather than
blaming him, I took the blame :).  I then grabbed the Docs and saw it didn't
have the underscore.  Am I vindicated?
 
Gaylen
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Home http://www.gaylenandmargie.com http://www.gaylenandmargie.com 
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite
http://www.gaylenandmargie.com/phpwebsite 


- Original Message - 
From: Martin  mailto:[EMAIL PROTECTED] Towell 
To: 'Gaylen Fraley' mailto:[EMAIL PROTECTED]  ;
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
Sent: Wednesday, December 12, 2001 10:56 PM
Subject: RE: [PHP] Re: Simple Question


you look at the docs or did you do it the trail-and-error way? 

-Original Message- 
From: Gaylen Fraley [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] 
Sent: Thursday, December 13, 2001 3:22 PM 
To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
Subject: Re: [PHP] Re: Simple Question 


Nope.  fatfingered :)  stripslashes() is correct! 

-- 
Gaylen 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
Home http://www.gaylenandmargie.com http://www.gaylenandmargie.com  
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite
http://www.gaylenandmargie.com/phpwebsite  

Martin Towell [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
[EMAIL PROTECTED]">news:[EMAIL PROTECTED] ... 
 Gaylen is prob right - I didn't check me syntax :( 
 
 -Original Message- 
 From: Tom Ray [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
] 
 Sent: Thursday, December 13, 2001 3:11 PM 
 To: Gaylen Fraley 
 Cc: [EMAIL PROTECTED] 
 Subject: Re: [PHP] Re: Simple Question 
 
 
 oh no, Iv'e gotten two answers... 
 
 stripslashes() and strip_slashes() 
 
 which one? which one?! G 
 
 Gaylen Fraley wrote: 
 
 strip_slashes() 
  
 -- 
 Gaylen 
 [EMAIL PROTECTED] 
 Home http://www.gaylenandmargie.com http://www.gaylenandmargie.com  
 PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite
http://www.gaylenandmargie.com/phpwebsite  
  
 Tom Ray [EMAIL PROTECTED] wrote in message 
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]
[EMAIL PROTECTED]">news:[EMAIL PROTECTED] ... 
  
 I have a quick question that I haven't been able to find the answer to 
 yet. I've made a couple of guest books via PHP but the biggest problem 
 I'm having is if any one inputs a ' or  or anything like that, the 
 output in the book shows the stupid \ for the escape. So the word 
 Tom's looks like Tom\'s Is there anyway for me to handle those 
 characters so the backslash doesn't appear in the output? 
  
 Thanks, 
 Tom 
  
  
  
  
 
 



-- 
PHP General Mailing List ( http://www.php.net/ http://www.php.net/ ) 
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 
To contact the list administrators, e-mail: [EMAIL PROTECTED] 




Re: [PHP] Re: Simple Question

2001-12-12 Thread J.F.Kishor

hello,
I don't know how for I got your problem but, If you trying to
print a string like this

eg : print This is Tom's book;

In the above case you need not use a back slash to escape the single quote
coz' php accepts single quote's within a double quote.

Otherwise you can use stripslashes()

which works like this.
  
   string stripslashes(string str);

   Returns a string with backslashes stripped off. (\' becomes ' and so
   on.) Double backslashes are made into a single backslash.

regards
- JFK



 Tom Ray [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 I have a quick question that I haven't been able to find the answer to
 yet. I've made a couple of guest books via PHP but the biggest problem
 I'm having is if any one inputs a ' or  or anything like that, the
 output in the book shows the stupid \ for the escape. So the word
 Tom's looks like Tom\'s Is there anyway for me to handle those
 characters so the backslash doesn't appear in the output?
 
 Thanks,
 Tom
 
 
 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Another simple question (dont hurt me)

2001-07-31 Thread Matt Kaufman

Use the mail() function.

http://www.php.net/mail

Matt Kaufman
- Original Message -
From: Kyle Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 8:33 PM
Subject: [PHP] Another simple question (dont hurt me)


In php, oh wait well this is really 2 questions.. 1 in a form how do i
make it email a file to someone, and the second how do i make it get
recieved as an attatchement...?


-lk6-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] a simple question

2001-07-17 Thread Rasmus Lerdorf

$variable = BLAH
''
BLAH;

On Wed, 18 Jul 2001, Hamed wrote:

 Hi,

 Can anyone tell me please what is the equivelant of this statement from
 perl, in PHP?

 $variable = qq~a value with any quotes which doesnt need \'\'s~;

 i use it to get away with all the s\lashes behind quotes. can anyone tell me
 how to do that in php?

 Regards
 Hamed







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] a (simple) question?

2001-04-27 Thread Michael Kimsal

You can only do one file in each box - get a yahoo mail account and see how
they
handle file uploading.


Ivan Porro wrote:

 Hi,

 anyone know a simple way to realize multiple-upload at once (something
 like Msoft CTRL-multiple selection when browsing and uniqe Upload
 button). I've found only a multiple file input field in a form but the
 numbers of file I'had to upload is unknow.

 TIA
 --
 (p)Ivan

 Student
 DIST Bio-Lab
 Viale Causa 13
 16145 Genoa - Italy

 tel: +39 010 3532789
 e-mail: [EMAIL PROTECTED]

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]