Re: [PHP] convert int to string

2002-10-30 Thread Philip Olson
I would approach this by first going here: http://www.php.net/manual/ And go to the section on types: http://www.php.net/manual/en/language.types.php In there is a section for type juggling: http://www.php.net/manual/en/language.types.type-juggling.php From these places you'll see

Re: [PHP] unexpected T_STRING error

2002-09-28 Thread Philip Olson
with arrays inside strings: echo an {$array['key']} b; echo 'an ' . $array['key'] . ' b'; echo an $array[key] b; See also: http://www.zend.com/zend/tut/using-strings.php http://www.php.net/manual/en/language.types.string.php Regards, Philip Olson On Sat, 28 Sep 2002, Gary wrote: Hi

Re: [PHP] Variables aren't being passed to php page

2002-07-14 Thread Philip Olson
Please read this: http://www.php.net/manual/en/language.variables.external.php Regards, Philip Olson On Sun, 14 Jul 2002, Mike Heffner wrote: Hi, I've recently upgraded from PHP 4.0.4p11 - PHP 4.2.1, but now there seems to be a problem that variables from POST/GET are not being passed

Re: [PHP] Variables aren't being passed to php page

2002-07-14 Thread Philip Olson
/language.variables.external.php Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do I get the name of the script?

2002-07-13 Thread Philip Olson
through the predefined server array instead, it's sexier: print $_SERVER['PHP_SELF']; See also: http://www.php.net/manual/en/reserved.variables.php Regards, Philip Olson On Sat, 13 Jul 2002, David Duong wrote: Is their a function that returns an equivalent of $PHP_SELF? -- PHP

Re: [PHP] Character Array

2002-07-11 Thread Philip Olson
/language.types.string.php Regards, Philip Olson On Thu, 11 Jul 2002, Michal Dvoracek wrote: Hello, IMHO string is array of characters so is possible: $str = 'string'; for ($i = 0; $ count($str); $i++) echo $str[$i]; Regards, Michal Dvoracek [EMAIL PROTECTED] Capitol

[PHP] register_globals, the manual, and you.

2002-07-10 Thread Philip Olson
examples and various links. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Crash Course on PHP WORKS :: Registering Globals

2002-07-10 Thread Philip Olson
Please read: http://www.php.net/manual/en/language.variables.predefined.php Regards, Philip Olson On Wed, 10 Jul 2002, vins wrote: OK if you are running php on apache and your form variables don't pass through fire up your editor and edit php.ini and turn Register Globals

Re: [PHP] varible in url question

2002-07-10 Thread Philip Olson
Please read this manual page, it has examples to suit your needs: http://www.php.net/manual/en/language.variables.external.php Regards, Philip Olson On Wed, 10 Jul 2002, sven vandamme wrote: on my page (lessen.php) i have a variable $sort if this varible is empty if enterd the page

Re: [PHP] HTTP_USER_AGENT?

2002-07-10 Thread Philip Olson
book that you have has a typo, there simply is no php_info(). Regards, Philip Olson On Wed, 10 Jul 2002, George Hester wrote: Thanks that worked just fine. But now I am irritated as hell. Obviously there is no backwards compatibility with new releases. Does this mean if I install a new

Re: [PHP] No server var array, why

2002-07-09 Thread Philip Olson
It could stem from the variables_order directive, if it lacks an E. Regards, Philip Olson On Tue, 9 Jul 2002, Analysis Solutions wrote: On Tue, Jul 09, 2002 at 07:34:13AM -0700, Todd Cary wrote: The version of PHP on one is 4.0.3pl1 and on the other it is 4.0.1pl2. Here is what

RE: [PHP] $_REQUEST???

2002-07-09 Thread Philip Olson
request data is unsafe. The only filter I see here is how the data is seperated by type, ex. only GET is in $_GET. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ini_set() broken?

2002-07-08 Thread Philip Olson
are autogenerated and this issue is being looked into. The correct docs on this are now in phpdoc CVS and will show up soon. In short, don't attempt to set register_globals at runtime as explained by a few in this thread, it won't fully work as expected. Regards, Philip Olson -- PHP

Re: [PHP] php is not working with submit button

2002-07-08 Thread Philip Olson
. for this topic, it's been discussed a lot lately :) Regards, Philip Olson On Mon, 8 Jul 2002, Terry Cheung wrote: Hi, I have just downloaded the latest source of apache, php, mod_ssl and mysql to build them all together. It can show the php page and can connect to the mysql database

Re: [PHP] Variable not passing to second page

2002-07-08 Thread Philip Olson
Please don't repeat your questions, see the other post for details. In short, it has to do with register_globals directive in php.ini Regards, Philip Olson On Tue, 9 Jul 2002, Terry Cheung wrote: I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old php script files

Re: [PHP] ini_set() broken?

2002-07-08 Thread Philip Olson
Hello Rasmus- How do you suggest ini_set() document these differences? Maybe the table at ini_set() could use another column, for descriptions and notes. Also, could you give a concise description for the differences between local and master values? Regards, Philip Olson On Mon, 8 Jul

Re: [PHP] to remove html tags from a string.

2002-07-05 Thread Philip Olson
See http://www.php.net/strip_tags On Fri, 5 Jul 2002, Anil Garg wrote: Hi, How to do whats written in the commented line(//) in the code below: ?php $term = .Btest/b; if(stristr($term,) stristr($term,) !stristr($term,br) !stristr($term,p) ){ printf(its html tag); // here i

Re: [PHP] function for size of array

2002-07-05 Thread Philip Olson
It's a term with many different meanings. See: http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?RTFM On Fri, 5 Jul 2002, Scott Fletcher wrote: What is RTFM?? Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 05 July 2002 22:20, Scott

Re: [PHP] $_COOKIE

2002-07-05 Thread Philip Olson
For session id, use session_id() http://www.php.net/session_id Regards, Philip Olson On Fri, 5 Jul 2002, Scott Fletcher wrote: Not a problem! I noticed the PHPSESSID only showed up on $_COOKIE and nothing else. I dont' want to use the $_COOKIE, so I may either assign it to $_SESSION

Re: [PHP] localhost - passing variables

2002-07-05 Thread Philip Olson
to not rely on register_globals = on. In fact, this directive is deprecated and may not work one day. As of PHP 4.2.0 this defaults to off in php.ini. See also: http://www.php.net/manual/en/language.variables.predefined.php http://www.php.net/registerglobals Regards, Philip Olson On Fri, 5

Re: [PHP] increasing max size to upload

2002-06-20 Thread Philip Olson
Rename php.ini-dist to php.ini and modify it according to your needs (also read all the notes contained within). Regards, Philip Olson On Thu, 20 Jun 2002, Anil Garg wrote: hi, how can i change the maximum size of the file being uploaded?? The line below does not seem to help me

Re: [PHP] Post

2002-06-20 Thread Philip Olson
will affect your use of addslashes(). Regards, Philip Olson On Thu, 20 Jun 2002, Erik Price wrote: On Thursday, June 20, 2002, at 12:19 PM, James Drabb wrote: I was wondering if there is a setting to make PHP not change the posted data? For example I am posting a first and Last name

Re: [PHP] include() question...

2002-06-20 Thread Philip Olson
: http://www.php.net/include In your case above, $var will already be available to website.php if you simply include it. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] error messages

2002-06-19 Thread Philip Olson
Try the error_reporting function, which is also a PHP directive in php.ini http://www.php.net/manual/en/features.error-handling.php http://www.php.net/error_reporting Although you should just fix the errors ;) Regards, Philip Olson On Wed, 19 Jun 2002, Shashwat Nagpal wrote: Hi! I did

Re: [PHP] $HTTP_USER_AGENT

2002-06-13 Thread Philip Olson
/knowledge_base/view.phtml/aid/31 Regards, Philip Olson On Thu, 13 Jun 2002, Webmaster do Aborla.net wrote: Hello, Why $HTTP_USER_AGENT don't work?? I can't get it's value, but in phpinfo the value appears. why this??? Thanking in advance, Nuno Lopes -- PHP General Mailing List (http

Re: [PHP] Editor

2002-06-13 Thread Philip Olson
Some popular editors that meet your OS requirements (win32), all have PHP syntax capabilities (in no particular order): - ultraedit - editplus - textpad - zend ide - homesite Download and try them all :) Regards, Philip Olson On Thu, 13 Jun 2002, Daniele Baroncelli wrote: Hi guys

Re: [PHP] Emptying a Single Array Value

2002-06-12 Thread Philip Olson
Regards, Philip Olson On Wed, 12 Jun 2002, Martin Clifford wrote: Howdy, If someone out there could tell me how to get rid of a single key/index pair within an array, it would be great. I've tried both unset() and empty(), but both destroy the entire array. Please CC me directly, as I'm

Re: [PHP] Passing a Variable to PHP Via the URL

2002-06-11 Thread Philip Olson
phpinfo() or simply print_r($_GET) for GET. Regarding your specific question, see the above words and: http://www.php.net/manual/en/security.registerglobals.php Regards, Philip Olson * Assumes the PHP directive track_vars = on, which it always is past 4.0.2. -- PHP General Mailing List (http

Re: [PHP] Array question - Finding the name

2002-06-07 Thread Philip Olson
, 'jim' = $y, 'mike' = $z); $keys = array_keys($my_array); print $keys[0]; // bob print $keys[1]; // jim Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form Variables

2002-06-07 Thread Philip Olson
are some options. See also: http://www.php.net/manual/en/language.variables.predefined.php Regards, Philip Olson On Fri, 7 Jun 2002, Beeman wrote: I just read the release notes and do not believe they are referring to my dilemma. Here is the code I am using. Just a basic form Form.php

RE: [PHP] multiple selects and $_POST['vars'] MORE

2002-06-06 Thread Philip Olson
This is not how they work, the name goes under select not within option. And as others have suggested, using an array is key here: name=bleh[]. http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple Regards, Philip Olson On Thu, 6 Jun 2002, Jay Blanchard wrote: [snip

RE: [PHP] what is the format of the filemtime string

2002-06-05 Thread Philip Olson
not fear the manual. It may seem a little scary at first but it'll start to click more and more for you. Good luck :) Regards, Philip Olson On Wed, 5 Jun 2002, _michael wrote: tight i have tried what you said: $last_mod = filemtime($file); $tdate = date

Re: [PHP] HTTP_RAW_POST_VARS

2002-06-04 Thread Philip Olson
A bug existed in 4.1.x regarding this directive, and was fixed in 4.2.0. Sorry I can't give any specifics (as I've forgotten them) but see the changelog: http://www.php.net/changelog Regards, Philip Olson On Tue, 4 Jun 2002, Daniel Kushner wrote: This variable isn't getting populated

Re: Re[2]: [PHP] A small question - Mysql_insert_id

2002-06-03 Thread Philip Olson
Jim- Please don't post such useless garbage to the lists. The thread was dead, mistakes were made, time to move on. We all make mistakes from time to time (frustration), and can only learn from them. Draft folders are good. Regards, Philip Olson and you want people to actually ready

Re: [PHP] Re: stupid error, please kick me (and send me a solution)

2002-06-03 Thread Philip Olson
but will work (eww) print '$foo'; // literally prints a string $foo and // not the value of $foo. bad. Read/study this tutorial on using strings: http://www.zend.com/zend/tut/using-strings.php Good luck, you'll get the hang of it soon :) Regards, Philip Olson On Mon, 3 Jun

Re: [PHP] HUGE ERROR (was: [PHP] stupid error, please kick me (andsend me a solution))

2002-06-03 Thread Philip Olson
Please post: a) the error b) if the error is line #5, just post related lines line 4-6. I did see this: $result = mysql_query('$query', '$link_glob'); Which should be: $result = mysql_query($query, $link_glob); -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] mysql_select_db problem

2002-06-03 Thread Philip Olson
the '' from your code, odds are it'd shout an error too. '' can be useful for supressing errors so we can implement our own form of error management/trapping, like in the above. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_select_db problem

2002-06-03 Thread Philip Olson
oops, i forgot a for mysql_connect() but oh well, you get the point :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Global vars

2002-06-02 Thread Philip Olson
global $var; does nothing outside of a function. You do not need to use global for this. $foo = 'bar'; include 'something_that_uses_foo.inc'; http://www.php.net/manual/en/language.variables.scope.php regards, Philip Olson On Sun, 2 Jun 2002, Anzak Wolf wrote: I have a question about

Re: [PHP] Smart URLs

2002-06-02 Thread Philip Olson
For tips on doing these things, read this faqt: http://www.faqts.com/knowledge_base/view.phtml/aid/124 Regards, Philip Olson On Sun, 2 Jun 2002, Andrew Brampton wrote: Hey try it, it works when are running the PHP Module in apache. I have a server with proxy.php yet I access it via

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Philip Olson
, tutorials, etc. rely on it on, which makes life interesting in the PHP world today. http://www.php.net/manual/en/security.registerglobals.php There are many predefined variables, such as $_GET, too. http://www.php.net/manual/en/language.variables.predefined.php Regards, Philip Olson

Re: [PHP] value passing from html form to php variable.

2002-06-01 Thread Philip Olson
for a CONSTANT named key first, instead. define ('a','b'); $arr = array('a' = 'apple', 'b' = 'banana'); print $arr[a]; // banana print $arr[a]; // apple print $arr['a']; // apple Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Baffled, line producing error

2002-06-01 Thread Philip Olson
://www.php.net/manual/en/language.types.string.php One thing you can do is escape it: \' regards, Philip Olson On Sun, 2 Jun 2002, Craig Vincent wrote: If the error is a warning about undefined variable, then set a default value for $errmsg before you start adding strings to it. $errmsg

Re: [PHP] Undefined variables

2002-05-31 Thread Philip Olson
On a sidenote (picky), consider making variables all lowercase. Also when printing a single var, no need to surround it with quotes. print $foo. Regards, Philip Olson On Fri, 31 May 2002, Christopher J. Crane wrote: I like this piece of code. In fact, I convert all my scripts that use

Re: [PHP] diplaying the path

2002-05-31 Thread Philip Olson
']; // Works since PHP 4.1.0 print $_SERVER['HTTP_REFERER']; Btw, $GLOBALS['HTTP_REFERER'] === $HTTP_REFERER. And lastly, since PHP 4.2.0 the register_globals directive defaults to off, which is what Jim was indirectly referring to. See also extract(). Regards, Philip Olson * For versions older

Re: [PHP] diplaying the path

2002-05-31 Thread Philip Olson
it was important enough to mention some. Regards, Philip Olson Jim lucas - Original Message - From: Philip Olson [EMAIL PROTECTED] To: Jim lucas [EMAIL PROTECTED] Cc: Kris Vose [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, May 31, 2002 11:03 AM Subject: Re: [PHP] diplaying

Re: [PHP] php3 / php4 vars - Submitted form doesn't work

2002-05-29 Thread Philip Olson
of doing this at runtime here: http://bugs.php.net/bug.php?id=17428 It might help too. Also read: http://www.php.net/manual/language.variables.predefined.php Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Variable Variables

2002-05-29 Thread Philip Olson
, and then some. Note that error_reporting is both a function (runtime) and a php directive. Most PHP users feel that developing with E_ALL is good. Regards, Philip Olson CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POST Format

2002-05-29 Thread Philip Olson
($words) .'hi/a'; Which essentially makes: yep.php?motto=Cheese+is+good More information on what urlencode exactly does and related information (like for htmlentities), see the manual entry: http://www.php.net/urlencode Regards, Philip Olson -- PHP General Mailing List (http://www.php.net

Re: [PHP] 4.2.1 Vars

2002-05-26 Thread Philip Olson
[id] to get the value of one, with them ON, you can just use $id. Just to be clear, $_GET['id'] will work fine with register_globals on or off. In otherwords, these php predefined variables will exist either way. Just like the older non-super ones, such as $HTTP_GET_VARS. Regards, Philip Olson

Re: [PHP] arrays

2002-05-26 Thread Philip Olson
light on this? I hope so :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] listing the files in the directory

2002-05-24 Thread Philip Olson
make $dir a local directory, try for example: $dir = '.'; regards, Philip Olson On Fri, 24 May 2002, _michael wrote: well do you think you can point me in the right direction to listing the files on my site? - is it possible (as i said i am very new to this) thanks -Original

Re: [PHP] HELP!!! QUOTES!

2002-05-24 Thread Philip Olson
Read a tutorial about using strings here: http://www.zend.com/zend/tut/using-strings.php The manual also talks about them: http://www.php.net/manual/en/language.types.string.php Regards, Philip Olson On Fri, 24 May 2002, Shane wrote: Question Please. What is the syntax for getting

Re: [PHP] ini-options

2002-05-23 Thread Philip Olson
if only there were, 'get_magic_quotes_sysbase();' happy birthday ;) function get_magic_quotes_sybase() { if (!ini_get('magic_quotes_sybase')) { return 0; } else { return 1; } } feature requests can be submitted at: http://bugs.php.net/ regards, Philip Olson

Re: [PHP] dynamically named variables?

2002-05-23 Thread Philip Olson
extract($_POST, EXTR_PREFIX_ALL, 'file_'); A little typo, extract() automatically attaches a '_' so the third parameter here would be just 'file'. This behavior is unlike import_request_variables() and I assume the behavior remains for historical reasons. Kinda odd. Regards, Philip

Re: [PHP] the new variables

2002-05-23 Thread Philip Olson
; But it depends, going through predefined variables everytime can be fun too. Regards, Philip Olson On Thu, 23 May 2002, Tyler Longren wrote: Hi, Just to prevent a bunch of non-helpful e-mails, I've already RTMF! Now, to the point. When using the new variables in php 4.2.x, how should I go

Re: [PHP] Problem : track_vars stopped working.

2002-05-22 Thread Philip Olson
in the PHP manual. http://www.php.net/manual/ Regards, Philip Olson On Wed, 22 May 2002, [Windows-1252] Johan Ekström wrote: Okay, mystery to me, when I installed PHP 4.2.1 on Apache 2.0.35, the track_vars function, stopped working. a simple command like, example : file : default.php

RE: [PHP] Problem : track_vars stopped working.

2002-05-22 Thread Philip Olson
not exist a user could pass a get variable $foo through the url ... Just a simple example :) The following post might help clear things up regarding superglobals, variable scope, and register_globals: http://marc.theaimsgroup.com/?l=php-generalm=102036870428992 Regards, Philip Olson

Re: [PHP] How to get contents of symbol table?

2002-05-22 Thread Philip Olson
See: http://www.php.net/get_defined_vars Regards, Philip Olson On Thu, 23 May 2002, William_dw -- Sqlcoders wrote: Hi there!, I'm looking for a way to loop through the symbol table. In other words I want to be able to loop through every variable defined in the local scope. I've

Re: [PHP] Can I delete / update line inside the file ?

2002-05-22 Thread Philip Olson
by \n. Regards, Philip Olson manisha At 04:59 AM 5/23/02 +0300, you wrote: Get a database working! That's definitely worth investing some time in - apart from the obvious speed avdantages, you'd learn a lot. About your question, AFAIK you can only do it by reading from one file

Re: [PHP] mysql_fetch_array errors

2002-05-20 Thread Philip Olson
)) { extract($row); print Hello $foo, I like $bar too\n; } ? Regards, Philip Olson On Sun, 19 May 2002, Justin Latham wrote: I am trying to clone my webserver because I am switching ISPs. So I copied the MySQL database, and then I copied the php pages. But my new server insists

Re: [PHP] help with undefined variables, please

2002-05-14 Thread Philip Olson
of course depends on the situation and the person. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] variable for $_GET or $_POST

2002-05-14 Thread Philip Olson
see also: $_REQUEST, extract() and/or import_request_variables() Regards, Philip Olson On 14 May 2002, Jeff Bearer wrote: Quick question if I'm programming with register globals off, and want to get a variable that is allowed to be set with either a GET or POST method, is there 1 variable

Re: [PHP] Accessing Variables by Name

2002-05-14 Thread Philip Olson
These are called variable variables, and can be read about here: http://uk.php.net/manual/en/language.variables.variable.php Replace your [ ] with { } and you'll be good to go. Regards, Philip Olson On Tue, 14 May 2002, Steven Walker wrote: Hi, I couldn't find

Re: [PHP] PHP 4.2x changes

2002-05-14 Thread Philip Olson
On Tue, 14 May 2002, Rasmus Lerdorf wrote: Turn on register_globals in your php.ini file and things should start working again. That reply was way too short and easy ;) On Tue, 14 May 2002, Weston Houghton wrote: All, I've recently upgraded from 4.1.2 to 4.2.0. And of course my

Re: [PHP] Problem with the double quotes

2002-05-13 Thread Philip Olson
Please read the following: Using Strings in PHP http://www.zend.com/zend/tut/using-strings.php Strings http://www.php.net/manual/en/language.types.string.php Notice stripslashes(), addslashes(), the PHP directive magic_quotes_gpc and the use of ' vs . Regards, Philip Olson On Tue

Re: [PHP] Problem with new variable system in 4.2

2002-05-12 Thread Philip Olson
to the script. And print_r() will also be helpful for various activities too. Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How can obtain referer's name?

2002-05-12 Thread Philip Olson
://www.php.net/manual/en/language.variables.predefined.php Regards, Philip Olson -Original Message- From: Alex Shi [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 10:48 AM To: [EMAIL PROTECTED] Subject: [PHP] How can obtain referer's name? Hi! I want to know how can a script

RE: [PHP] Alternating table rows...

2002-05-10 Thread Philip Olson
]; } The first used , which is a bitwise operator. See also the following faqt: How can I show rows from a database in a table with alternating colors? http://www.faqts.com/knowledge_base/view.phtml/aid/783 Regards, Philip Olson On Fri, 10 May 2002, Miguel Cruz wrote: While everyone's

Re: [PHP] Grabbing ALL $_POST var at once.

2002-05-06 Thread Philip Olson
['bar'], EXTR_PREFIX_ALL, 'bar'); print I say $bar_name and $bar_doh; extract() is a pretty cool function with many options, read about extract here: http://www.php.net/extract And as already stated by others, import_request_variables() and $_REQUEST exist too. Regards, Philip Olson On Mon

Re: [PHP] Register Globals workarounds

2002-05-05 Thread Philip Olson
=php-generalm=101803683730027 Re: tutorial on global variables http://marc.theaimsgroup.com/?l=php-generalm=102036870428992 Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date(), strtotime(), Wed, Dec 31, 1969 ??

2002-05-03 Thread Philip Olson
versions of PHP it does try to do something but not sure exactly what ... yet. I'm assuming it returns -1 for you, in PHP3. Regards, Philip Olson On Fri, 3 May 2002, ROBERT MCPEAK wrote: Running PHP3 on a Linux box and I've got trouble with date(). Here's the code: $blah=2002-05-02

Re: [PHP] Hashes in strings

2002-05-02 Thread Philip Olson
) $str = Hello {$there['friend']}, how are you?; // Concatenation is always a possability $str = 'Hello ' . $there['friend'] . ', how are you?'; Related resources: http://www.php.net/en/language.types.string.php http://www.zend.com/zend/tut/using-strings.php Regards, Philip Olson

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread Philip Olson
just created $REMOTE_ADDR because register_globals is off'; print \nREMOTE_ADDR: $REMOTE_ADDR; } else { print 'register_globals is on so $DOCUMENT_ROOT et al already exists'; print \nDOCUMENT_ROOT: $DOCUMENT_ROOT; } Phew, hope that helps :) Regards, Philip Olson -- PHP General

Re: [PHP] Re: case-insensitive str_replace

2002-05-02 Thread Philip Olson
This is a feature request, see: stri_replace() to compliment str_replace() : http://bugs.php.net/bug.php?id=5919 Regards, Philip Olson On Thu, 2 May 2002, CC Zona wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Reuben D Budiardja

Re: [PHP] PHP 4.2.0 and $argc/$argv

2002-05-02 Thread Philip Olson
See the register_globals directive. If it is on, $argv will be created. Otherwise it will not. And as we all now know, PHP 4.2.0 defaults register_globals = off. Consider using $_SERVER['argv'] instead. regards, Philip Olson On Fri, 3 May 2002, Andre wrote: Is there something

Re: [PHP] Help need (Urgent)

2002-05-01 Thread Philip Olson
() before sending it through the url, or any string for that matter. See: http://www.php.net/urlencode Regards, Philip Olson On Wed, 1 May 2002, Luiz Rafael Culik Guimaraes wrote: Dear Friends I have an form that get the user info , and i need to send an email to the user . which

Re: [PHP] New to PHP - Undefined variable: ??????

2002-05-01 Thread Philip Olson
mentioning that one can control error levels both at runtime (error_reporting()) as well as in php.ini (.htaccess, etc). Regards, Philip Olson On Tue, 30 Apr 2002, TGL wrote: I'm new to PHP and can't get through my first script. I want to create a form that will allow the user to attach a file. I

Re: Tr: [PHP] New to PHP - Undefined variable: ??????

2002-05-01 Thread Philip Olson
Some things to consider: a) please read my first post :) (re: isset/empty/error_reporting) b) $FILE != $File != $file (case sensitive) regards, Philip Olson On Thu, 2 May 2002, nico_free wrote: - Original Message - From: nico_free [EMAIL PROTECTED] To: TGL [EMAIL PROTECTED

Re: [PHP] Re: getting a function name of the calling function

2002-05-01 Thread Philip Olson
/predefined constants. Regards, Philip Olson p.s. Controversy surrounds these magic constants, are they *really* constants? Inquiring minds want to know. :) http://www.php.net/constants -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Re: file() and macintosh line break

2002-05-01 Thread Philip Olson
Here's a bug report: file() - incorrect behavior (line endings ignored) on files with Mac EOLN (CR) http://bugs.php.net/bug.php?id=16521 Maybe some kind soul will fix this before PHP 4.3.0 :) http://cvs.php.net Regards, Philip Olson On Thu, 2 May 2002, eat pasta

Re: [PHP] apps that need register globals 'on' and others require'off' on same server

2002-04-30 Thread Philip Olson
: import_request_variables() and extract(). Regards, Philip Olson On 30 Apr 2002, Jeff Bearer wrote: I have a server where I'm running some third party apps. until now I've had register globals 'on', now I have a new app that requires register globals 'off' for it to work, if I change

RE: [PHP] Apache: SERVER_NAME gone?

2002-04-27 Thread Philip Olson
because $SERVER_NAME is created IF the php directive register_globals = on. this setting is off by default as of PHP 4.2.0. all server predefined variables behave this way, such as $PHP_SELF, etc. regards, philip On Sat, 27 Apr 2002, John Holmes wrote: Use $_SERVER[SERVER_NAME]

RE: [PHP] POST/GET is not working for PHP 4.2.0 on W2K AdvancedServer

2002-04-27 Thread Philip Olson
also consider extract or import_request_variables as they can be useful too. regards, philip olson On Sat, 27 Apr 2002, John Holmes wrote: Register_globals is off by default and you have to use the $_GET and $_POST arrays for your data. ---John Holmes... -Original Message

RE: [PHP] simplify if/then statement

2002-04-27 Thread Philip Olson
, if so, include it else houston we have a problem Regards, Philip Olson On Sat, 27 Apr 2002, Stuart Dallas wrote: $incfilename = Calc.$state..class.inc; if (file_exists($incfilename)) include($incfilename); else echo Please select a State.br\n; -- Stuart

Re: [PHP] Apache: SERVER_NAME gone?

2002-04-27 Thread Philip Olson
of these will always be available (nobody uses 4.0.2- anymore right? Phew, no need to bring up track_vars then :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Opening manual - .bz2

2002-04-26 Thread Philip Olson
Hmm, I swore this was changed back to .tar.gz :) Anyway, read this faq: http://www.php.net/manual/en/faq.misc.php#faq.misc.bz2 Regards, Philip Olson On Sat, 27 Apr 2002, r wrote: Greetings all, Special greetings to: one brainy dude - Steve, and a REALLLY persistive dude-Michael

RE: [PHP] Variables not working

2002-04-26 Thread Philip Olson
/language.variables.predefined.php Also consider extract and import_request_variables, I posted a bit about them awhile back here: http://marc.theaimsgroup.com/?l=php-generalm=101803683730027 And when in doubt, send your script to a call of phpinfo() and it'll provide a ton of useful information. Regards, Philip

Re: [PHP] how to make array_search start from 0?

2002-04-25 Thread Philip Olson
== false. == !=, === !==. So, 0 !== false. Wow that sounds confusing. :) Also consider the sexy array_keys() function. Regards, Philip Olson p.s. http://uk.php.net/manual/en/language.operators.comparison.php p.s.s. also take into account extra whitespace (trim), and potential issues

RE: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Philip Olson
To stop receiving the messages from undefined variables add this at top of your files: error_reporting(55); Or better yet, keep as you're doing and develop with E_ALL and fix those E_NOTICE errors correctly! ;) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net

Re: [PHP] Form validation

2002-04-25 Thread Philip Olson
Here are a couple resources to help your cause: http://uk.php.net/strip_tags And to get ideas on how to validate forms intelligently: http://www.zend.com/zend/spotlight/form-pro-php4.php Regards, Philip Olson On Thu, 25 Apr 2002, Tarjei Huse wrote: Hi, I need a function

Re: [PHP] replacing first occurence

2002-04-24 Thread Philip Olson
) { $str{$pos} = '!'; } print $str;// Hello! I love you!'; print $pos;// 5 print $str{0}; // H print $str{5}; // ! Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] passing array as hidden field

2002-04-24 Thread Philip Olson
consider using urlencode() in addition to one of the above methods. Anyway: $arr1 = explode('|', $vars1); $arr2 = unserialize($vars2); Ah yes, our arrays are back :) Regards, Philip Olson On Wed, 24 Apr 2002, Pushkar Pradhan wrote: I want to pass a 1 dim. array through a form, I use

Re: [PHP] Number checker

2002-04-18 Thread Philip Olson
use is_numeric() http://uk.php.net/is_numeric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: globals in functions

2002-04-14 Thread Philip Olson
Is there an easier way than having to manually place global in each function...?? It's not that hard :) Other than passing by parameter? Like is it possible to actually declare var's in PHP as global? No. Consider arrays, constants, extract(), etc. Regards, Philip -- PHP

Re: [PHP] using new AUTOGLOBALS

2002-04-05 Thread Philip Olson
ideas, have fun! Regards, Philip Olson p.s. Use a mirror http://uk.php.net/mirrors.php On Fri, 5 Apr 2002, Miguel Cruz wrote: On Fri, 5 Apr 2002, cyberskydive wrote: So I wanna learn how to code properly with register_globals off, I reead on PHP.net about the new auto globals and inmy new

Re: [PHP] Emulation: $var = print_r($array)

2002-04-04 Thread Philip Olson
Is there a way to emulate var_dump(), print_r() so I can write it to a file and when I open this file the information are shown like if I really did a print_r();? ob_start(); print_r($doo); $dah = ob_get_contents(); ob_end_clean(); echo $dah; and just

Re: [PHP] checkbox doesn't pass?

2002-04-04 Thread Philip Olson
Unchecked checkboxes pass no values, that's how it works. It's either set or not. Default value for a checkbox is 'on' although you can change that. isset() will work fine. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] New to PHP Need Help

2002-04-04 Thread Philip Olson
being a column name // selected via the query print $row['name']; And lastly, if you're not going to use all the data, don't SELECT * of it. Good start, keep it going :) Regards, Philip Olson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] PHP FAQ (again)

2002-04-03 Thread Philip Olson
idea too. The PHP manual and website are live entities always looking for ways to improve. Regards, Philip Olson p.s. http://www.google.com/ is your friend. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   6   >