Re: [PHP] Wierd PHP Image

2003-04-01 Thread Leif K-Brooks
Removing it will anger Thies. I suggest you bow to Thies, perhaps he will be satisfied. Sebastian wrote: sorry what is Thies?, I have this too in my phpinfo... do i need it? Should i get rid of it? It started to appear when I complied GD Library with mcrypt support. cheers, - Sebastian -

Re: [PHP] $_SERVER[REMOTE_ADDR]

2003-04-01 Thread Leif K-Brooks
First of all, you should be using quotes around string array keys. $_SERVER['REMOTE_ADDR'] is more correct. Anyway, my guess is there's a proxy here somewhere. John wrote: Makes me think.. what exactly the $_SERVER[REMOTE_ADDR] is doing Cause it does not really show the actual IP

Re: [PHP] How to disable cache, image headers?

2003-04-01 Thread Leif K-Brooks
What's wrong with using a trick like that in a professioanl application? It doesn't hurt anything, and more importantly, IT WORKS! If your client(s) only care about it not using tricks, I wouldn't reccomend doing work for them. Arnaud De Bruyn wrote: I don't want to use a trick like adding a

Re: [PHP] Parsing CSS files

2003-03-31 Thread Leif K-Brooks
Why do you need to do this in the first place? If you're trying to create dynamic CSS, the .php extension will be fine as long as you send the proper content-type header. Liam Gibbs wrote: Is there any way of making PHP parse files with a CSS extension? -- The above message is encrypted

Re: [PHP] if statment

2003-03-31 Thread Leif K-Brooks
You should be using if(!isset($HTTP_GET_VARS['id'])){ Otherwise, it generates an eror when it simply doesn't exist. and nothing (an unset variable) are NOT the same. Tim Haskins wrote: below is what I have currently ?php if ($HTTP_GET_VARS[id] == ) { ? its empty ?php }? Now when I change

Re: [PHP] Question on response time, SQL vs. PHP

2003-03-31 Thread Leif K-Brooks
It's faster to use count(*), because it just has to fetch a count of the rows (but not the rows themselves). If you're retrieving the rows anyway, you should use mysql_num_rows, Liam Gibbs wrote: I'm trying to do a count(*) in SQL. Would it be faster to do a or b below? a: just do a simple

Re: [PHP] accessing result-set with associative array

2003-03-30 Thread Leif K-Brooks
It doesn't include the table name. Use name, albumid, etc. anders thoresson wrote: Hi, I've the query SELECT albums.name, albums.albumid, accessrights.albumid, accessrights.userid FROM albums, accessrights WHERE accessrights.userid = '$id' AND albums.albumid = accessrights.albumid. It

Re: [PHP] re: jason wong (was: locate)

2003-03-29 Thread Leif K-Brooks
I have to agree with Jason Wong, this list if for PHP and PHP only. If you want to discuss something else, do it somewhere else. The volume of the list is high enough with legitimate questions... Joseph Bannon wrote: You really are taking advantage of people's generosity in answering your OT

Re: [PHP] Is there a PHP for Dummies?

2003-03-29 Thread Leif K-Brooks
it is to look at other peoples code and write your own. B. - Original Message - From: Leif K-Brooks mailto:[EMAIL PROTECTED] To: Beauford.2002 mailto:[EMAIL PROTECTED] Sent: Saturday, March 29, 2003 9:03 AM Subject: Re: [PHP] Is there a PHP for Dummies? Rule #1 im

Re: [PHP] Re: Internet Explorer toolbar

2003-03-28 Thread Leif K-Brooks
echoing javascript ? -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 6:49 PM To: Dan Rossi; Leif K-Brooks Cc: Peter Houchin; Dan; php-general Subject: Re: [PHP] Re: Internet Explorer toolbar Now Now children. - Original Message - From

Re: [PHP] Re: Internet Explorer toolbar

2003-03-28 Thread Leif K-Brooks
Agreed, but it should be discussed off-list. The PHP list is a place to discuss PHP. Ashley M. Kirchner wrote: Leif K-Brooks wrote: I never said there was one, I simply said that a PHP solution was requested and you gave a javascript solution. That has nothing to do with the PHP (!) list

Re: [PHP] Redirec.t

2003-03-28 Thread Leif K-Brooks
header(Location: http://php.net/header;); Johnny Martinez wrote: Hi all, Can someone tell me the function to redirect a browser to a specific page? Johnny For example: ? code... code... code finished. redirect(http://www.domain.com/admin.php;); ? -- The above message is encrypted with

Re: [PHP] Redirec.t

2003-03-28 Thread Leif K-Brooks
Try putting: ob_start(); at the top of your file (before ANY output is done). Johnny Martinez wrote: Forgive me. I'm new to php. I put the function in my function.php include file which is loaded before I display anything. I want to redirect the browser to a new url once the php script is

Re: [PHP] Redirec.t

2003-03-28 Thread Leif K-Brooks
Martinez [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 8:37 PM To: 'Leif K-Brooks'; Johnny Martinez Cc: '[EMAIL PROTECTED]' Subject: RE: [PHP] Redirec.t Thanks! That worked! Johnny -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 4:53

Re: [PHP] Is there a PHP for Dummies?

2003-03-28 Thread Leif K-Brooks
After a quick search of the php manual, I came upon http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc, which says: Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), (double quote), \ (backslash) and NUL's are escaped

Re: [PHP] Is there a PHP for Dummies?

2003-03-28 Thread Leif K-Brooks
the PHP manual very helpful - I tend to get more out of the users comments than the actual manual.. - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To: Beauford.2002 [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, March 28, 2003 9:49 PM Subject: Re: [PHP] Is there a PHP

Re: [PHP] Why this script doesn't work?

2003-03-27 Thread Leif K-Brooks
http://www.php.net/manual/en/security.registerglobals.php J. P. wrote: I'm using Apache 2.0.44 with Win XP and PHP version 4.3.1! -- 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

Re: [PHP] Re: Internet Explorer toolbar

2003-03-27 Thread Leif K-Brooks
Correct, but he asked about doing it with PHP. Peter Houchin wrote: yes there is java script Dan wrote: On Thu, 27 Mar 2003 12:32:06 -0800 (PST), [EMAIL PROTECTED] (Manuel Ochoa) wrote: Is there any way of using php to launch a new browser without the IE toolbars? No. PHP is server side,

Re: [PHP] Re: Internet Explorer toolbar

2003-03-27 Thread Leif K-Brooks
t=100'/a'; sorry i forget the no toolbar part from the top of my head. = Original Message From Leif K-Brooks [EMAIL PROTECTED] = Correct, but he asked about doing it with PHP. Peter Houchin wrote: yes there is java script Dan wrote: On Thu, 27 Mar 2003 12:32:06 -0800 (PST

Re: [PHP] Re: Internet Explorer toolbar

2003-03-27 Thread Leif K-Brooks
Correct, but he asked for a PHP solution. HE DID NOT ASK FOR A JAVASCRIPT SOLUTION, AND YOU SHOULD NOT DISCUSS CLIENT-SIDE MATTERS ON THE PHP LIST! Dan Rossi wrote: ??? who cares i gave a solution, there is no other #**#% way -Original Message- From: Leif K-Brooks [mailto:[EMAIL

Re: [PHP] What am I not understanding about $GLOBALS['myvar'] vs global $myvar?

2003-03-26 Thread Leif K-Brooks
No, you misunderstand. The key is simply a string. Just as print foo; is wrong, $array[foo] is wrong (unless foo is a constant, of course). If you do print '$variable';, it will print the literal string $variable. It will not print the value of $variable. You should either use double

Re: [PHP] register globals :|

2003-03-26 Thread Leif K-Brooks
the script resides). cheers, - Sebastian - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] | http://www.php.net/manual/en/function.import-request-variables.php at | the top of the script, or use .htaccess to change RG to on. | | Sebastian wrote: | | Is there any work-around to get a scipt

Re: [PHP] html_quickform - array question

2003-03-26 Thread Leif K-Brooks
Are you trying to print/echo it? That converts it to a string first. Either print_r it, var_dump it, or do something else with it. Charles Kline wrote: hi all, using html_quickform (pear) and it has a date type that passes the date info like this: array(24) { [lr_pub_date]= array(3) {

Re: [PHP] html_quickform - array question

2003-03-26 Thread Leif K-Brooks
-getSubmitValue('lr_pub_date'); echo The month: $thedate['m']; Is that what you meant? - Charles On Wednesday, March 26, 2003, at 09:31 PM, Leif K-Brooks wrote: Are you trying to print/echo it? That converts it to a string first. Either print_r it, var_dump it, or do something else with it. Charles Kline

Re: [PHP] Retrieving newly created ID from MySQL?

2003-03-26 Thread Leif K-Brooks
The manual is your friend! :) Have a look at http://www.php.net/manual/en/function.mysql-insert-id.php. Ben Cheng wrote: If I have a MySQL table with an auto-incrementing ID field, is there an easy way to retrieve the new ID after I insert a new row into the table? For example, if I insert a

Re: [PHP] Send Output to Printer?

2003-03-26 Thread Leif K-Brooks
PHP is server-side; it can't do anything to the client. You'll need to use javascript, or some other client-side technology. Nicole wrote: anyone know of a good tutorial for using PHP to send output to a printer? have a report that returns paged display (e.g., 20 rows max per page) ... too

Re: [PHP] counting ..

2003-03-25 Thread Leif K-Brooks
Why do you think comment needs a number in the first place? Sebastian wrote: Hello all. rather dumb question. I have a pagination system, 25 results per page, which are user comments, I want to put a number on each comment so i am doing something like: $num=$num + 1; $number = $num; echo

Re: [PHP] variables??

2003-03-25 Thread Leif K-Brooks
No, it is more secure. The problem with register_globals is that ALL variables become global - not just the ones you want to be. Example: if(something) $authorized = true; if($authorized){ ...do something requiring security... } A hacker could easily go to script.php?authorized=1, and gain

Re: [PHP] mail() Bcc:

2003-03-24 Thread Leif K-Brooks
Not everyone has whatever class you seem to be using... Bryan Brannigan wrote: $mail-BCC( [EMAIL PROTECTED] ); - Original Message - From: Oden Odenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:44 PM Subject: [PHP] mail() Bcc: How can send bcc: with mail()?

Re: [PHP] Re: how to pass variable for $_GET

2003-03-22 Thread Leif K-Brooks
http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc DomIntCom wrote: ok - found urldecode which is now giving me the following; \'2003-1-3 00:00:01\' AND \'2003-3-10 23:59:59\' original string; '2003-1-3 00:00:01' AND '2003-3-10 23:59:59' Domintcom [EMAIL PROTECTED] wrote in

Re: [PHP] regex

2003-03-22 Thread Leif K-Brooks
Try this (entirely untested!): $final_footer = preg_replace('%INCLUDE_FILE\\[[^\\]]*\\]%','',$final_footer); Nate wrote: hi, i need to search $final_footer for a string such as %INCLUDE_FILE[/path/to/file]% (where /path/to/file could be anything) and delete it from the string. it being

Re: [PHP] regex

2003-03-22 Thread Leif K-Brooks
Whoops! Try this: preg_replace('|%INCLUDE_FILE\\[[^\\]]*\\]%|','',$final_footer); Nate Sanden wrote: Thanks! That worked almost. It removed everything except for the 2 % signs. How might I remove those as well? Leif K-Brooks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try

Re: [PHP] Running DB on different server

2003-03-20 Thread Leif K-Brooks
Yes. Todd Cary wrote: Can the DB be on a different server than the page server? Todd -- -- 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.

Re: [PHP] Cleaning user data

2003-03-20 Thread Leif K-Brooks
My BBCode class takes care of unended tags, and much more. Have a look at http://www.phpclasses.org/browse.html/package/951.html. Chris Shiflett wrote: I still fail to see how BB code helps in any way, since you have to make these same considerations. But, like I said, maybe I'm missing

Re: [PHP] number function

2003-03-20 Thread Leif K-Brooks
http://www.php.net/manual/en/function.is-numeric.php pei_world wrote: anyone how to write a good number valid function? regonise numbers like: real int -- Sincerely your; pei_world ( .::IT::. ) -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt

Re: [PHP] Validation of Numeric string sent in a form

2003-03-20 Thread Leif K-Brooks
www.php.net/is-numeric Orlando Pozo wrote: Hello all, I am Orlando Pozo How could I verify if a variable is a Numeric string? , I need help in this; for example when I submit a form, all texts fields are sent in strings, if you need to verify that the string is all numeric, How could I verify?,

Re: [PHP] $array_nam[$variable][0]

2003-03-19 Thread Leif K-Brooks
Exactly the syntax you used. Michael Smith wrote: Hi, I'm trying to do a: $var = $array_name[$var2][0]; where $var2 is an integer. I've got this array from a database and I want to use a variable in the array... what's the exact syntax of this? -Michael -- The above message is encrypted

Re: [PHP] Eliminating space between HR and Image

2003-03-19 Thread Leif K-Brooks
What the heck does this have to do with PHP?! Andre Dubuc wrote: Hi, I've added an animated gif in the banner area of my site, and just above it, a horizontal rule to give added emphasis. The problem is, no matter what I do, I cannot get rid of an extra space that appears between the two. Is

Re: [PHP] Eliminating space between HR and Image

2003-03-19 Thread Leif K-Brooks
Maybe so, but all PHP does is output HTML to the browser. Your question had nothing to do with PHP, and should be sent to an HTML list. Andre Dubuc wrote: About as much as your 'gentle' answer. Aside from this entry, everything is PHP on my site. And sorry I forgot the print .; -- The

Re: [PHP] Calling function in php page via GET?

2003-03-18 Thread Leif K-Brooks
Not built in, that would be a HORRIBLE security risk. You can try something like this (untested): call_user_func_array($_GET['func'],$_GET['params']); Then use it like myscript.php?func=somefunctionparams[]=fooparams[]=bar, which would be the same as calling somefunction('foo','bar');

Re: [PHP] register_variables

2003-03-17 Thread Leif K-Brooks
Is it inside of a function? samug wrote: I'm trying to run a script which uses variables passed via a form, like this: if($lcat_name) { $sql_query = INSERT into category VALUES ('','$lcat_name'); $result = mysql_query($sql_query); echo You add next categoryfont color=greenb $lcat_name/b/font; }

Re: [PHP] HTTP_REFERER reliability

2003-03-16 Thread Leif K-Brooks
Anyone can send any referer (sic) header to your script. It shouldn't be used for checking if someone is trying to hack the script, but it should be find in your case. rotsky wrote: I've experimented using $_SERVER['HTTP_REFERER'] which seems to work here. If the user enters valid login

Re: [PHP] using strcmp()

2003-03-16 Thread Leif K-Brooks
You're missing the ; on this line: $result=strcmp($firstword, $secondword) Anthony Ritter wrote: The following test script for the function strcmp() is from page 114 -115 of PHP (Hungry Minds). I'm getting a parse error on line 6. Using PHP 4.1.1 / MS Win 98 / Apache Server. Many thanks...

Re: [PHP] String Replace

2003-03-14 Thread Leif K-Brooks
www.php.net/str-replace Awlad Hussain wrote: I have a string with underscore in the middle.. like This_That which function do i use to replace the _ with space? eg to This That the string is in a variable.. I know its really simple but just don't know which function to use. any suggestion?

Re: [PHP] accidently inserting into web database blank records.

2003-03-14 Thread Leif K-Brooks
The string is in double quotes, ont single quotes. The single quotes are simply characters in the double-quoted string. I believe the register_globals explanation is correct. Brent Baisley wrote: I'm pretty sure your problem is the single quotes around your variables. Single quotes and

Re: [PHP] include dosn't after Provider-Change

2003-03-13 Thread Leif K-Brooks
You can't execute PHP from an HTML page. My guess is that your old provider had PHP parsing enabled for .html files, shich most don't. Oliver Witt wrote: Hallo, after a Provider-Change my counter-script dosn't work again. My entry is: ?php include (counter/rcounter.php) ; ? in an

Re: [PHP] PHP/HTML table layout?

2003-03-13 Thread Leif K-Brooks
This has absolutley nothing to do with PHP. I believe that it will stay if you set the width with CSS, but no promises. Bev wrote: Is there any simple way to stop the Cells of a Table from Moving, say for a simple table I want the first column to be always fixed at 100 pixels(col A) and the

[PHP] Is there any reason...

2003-03-13 Thread Leif K-Brooks
That replies on this list go to the person who originally posted the message by default? It seems to me that the reply-to header should be set to the list, or is it not possible with the mailing list system this list uses? -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Is there any reason...

2003-03-13 Thread Leif K-Brooks
The way I see it, part of the point in a mailing list is for people with the same question to only have to ask once. Replies not going to the list by default defeats this purpose. CPT John W. Holmes wrote: There is already enough traffic on the list. Just use Reply-All if you want to include

Re: [PHP] Redirect to a new page?

2003-03-13 Thread Leif K-Brooks
if(something){ header(Location: {$_SERVER['HTTP_HOST']}/thispage.php); }else{ header(Location: {$_SERVER['HTTP_HOST']}/thatpage.php); } Beauford.2002 wrote: Hi, I have searched around for hours on this and nothing seems to work. I want simply to do this if yes - goto thispage.php if no -

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
You're checking with javascript, correct? If so, try checking server-side too. Pag wrote: Been having some hacker problems on my site, and a simple one: I have a shoutbox, a simple form with name and text that adds lines to the database. I do checks for insults, too long words, tags,

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
That's can still easily be spoofed. The only safe way is to validate the form server-side. [EMAIL PROTECTED] wrote: Yes, theoretically...you could require it to be posted data. In order to do this you would have to make sure registered_globals is set to off in your php.ini and then for each

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
if(stristr($text,'badword') or stristr($text,'badword2') or strlen($text) maxlength){ die('Invalid!'); } [EMAIL PROTECTED] wrote: So how could you validate it server-side? -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:41 AM

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
That's just not possible. [EMAIL PROTECTED] wrote: Swear filtering is easy, I want to know how to make sure the data is coming from MY formI'm just picky like that. :-) -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:55 AM To: [EMAIL

Re: [PHP] Hacker problem

2003-03-12 Thread Leif K-Brooks
Correct. [EMAIL PROTECTED] wrote: So we aren't actually validating where the data is coming from, we are just validating the data? -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 8:57 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED

Re: [PHP] RE: Calculates time elapsed between two date

2003-03-12 Thread Leif K-Brooks
strtotime() them, then subtract. YC Nyon wrote: Hi, I need to get the time/date (ie. 1 day 12 hours 11 min 4sec) between 2 time dates. Can't seem to find any of these functions in the PHP manual. Thanks Nyon --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system

Re: [PHP] Cannot execute... Cron jobs

2003-03-12 Thread Leif K-Brooks
You can do that, but it's much less secure. Scott Holmes wrote: I'd just like to interject here that I execute php code from cron and I do not have php compiled as a cgi. I use lynx. Here is a sample of what I'm doing to e-mail a weekly newsletter to a membership database: #!/bin/sh

Re: [PHP] Cannot execute... Cron jobs

2003-03-12 Thread Leif K-Brooks
, at 09:20 PM, Leif K-Brooks wrote: You can do that, but it's much less secure. Scott Holmes wrote: I'd just like to interject here that I execute php code from cron and I do not have php compiled as a cgi. I use lynx. Here is a sample of what I'm doing to e-mail a weekly newsletter

Re: [PHP] Encrypting/Compiling PHP Scripts

2003-03-11 Thread Leif K-Brooks
http://zend.com/store/products/zend-encoder.php http://www.ioncube.com/ Davis Tan wrote: Hi, Would like to know whether is there any possibilities to encrypt or compile the PHP scripts so that it is not human-readable? Thanks! -- The above message is encrypted with double rot13 encoding.

Re: [PHP] Control over your Session

2003-03-10 Thread Leif K-Brooks
If you have register_globals on, you'll need to session_unregister it. Gerard Samuel wrote: Got a problem thats baffling me. I have a form that includes a file that starts a session. Creating sessions are no problem, but deleting the session variable is not working as its supposed to. Sudo code

[PHP] Re: [PHP-DB] explode string variable

2003-03-08 Thread Leif K-Brooks
Try the limit parameter of the explode function, www.php.net/explode. André Sannerholt wrote: Hi everyone! Does anybody know how to stop an explosion of a string: Let me explain: $variable_aray=explode('-', $variable); I want the variable to be devided in only two other ones! If for example:

Re: [PHP] variable string names

2003-03-08 Thread Leif K-Brooks
for ($i=1; $i=8 i++) { if (${'where'.$i} != '') { $whereArray = array_push($whereArray, ${'where'.$i}); } } julian haffegee wrote: Hi all, I have something thats been driving me mad for days I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1);

Re: [PHP] stripslashes()

2003-03-08 Thread Leif K-Brooks
Try this (untestted): if(get_magic_quotes_gpc()){ foreach($_REQUEST as $vname = $value){ $$vname = stripslashes($vname); } } John Taylor-Johnston wrote: I need to stripslashes() practically every $value as I pass data from one submit to another. L\'apprentissage d\'une langue ...

Re: [PHP] Re: Difference between

2003-03-07 Thread Leif K-Brooks
Not sure where you can read more, but let me try to explain it. The bitwise operators operate on a binary representation of a number. 4 is 100 in binary, 5 is 101. 5 | 4 results in 5, because the | operator sets bits set in either number. 5 4 results in 4, because the operator only sets

Re: [PHP] Re: Difference between

2003-03-07 Thread Leif K-Brooks
ultimatefootballleague.com/index.php [EMAIL PROTECTED] -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 2:20 AM To: James Taylor Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Difference between Not sure where you can read more, but let me try to explain

Re: [PHP] php list via email

2003-03-06 Thread Leif K-Brooks
Yes. http://www.php.net/mailing-lists.php electroteque wrote: hi there , is there any way to possibly get the list via email ? i can only access it via the newsgroup viewer in outlook and my firewall guy at work persists not to let me have access and you guys are very important to have in the

Re: [PHP] syntax question

2003-03-06 Thread Leif K-Brooks
It's fairly simple. The code you posted could also be written: if(strpos($a,'-')){ $a = explode('-',$a,2); }else{ $a = array($a); } It's called the ternary conditional operator. Unfortunatley, it's buried in the PHP manual. http://us2.php.net/manual/en/language.expressions.php Jimmy wrote:

[PHP] Memory errors?

2003-03-06 Thread Leif K-Brooks
Lately, I've been getting the following error: Fatal error: Allowed memory size of 15728640 bytes exhausted (tried to allocate 86460 bytes) in Unknown on line 0 The thing is, I'm not doing anything that could possibly require much memory. Is there some kind of bug, or am I missing something?

Re: [PHP] Memory errors?

2003-03-06 Thread Leif K-Brooks
Yes, I'm sure. Nik Makepeace wrote: Are you sure you don't have an infinite loop anywhere? This sort of thing can happen if you have an array or a string being built by a loop that never quits. Nik -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to

Re: [PHP] remove a line from a text list

2003-03-05 Thread Leif K-Brooks
Note: implode() can, for historical reasons, accept its parameters in either order. For consistency with explode(), however, it may be less confusing to use the documented order of arguments. Chris Wesley wrote: The above line: I'm assuming you want to collapse $recordsarray into a sting,

Re: [PHP] PHP vs. CGI

2003-03-05 Thread Leif K-Brooks
CGI meaning perl? SpyProductions Support Team wrote: Does PHP use less system resources than CGI on a server? I have a bulletin board which is incredibly active, but there is a PHP sister to it. Thanks, -Mike -- The above message is encrypted with double rot13 encoding. Any unauthorized

Re: [PHP] Newbie Problem with an IF Statement

2003-03-05 Thread Leif K-Brooks
What the heck? The string [status]='active' doesn't check anything. It is converted to boolean by the if statment, which will be true, as it's not an empty string. I'm guessing you want to use if($status=='active'){ Hunter, Jess wrote: I have a short bit of code that contains an if/else

Re: [PHP] Log In

2003-03-05 Thread Leif K-Brooks
No. Van Andel, Robbert wrote: Is there a handy function in PHP that I can use to retrieve the users Windows Log in? We are creating an application that will allow users to add comments to a mysql database, and we would like to be able to track who is putting the comments into the table,

Re: [PHP] print $array[$i][0] pukes

2003-03-05 Thread Leif K-Brooks
print $i :: {$manilist[$i][0]}\n; David T-G wrote: OK. That works, though it isn't pretty. Is there any way I can avoid doing the dot dance? I'd rather something like print $i :: ${manilist[$i]}[0]\n ; (which I know to not work! :-) than to have to open and close; that's just not very clean

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

Re: [PHP] Maintain and ' in html textfields

2003-03-04 Thread Leif K-Brooks
www.php.net/htmlentities Daniel Guerrier wrote: If I have text containing quotes, single or double in my database, and I try to set the text as a value for my html text field. The quote in the text will prematurely close the value= or value='' html and cut of the remainder of the text. How can

Re: [PHP] Re: functions and a href

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! ?php echo a href=logout();Logout/A; function logout() {

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

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

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] query strings(still broken) Are you trying to look

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.= option value=$x Row $x/option; } return $return; } If you can't do that for some reason, try using output buffering.

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 ? echo $result['field_name'] ? -- just can't seem to get the right syntax. -- clueless --

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

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

2003-03-03 Thread Leif K-Brooks
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 Subject: Re: [PHP] Yah || Simplest php question in existence

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

Re: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Leif K-Brooks
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 PROTECTED] Subject

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] 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: CFSWITCH expression = #action# CFCASE value = getUpdate,getDelete Do Stuff /CFCASE /CFSWITCH Note the comma

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

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

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 -- The

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

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] How do I display the script file name?

2003-02-27 Thread Leif K-Brooks
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: ?=__FILE__;? -- The above message is encrypted

[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 img tag. Kevin Waterson wrote: I am having some problems with ob_* My goals is basically this htmlStuff goes here ?php header('Content-Type: image/jpeg'); echo

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

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

[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

<    1   2   3   4   5   6   >