Re: [PHP] Switch statement || How to output html without using echo()or print()

2003-01-25 Thread Leif K-Brooks
No. You can either echo/print with a heredoc (which is still echoing/printing, but is a lot easier) or you can exit PHP. For example: switch($somevar){ case 'case1': print <<< END some html some html some html END; break; case 'case2': print <<< END some html some html some html END; break; } ?

Re: [PHP] CRON?

2003-01-25 Thread Leif K-Brooks
The problem is, PHP would have to be running as root. This creates a huge security risk... if I was you, I'd just learn to edit cron jobs at the command line. Nicole wrote: Does anyone have a PHP script to enter cron jobs? I have a limited control panel (ensim) that doesn't have anyway to do c

Re: [PHP] __LINE__,__FILE__ + custom error handlers

2003-01-26 Thread Jason k Larson
, Jason k Larson electroteque wrote: hi guys i am trying to create callback error functions handlers , i was wondering if there was a way to get the file and line caught in a error function say with a database abstraction query without having to explicitly put the line and number in the query function

Re: [PHP] Found a PHP bug!!!!!!!!!

2003-01-27 Thread Leif K-Brooks
No, it's floatval. Doubleval is an alias left over from hwen floats were called doubles... Scott Fletcher wrote: Whoop! FOund it, it is doubleval()... What does settype() do exactly "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I

Re: [PHP] Found a PHP bug!!!!!!!!!

2003-01-27 Thread Leif K-Brooks
uble and Float are not exactly the same thing. Double is ---> 11.123 Float is --> .00238823993 "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... No, it's floatval. Doubleval is an alias left over from

Re: [PHP] Session Variables

2003-01-27 Thread Leif K-Brooks
$HTTP_SESSION_VARS and $_SESSION don't magically update when you add a session variable with session_register(). Jed R. Brubaker wrote: I have a quirky problem that should be a breeze for someone who is smarter than I. I have a script where I am registering a HTML form post variable as a sessio

Re: [PHP] printing

2003-01-28 Thread Leif K-Brooks
Yes. You'd better hope your server has a printer, though! :-) Seriousley though, PHP runs on the server. By the time the viewer sees it, it's already executed. Which means it can't do anything to the client's machine. Look into some client-side scripting. Shaun van den Berg wrote: Hey,

Re: [PHP] Form Variables not getting passed || Apache, MySql, Win2k Setup

2003-01-29 Thread Leif K-Brooks
RTFM! Your problem is register_globals. CF High wrote: Hey all. This driving me nuts: I've got Apache, MySql, and Windows 2000 running on my local machine. In order to get passed php variables evaluated, whether via a url query string, or through a form post, I have to use this syntax: $_

Re: [PHP] Form Variables not getting passed || Apache, MySql, Win2k Setup

2003-01-29 Thread Leif K-Brooks
: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "CF High" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 1:38 PM Subject: Re: [PHP] Form Variables not getting passed || Apache, MySql, Win 2k Setup RTFM! Your problem is register_globals

Re: [PHP] Knowing what page u came from...

2003-02-03 Thread Leif K-Brooks
$_SERVER['HTTP_REFERER'] Mr. BuNgL3 wrote: Hi again... There is any way to know what page we came from in php? I want to make a clause if i came from certain page in my web site... Thanks -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt i

[PHP] Variable objects?

2003-02-04 Thread Leif K-Brooks
I'm planning to use variable objects in a new project I'm working on. The problem is, I can't find one page of documentation on them, so I can't be sure if I'm going to be using an accidential feature that will disappear. As an example of them working, the following outputs "In a_class.": cla

[PHP] Getting key of value added to array with []?

2003-02-04 Thread Leif K-Brooks
Is there any way to get the key of an element added to an array with []? I need to use this for a reference to it. The only idea I can think of is to foreach through the array and use the last key looped through, but that seems very dirty. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] php problem

2003-02-04 Thread Jason k Larson
#x27;surname']; $email=$row['email']; $comments=$row['comments']; HTH, Jason k Larson Aaron Downes wrote: Dear Sir/Madam, trying to displaying records by php get error : Parse error: parse error in /hsphere/local/home/ozhomene/ardownes.com/ViewConta

Re: [PHP] Sessions and Cookies

2003-02-04 Thread Leif K-Brooks
acleave wrote: My Questions: If I create a cookie with set_cookie how do I read it/check it? $_COOKIE superglobal array. How do I use sessions if they can't be sent in the code? The session_start function has to be at the VERY top of the of the code, below ANY output (even blank spaces

Re: [PHP] Creating associative array

2003-02-05 Thread Leif K-Brooks
Try: $image_array = array(); $image_array[$file_name] = $image_url; PHP wrote: I am trying to create associative array in a while loop.. $image_array = array(); $image_array = array_push("$file_name"=>"$image_url"); what i am doing wrong?? -- The above message is encrypted with dou

Re: [PHP] Redirecting errors

2003-02-05 Thread Leif K-Brooks
Because apache has the same access when a user requests it as when a page requests it. Try putting it outside of the web root... Brad Esclavon wrote: I have written a script that validates a username/pwd input and if usr/pwd is correct, includes the protected page, or if usr/pwd is wrong, inpu

Re: [PHP] testing for negative numbers

2003-02-06 Thread Leif K-Brooks
Is it possible that the value is actually " -2" (with the space)? Robert Samuel White wrote: Well, I just tried your test script and that works just as it should, so I must be having some other issue. But that still doesn't explain why I can print out the results of $row["dir_id"] and it show

[PHP] Scripting language in PHP?

2003-02-06 Thread Leif K-Brooks
Out of pure boredom, I'm considering writing a simple scripting language in PHP. Has anything like this been done before? Any open-source projects I should look at? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the f

Re: [PHP] stripping %20 and other characters from query string

2003-02-06 Thread Jason k Larson
Try these: http://www.php.net/manual/en/function.urldecode.php http://www.php.net/manual/en/function.rawurldecode.php HTH, Jason k Larson Sarah Gray wrote: Hello, Forgive me if this is an obvious question, but I am passing a value (a string with spaces and quotations) back in a query string

[PHP] Re: [PHP-DB] Passing ARRAY through URL

2003-02-07 Thread Leif K-Brooks
Servers usually have limits on the get method (usually 500 characters IIRC), and some browsers may as well. I reccomend you look into using the post method through javascript. Squirrel User wrote: Help. I've tried to pass large array through URL but it keep telling me page can not be display

Re: [PHP] Why does this happen?

2003-02-08 Thread Jason k Larson
Because all of your field names are overwriting each other until the last one wins. name="date" This needs to be different for each field so PHP can assign that name as the variable. HTH, Jason k Larson CF High wrote: Hey all. Got a problem with I'm sure a simple solution:

Re: [PHP] Beginners question

2003-02-09 Thread Leif K-Brooks
My guess is that the new lines are there, but since you're (most likely) outputting HTML, you don't see them. Take at look at the br HTML tag. Martin Purdy wrote: >Hi everybody > >I am totally new to PHP, and I have a problem with the Print statement. >When I send a newline using "\n" nothing ha

Re: SV: [PHP] Beginners question

2003-02-09 Thread Leif K-Brooks
rtin Purdy -Oprindelig meddelelse- Fra: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sendt: 9. februar 2003 19:18 Til: Martin Purdy Cc: [EMAIL PROTECTED] Emne: Re: [PHP] Beginners question My guess is that the new lines are there, but since you're (most likely) outputting HTML, you don'

Re: [PHP] SESSION variable and register_globals

2003-02-10 Thread Leif K-Brooks
1. Yes. 2. No. Mohanaraj wrote: Hello guys, I have a few questions regarding the subject and was hoping you could help me out. 1.If register_globals is on, then doing an unset($_SESSION["blah"]), to unset a session variable will not work as the variable will be unset in that particular inst

Re: [PHP] Global Vars = Off Windows/Linux Differeces???

2003-02-10 Thread Leif K-Brooks
Pretty hard to tell anything without any details about what you're doing... Sascha Braun wrote: Hi, I've made a website and because of presentationproblems I changed the oldstyle vars to the new globalvars mode (Hope its the right name for it, dont know if $_SESSION['user'] is a global or it is

Re: [PHP] Delimited file values behaving strangely...

2003-02-10 Thread Leif K-Brooks
I'm guessing it containt a trailing space, which wouldn't display in HTML. Try trim()ing it. Geoff Caplan wrote: Hi folks, A strange one - unless I am having a brainstorm... I am reading in tab delimited files created in Excel on Windows and uploaded to Linux. Cell A1 contains a numeric id -

[PHP] sockets: resource(20) of type (Unknown)

2003-02-10 Thread Jason k Larson
ave made recent upgrades and changed environments. However the code consistently dies in the exact place, a place where other fsocket reads and writes are successfully been made. Any suggestions would be appreciated. Regards, Jason k Larson -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] Class within a class

2003-02-10 Thread Leif K-Brooks
Use $GLOBALS['db'] (or whatever the variable name of the global variable is). Justin Mazzi wrote: I have made a Mysql database class. I wanted to know how I could use that class in another class without using extend. For example: include 'db.php'; $db = new db(); ...some php code... class bl

Re: [PHP] Class within a class

2003-02-10 Thread Leif K-Brooks
If the DB object is already a global, like you seem to be saying, then you're already using globals... Justin Mazzi wrote: Is there anyway to do this without using globals? -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sent: Monday, February 10, 2003 2:46

Re: [PHP] passing array as a form variable

2003-02-11 Thread Leif K-Brooks
www.php.net/serialize www.php.net/unserialize Edward Peloke wrote: Can I take the select array Ex. $myrow=mysql_fetch_array($result); and pass this as a form variable to another page? Thanks, Eddie -- The above message is encrypted with double rot13 encoding. Any unauthorized attemp

[PHP] Print_r bug?

2003-02-12 Thread Leif K-Brooks
I think I've found a print_r bug with reference recursion. The following example script runs forever: $GLOBALS['foo'] = &$GLOBALS; print_r($GLOBALS); ?> Am I correct in thinking this is a bug that should be reported? -- The above message is encrypted with double rot13 encoding. Any unauthori

Re: [PHP] Print_r bug?

2003-02-12 Thread Leif K-Brooks
uary 2003 16:53, Leif K-Brooks wrote: I think I've found a print_r bug with reference recursion. The following example script runs forever: $GLOBALS['foo'] = &$GLOBALS; print_r($GLOBALS); ?> Am I correct in thinking this is a bug that should be reported? No, thats

Re: [PHP] string to array

2003-02-12 Thread Leif K-Brooks
There's no built-in function, but try this (copied from manual): $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); Kevin Waterson wrote: >What is the best method to convert a string to an array > >I need to able to loop through each letter of the string >not just use $string[47] > >Is t

[PHP] Parsing CSV with parameters?

2003-02-13 Thread Leif K-Brooks
I'm trying to parse CSV data with parameters, i.e. foo(something),bar(something),something(foobar). Any suggestions on doing this, hopefully with some way to escape )s in the parameters? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will b

Re: [PHP] Parsing CSV with parameters?

2003-02-13 Thread Leif K-Brooks
o get each parameter, and each value, and put them into arrays. I also need to have a way to escape any )s in the parameter. Marek Kilimajer wrote: fgetcsv() - for reading the file str_replace('(', '\(', $string) - for escaping )s Leif K-Brooks wrote: I'm trying to

Re: [PHP] mail question

2003-02-13 Thread Leif K-Brooks
Try: mail('[EMAIL PROTECTED]','subject','hello '.($a ? 'andreas')); Jonas Geiregat wrote: is it possible to do something like mail("[EMAIL PROTECTED]","subject","hello if($a){ return andreas; }"); or what would be the best solution for this ? -- The above message is encrypted with double

Re: [PHP] problems with cookies and PHP

2003-02-13 Thread Leif K-Brooks
oes not change the cookie file itself. what must I do to accomplish that? - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Fireborn Silvaranth" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 9:41 AM Subject: Re: [PHP] problems

Re: [PHP] Removing a comma from a form field

2003-02-13 Thread Leif K-Brooks
If the comma is all you have to worry about, you don't need regex. Use www.php.et/str-replace. Ben C. wrote: I'm trying to update a field which contains a $USD figure. But when I update it as 200,000 it become 200. I need to take out the comma. Is using ereg_replace function the best way of

Re: [PHP] sososoosos!!!!

2003-02-13 Thread Leif K-Brooks
Do you know how many internet etiquette rules you're breaking by typing in all caps like that? Well you're breaking one. Don't type in all caps. --Strong Bad Anyway, download the .zip from http://www.php.net/downloads.php and read the installation instructions included with it. Luis A wrote:

[PHP] What's the scoop on PHP 5?

2003-02-13 Thread Leif K-Brooks
Anyone know what the status of PHP 5 is? I can't find reference of it on php.net, and the only place I can find an alpha of it is at the PHP Museum. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the

Re: [PHP] Add a record and recover it's ID in one operation

2003-02-13 Thread Leif K-Brooks
www.php.net/mysql-insert-id Daniel Page wrote: Hi, Imagine a table with an auto-increment id number field and a text field for the username. User B (with user name 'johnny') could write to the database a millisecond after user A, with the same username. When user A looks for the last record wri

Re: [PHP] How does PHP transforms an integer on a string? like "3"onto "three"

2003-02-14 Thread Leif K-Brooks
It transforms 78 into "78". Francisco wrote: Does PHP transforms an integer on a string? Like: "78" onto "seventy eight" How does it do it? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the l

Re: [PHP] Disabled INPUT-Tags?!

2003-02-15 Thread Leif K-Brooks
This is an HTML question, not a PHP question, but try adding a hidden field next to the disabled one. menphrad wrote: Hi! I created a form that handles dates, e.g. a DATE_START and a DATE_END. The "DATE_START" is filled out automagically by a PHP-function and the field should be *disabled*: $j

Re: [PHP] need apostrophe solution

2003-02-15 Thread Leif K-Brooks
Magic_quotes has already done (or not done) its job by the time your script runs. Doug Parker wrote: OK - thanks. I saw that the magic_quotes_gpc is turned off by default, so I did a ini_set(magic_quotes_gpc, 1) to turn it on temporarily. I ran a get_magic_quotes_gpc() and saw that the ini_s

Re: [PHP] PHP not running/parsin MySQL query

2003-02-15 Thread Leif K-Brooks
You need to do something with the result set. www.php.net/mysql-fetch-array Guru Geek wrote: Hello, I've been having extensive email conversations with people over at MySQL.com's email list. From what I'm able to prove using myphpadmin, my problem is not with the query, but with how PHP handle

Re: [PHP] need apostrophe solution

2003-02-15 Thread Leif K-Brooks
Correct, or you can use a .htaccess file if you're on apache. Doug Parker wrote: So you're saying that I have to turn on magic_quotes_gpc in php.ini in order for it to work? the ini_set won't work? Leif K-Brooks wrote: Magic_quotes has already done (or not done) its job b

Re: [PHP] Problem creating array from MySql query

2003-02-17 Thread Leif K-Brooks
I believe I've spotted your problem: for ($i=0; i <$count;$i++) { You left the $ out. It's looking for a constant named i, which doesn't exist. Janyne Kizer wrote: I'm not sure. It sits and spins. If I go to view -> source that doesn't yield any additional information. We are trying

Re: [PHP] MD5 Passwords (How it works?)

2003-02-17 Thread Leif K-Brooks
No, it's not reversable. When a user loses their password, you must generate a new one. To stop malicious users from requesting a new password for a user they dislike with a program (and stopping the user from logging in, since their password keeps changing), a link with a random code is sent

Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread Jason k Larson
file to determine if the PHPv4.2.3 install overwrote the older one successfully or not. If you still have problems, then you might need to check the path you are giving to the --with-apxs for compiling PHP. HTH, Jason k Larson PathFinder Software wrote: Hi, I upgraded PHP from 4.0.3pl1 to ph

Re: [PHP] Wrong version displayed after upgrading to php-4.2.3

2003-02-18 Thread Jason k Larson
use: --with-mysql=/usr/lib/mysql HTH, Jason k Larson PathFinder Software wrote: Hi, During the configure I get this error message. configure: error: Cannot find header files under /var/lib/mysql a whereis mysql produce the following output: mysql: /usr/bin/mysql /usr/lib/mysql /usr/include

Re: [PHP] syntax question

2003-02-19 Thread Jason k Larson
as you shown. Hope that helps ... Jason k Larson Anthony Ritter wrote: This is what I was getting at. The following is correct mysql syntax in which a comma must be added after each field - except for the last field - in this case price: i.e., . CREATE TABLE chairs( id int(5

Re: [PHP] simple ereg question

2003-02-20 Thread Leif K-Brooks
Change to:No, the double quotes are needed so that $i will be parsed. The problem is the single quotes around $_POST["gamt_$i"]. if (ereg('[0-9]+',$_POST["gamt_$i"]) Greg Donald wrote: On Thu, 20 Feb 2003, Robert E. Harvey, M.D. wrote: I'd like to verify input data transferred from a form

Re: [PHP] end of the loop.

2003-02-20 Thread Leif K-Brooks
If the list is an array, try implode()ing it. Didier McGillis wrote: I have a question. I need to setup something so it goes through a dynamic list, the length of the list changes, gets the contents of the list and seperate each element with a ^ (carot), except for the last one. So it looks

Re: [PHP] string manipulation

2003-02-20 Thread Leif K-Brooks
Try this (untested): print preg_replace('|<[^<]*$|','$1',$text); Gregory Heinrichs wrote: little help please, looking for correct functions to use to search for the last occurrence of a character in a string and truncate everything in front of it including the searched for character.< --

Re: [PHP] Re: Mysql DB connect failure

2003-02-21 Thread Jason k Larson
hp If the track_errors feature is enabled, any error message generated by the expression will be saved in the global variable $php_errormsg. This variable will be overwritten on each error, so check early if you want to use it. Hope that clears things up a bit. Regards, Jason k Larson Hans Prins

Re: [PHP] session emergency

2003-02-21 Thread Jason k Larson
Sessions have a list of options that can be set, but I don't see anything remotely similar to a 'data size'. What error are you getting, or please explain further in more detail. Regards, Jason k Larson Joseph Bannon wrote: Where can I set the session

Re: [PHP] upgrade to 4.3.0 nearly doubled execution time

2003-02-22 Thread Jason k Larson
I've read up on and hasn't addressed any of these issues). Regards, Jason k Larson Rhett Livingston wrote: I upgraded my development system from PHP 4.1.2 to PHP 4.3.0 last week and the performance of my scripts took a dive. Specifically, the average time to parse my scripts (time from

Re: [PHP] Is it possible to "Include" a php source file ?

2003-02-23 Thread Leif K-Brooks
A quick manual search would have told you. www.php.net/include Rohin Gosling wrote: First up, I sent this same message a few hours ago, but I do not see it in the news group, and neither does it appear in my sent messages folder. Therefore I am presuming that it never made it to the news group.

Re: [PHP] Re: Variables not being received from form

2003-02-23 Thread Leif K-Brooks
Please, please, PLEASE don't correct code that isn't wrong with code that is! Read http://www.php.net/manual/en/language.types.array.php. To answer the original question, the $HTTP_POST_VARS variable is out of scope in your function. Either use $_POST superglobal array if you're using 4.1.0 o

Re: [PHP] and

2003-02-23 Thread Leif K-Brooks
This has nothing to do with PHP, but a button is used to submit a form. You'll have to create a form with its action set to the page to direct to. Sunfire wrote: hi.. i have a button on a web page that is supposted to go to another web page when either clicked with a mouse or when someone press

Re: [PHP] What is wrong with this?

2003-02-24 Thread Leif K-Brooks
www.php.net/htmlentities Michael Cook wrote: Chris Hayes <[EMAIL PROTECTED]> writes: Put some quotes around the tag value for just in case the $aviao has a space in it: $drop_down_list .= "$aviao"; what about if $aviao contains a double quote? what's the proper way to handle

Re: [PHP] Keep cariage returns

2003-02-24 Thread Jason k Larson
carriage returns in a text field (textarea) are different than how HTML formats data to be displayed. Look into the nl2br() function. http://www.php.net/manual/en/function.nl2br.php HTH, Jason k Larson Daniel Guerrier wrote: Is it possible to maintain the carriage returns in a database insert

Re: [PHP] and

2003-02-24 Thread Leif K-Brooks
Why not just use a form with nothing but a button? Sunfire wrote: i do have something about the fact that this web site is "user friendly" or not.. and so does the other person that i work with. we tried to tell him that a link would look just fine there and everybody could use it even with ve

Re: [PHP] line number

2003-02-25 Thread Leif K-Brooks
Use the __LINE__ "magic constant". Chandler, Jacob R wrote: What function can I use to find out the current line number? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Ma

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Jason k Larson
$name1 = 'Hello, World!'; $i = 1; $var = 'name'.$i; print ${$var}; HTH, Jason k Larson Jeff Pauls wrote: Hi, I've been playing with this for a while now. Say I had the following variables: $name1 = "joe"; $name2 = "janis"; $name3 = "joanne"; I

Re: [PHP] Re: MIME help needed please...

2003-02-25 Thread Jason k Larson
e to wonder if you are asking the list stupid questions. -- Jason k Larson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Leif K-Brooks
Should be: ${name$i} Jeff Pauls wrote: I get an error with this. PHP doesn't like "$name$i". for ($i = 1; $i <= 3; $i++) { $arr_name[$i] = $name$i; // I want $name1,$name2,$name3 etc } I've looked at Variable variables but I don't think that is what I need. What about if I wanted

[PHP] Re: [PHP-DB] SESSIONS

2003-02-26 Thread Leif K-Brooks
Not $_POST[SUBMIT]. It should be $_POST['SUBMIT']. mike karthauser wrote: on 26/2/03 12:58 pm, MaN at [EMAIL PROTECTED] wrote: And also use $_POST[SUBMIT] or set register_globals On Just use $_POST[SUBMIT] register_globals was turned off for security reasons. You are compromising the s

Re: [PHP] Mail (), BBC: recipients not receiving my Newsletter

2003-02-26 Thread Jason k Larson
What about using a ';' semicolon seperated list. Ricardo Fitzgerald wrote: Hi to all, I wrote a small form which dumps data to a php script that uses mail () to send an html newsletter, so far is working except that it's not sending to BCC: headers, in my form I have a field to enter a comma deli

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
The 'magic constant' __FILE__ is one way. or even better: HTH, Jason k Larson Stephen Ford wrote: How can I display the script file name? Presumably something like-: While I'm learning php and developing various Web page versions, I want to be sure the that the disp

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
. is a string concatenation operator. ' or " are strings. Read http://www.php.net/manual/en/language.operators.string.php By the way, __LINE__ is available in addition to __FILE__. Hope that helps, Jason k Larson Stephen Ford wrote: Partial success. The code and output are shown be

Re: [PHP] When is garbage collection initiated?

2003-02-27 Thread Jason k Larson
My understanding is: - each time a request causes a *session file to be created or accessed*. -- Jason k Larson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
e complex ways too and, of course, the use of ()s ... but I think I've made my point. HTH, Jason k Larson M.A.Bond wrote: With the output you are getting you will not see the output from the .' '. As it inserts a space into the ouputted text. There is an error after the $_SERVER[

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Jason k Larson
trouble. I'd like to see that. That is, unless it's not a PHP behavior problem, but a scripting or logic issue due to poor development. -- Jason k Larson Leif K-Brooks wrote: I think you mean worse. Short tags cause nothing but trouble. Jason k Larson wrote: or even better: -- P

Re: [PHP] How do I display the script file name?

2003-02-27 Thread Leif K-Brooks
The Jason k Larson wrote: > I disagree. While I tend to stay away from short tags in general, the > use of the short echo tag has yet to cause any trouble for me. And it > makes code exceptionally easier to read, which proves to be a > valueable asset. Maybe you could provide

Re: [PHP] Restate: using php to rotate ad banners

2003-02-27 Thread Jason k Larson
mance even better. It's always nice to write your own stuff to learn, but seriously, if you are planning to do anything that other people need to rely on for a banner management system and server, use phpAdsNew. You can find it on SourceForge. Regards, Jason k Larson Joseph Bannon wrote: An

[PHP] Dynamic XUL?

2003-02-27 Thread Leif K-Brooks
I'm considering making a dynamic application for Mozilla/Netscape using PHP and XUL. Has anyone here done this? Anything I should be aware of? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] output buffering

2003-02-27 Thread Leif K-Brooks
You can't display an image like that in HTML. You need to make a second PHP script that displays just the image, and call it with a tag. Kevin Waterson wrote: >I am having some problems with ob_* > >My goals is basically this > >Stuff goes here > >More stuff here > >The code below works until th

Re: [PHP] Help with getting php going!

2003-02-27 Thread Leif K-Brooks
Please don't send MS Word content in your email.  It crashed Mozilla before I was able to reply. Karl James wrote: Hey guys I finally got my phpinfo file to show on apache server But when I try to do a hello world or browser check I g

Re: [PHP] Passing url?variables

2003-02-27 Thread Leif K-Brooks
http://www.php.net/manual/en/security.registerglobals.php Mike wrote: Hi, I'm running Apache 2.0 and PHP 4.2.2 on a RedHat 8.0 Machine. I'm unable to pass variables through a URL like index.php?test=something. Can anyone help here? I've looked through both my httpd.conf and php.ini files and did

Re: [PHP] testing for < 0

2003-02-28 Thread Leif K-Brooks
Try $timeb <> ''. Steve Buehler wrote: I have a form that has input for minutes. My problem is that I am trying to test to see if the field is blank or not and if they enter a "0" (zero), my test always show it as blank. I have tried !$timemb and !is_numeric($timemb). Thank You Steve -- Th

Re: [PHP] I can't find a file in the new php...

2003-02-28 Thread Leif K-Brooks
Exactly what did you download? Is it possible you downloaded a source distribution? Meteo wrote: This was not a problem with the previous version of php, but when I downloaded the new version, and when I tried to install is on my web server that I have on my computer, I can't seem to find the p

Re: [PHP] IS there a way.

2003-02-28 Thread Leif K-Brooks
Try using exec() or backticks. Philip J. Newman wrote: Is there a way to PING a URL and check if it returns a valid code like 200 ... ?? -- Philip J. Newman. Head Developer [EMAIL PROTECTED] +64 (9) 576 9491 +64 021-048-3999 -- Friends are like stars You can't allways see them, but they

Re: [PHP] PHP scripts and the GPL/other licenses

2003-03-01 Thread Leif K-Brooks
They're doing nothing wrong as long as they distribute the source under the GPL. Jeff Lewis wrote: I am wondering if anyone out there has some really good references in regards to scripts distributed as open source using the GPL. In the last three years that I have worked on open source projects

Re: [PHP] PHP scripts and the GPL/other licenses

2003-03-01 Thread Leif K-Brooks
Yes. Just look at Linux, and its many distributions. Most have changed more than 10 lines, but I don't believe the GPL says how much must be changed. Jeff Lewis wrote: So with the GPL, someone can change say...10 lines and rename the scripts and distribute it as their own? -- The above messag

Re: [PHP] php and html differences

2003-03-02 Thread Leif K-Brooks
If I was you, I would tell him he's insane. Sunfire wrote: hi.. i guess this is a php related question (well sort of) the person i work with decided that he was going to edit a few of my php scripts that make a web page out of variables and just different conditions that happen in the script..

Re: [PHP] Switch Statement || Case with multiple values?

2003-03-02 Thread Leif K-Brooks
switch($value){ case 'foo': case 'bar': //It's either foo or bar break; } CF High wrote: Hey all. In Cold Fusion I was able to do the following: Do Stuff Note the comma delimited set of values for the case. Is there a way to do this in php?( i.e. if any of

Re: [PHP] Re: functions and

2003-03-03 Thread Leif K-Brooks
PHP is server-side, the PHP script has already executed by the time the client sees your output. Try having the logout link call a page that calls the function. Martin Johansson wrote: Ok to make it simplier, this is what I wanna do! echo "Logout"; function logout() { . } ?> How do I

Re: [PHP] Code Validator

2003-03-03 Thread Leif K-Brooks
Exactly what do you mean by code validator? If you can run it and it doesn't return any errors... it's valid PHP! :) If you mean one that validates HTML produced by PHP, try saving the output of the PHP script and validating that. Beauford.2002 wrote: Hi, Is there a code validater for HTML/

Re: [PHP] query strings(still broken)

2003-03-03 Thread Leif K-Brooks
Are you trying to look at the query string itself? If so, spaces are invalid in URLs, so they are urlencoded. Try using $_GET/$HTTP_GET_VARS, or urldecode() it if you must. Sunfire wrote: tried everything except session vars and the query string is still broken... no matter what i do for some

Re: [PHP] query strings(still broken)

2003-03-03 Thread Leif K-Brooks
Do you mind giving (some of) your code? Sunfire wrote: still broke - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 7:18 PM Subject: Re: [PHP]

Re: [PHP] Populate var with function output string?

2003-03-03 Thread Leif K-Brooks
Try adding each output string to a variable, then returning it, like: function return_string(count) { $return = ''; for ($x = 0; $x < $count; $x++) { $return.= " Row $x"; } return $return; } If you can't do that for some reason, try using output buffering. www.php.net/ob-sta

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Leif K-Brooks
Use mysql_fetch_array instead of mysql_fetch_row. CF High wrote: Hey all. Basic question here: How can I refer to a query result set as $result['field_name'] rather than $result[0]? So, I'm looking for -- just can't seem to get the right syntax. -- clueless -- -- The above message is

Re: [PHP] Update MD5 Field

2003-03-03 Thread Leif K-Brooks
Run the following SQL query: update TABLE set code = md5(concat(name,email)) Dani Matielo wrote: Hello, everybody my problem is the following: I just imported a csv file to a MySQL database that contains name and email fields. It has about 9k lines on it and I need a new field that orinally didn'

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Leif K-Brooks
27;re on a roll. Any performance issues re: using fetch_row vs. fetch_array? Thanks again, --Noah - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "CF High" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, March 03, 2003 7:04 PM

Re: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Leif K-Brooks
What makes you think it HAS a numerical index? Matt Honeycutt wrote: Is there an easy way to get the numerical index of a text key for an array? I don't see anything in the manual, but before I waste time writing code to find this info, I thought I would double check here. ---Matt -- The abo

Re: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Leif K-Brooks
but I don't want to hardcode it like that. The people that are taking over this code might change something and screw everything up. ---Matt -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 12:35 AM To: Matt Honeycutt Cc: [EMAIL PROTECTE

Re: [PHP] Using PHP to Generate a CSS Style Sheet

2003-03-03 Thread Leif K-Brooks
It doesn't have to be a .css file, just as HTML generated from PHP doesn't have to have a .html extension. Phillip S. Baker wrote: Greetings all, I would like to use PHP to make calls from a DB and generate a CSS file. Anyone have any ideas on doing this? Will php commands executre from a .css

Re: [PHP] http benchmark tools

2003-03-04 Thread Jason k Larson
How about Apache Bench? http://httpd.apache.org/docs/programs/ab.html -- Jason k Larson Tamas Arpad wrote: Hi, I'm searching for a good http benchmark tool. Of course I found some, but don't know them and don't know which one to choose. I found JMeter slow, in other aspects it w

Re: [PHP] Browser Sniffing

2003-03-04 Thread Leif K-Brooks
Checking browsers is pure evil, but if you must, use $_SERVER['HTTP_USER_AGENT'] on the server side. Ashley M. Kirchner wrote: I know, it can't be done in PHP. That's not exactly what I'm here for. I have a client who would like to redirect people to a polite 'upgrade your browser' page w

<    1   2   3   4   5   6   7   8   9   >