Re: [PHP] What is wrong here?

2002-11-24 Thread Leif K-Brooks
Are you using a relative url for the redirection? Cesar Aracena wrote: Hi all, I'm making a site which will reside in a remote server and had several problems... most of them where solved once I saw that register_globals are OFF, but now I dont know which other settings are affecting my script

[PHP] Browser going to page twice?

2002-11-24 Thread Leif K-Brooks
I'm having a weird problem. When I submit a form on my site, it often sends twice. I'm not sure if this is a client-side or server-side problem, but it doesn't happen on other sites. Is this a common problem, or am I making some dumb mistake? -- The above message is encrypted with double rot

[PHP] BBCode?

2002-11-24 Thread Leif K-Brooks
I'm working on adding simple BBCode to my site. I'm currently using the [i] tag for testing, with the following code: function bbcode($text){ $text = ereg_replace('\\[i\\](.{1,})\\[/i\\]','\\1',$text); return $text; } print bbcode('[i]This[/i] is a [i]test[/i].'); ?> But it prints "This[/i] is

Re: [PHP] Re: BBCode?

2002-11-24 Thread Leif K-Brooks
Thanks, but that isn't what I want. The point behind BBCode is allowing a small, simpler, securer, subset of HTML. I.e. [img=http://domain.com/image.gif] changes to http://domain.com/image.gif"; alt="" /> Kyle Gibson wrote: Leif K-Brooks wrote: I'm working o

Re: [PHP] Re: BBCode?

2002-11-24 Thread Leif K-Brooks
Thanks a lot, but do you know how to do the same with ereg_replace? I'm trying to learn PCRE, but until I do, I won't be able to add anything to this... Jason Wong wrote: It's not working because it's doing a greedy match. Try (I prefer the PCRE functions over EREG): $text = preg_replace("/

Re: [PHP] Re: BBCode?

2002-11-25 Thread Leif K-Brooks
Thanks, but that doesn't allow nested tags (a [b] tag inside of an [i] tag, for example). Kyle Gibson wrote: Thanks a lot, but do you know how to do the same with ereg_replace? I'm trying to learn PCRE, but until I do, I won't be able to add anything to this... \\2',$text); return $text; }

[PHP] Making verification code harder to OCR?

2002-11-25 Thread Leif K-Brooks
I'm using a verification code image to stop automated sign ups, but two hackers seem to be OCRing it. I've looked through the registration script, and there's definitley no security holes. Does anyone have any ideas as to making the image harder to OCR? // seed with microseconds function mak

[PHP] Browser going to page twice?

2002-12-02 Thread Leif K-Brooks
I'm having a weird problem. When I go to a page on my site, it often goes twice. I'm not sure if this is a client-side or server-side problem, but it doesn't happen on other sites. Is this a common problem, or am I making some dumb mistake? -- The above message is encrypted with double rot13 en

Re: [PHP] nl2br ( ) and forms

2002-12-02 Thread Leif K-Brooks
Ryan Smaglik wrote: When I call data from a form, How do I integrate nl2br to it so that it displays with linebreaks? Example code: Thanks in advance, Ryan -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to t

Re: [PHP] Browser going to page twice?

2002-12-02 Thread Leif K-Brooks
Nope, it happens on all of the pages, but it seems to be fairly random. It doesn't happen all of the time, just sometimes. Morgan Hughes wrote: On Mon, 2 Dec 2002, Leif K-Brooks wrote: I'm having a weird problem. When I go to a page on my site, it often goes twice. I'm not

Re: [PHP] Browser going to page twice?

2002-12-02 Thread Leif K-Brooks
Yes, I'm using Apache 1.3.22. Mind giving specifics on what to set those options to? I'm not very great with configuring apache... Morgan Hughes wrote: On Mon, 2 Dec 2002, Leif K-Brooks wrote: Nope, it happens on all of the pages, but it seems to be fairly random. It doesn'

Re: [PHP] Browser going to page twice?

2002-12-02 Thread Leif K-Brooks
Hmm, nope. It's now off and it's still doing that. (I did restart apache) Morgan Hughes wrote: On Mon, 2 Dec 2002, Leif K-Brooks wrote: Yes, I'm using Apache 1.3.22. Mind giving specifics on what to set those options to? I'm not very great with configuring apache

[PHP] [SEMI-OT] Making secure flash high scoring?

2002-12-03 Thread Leif K-Brooks
Sorry for the semi-ot post, but this is both a flash and php question, and I'm not a member of any flash lists, so I decided to post it here. Anyway, I have a game site with virtual pets, virtual shops, user accounts, etc. One feature request I get alot is flash games. I could find someone to

Re: [PHP] fopen over a network

2002-12-04 Thread Leif K-Brooks
Link them to a page like this to download the file: Dara Dowd wrote: Hello, I'd like a user to be able download a file from a file server on my LAN. Using works ok, but this simply displays the file in the browser and I want to force the download dialog box to appear. So now i have , and

[PHP] Sending no content-type header?

2002-12-05 Thread Leif K-Brooks
I'm running a few simple php scripts from the (windows) command line. Since I'm not using a web browser to view it, the HTTP headers are annoying and pointless. I've turned expose_php off in php.ini, but commenting out default_mimetype changes nothing, and setting it to an empty string sends a

Re: [PHP] Sending no content-type header?

2002-12-05 Thread Leif K-Brooks
ithout quotes)³ echo ³ followed by the name of a³ echo ³valid php file without the .php³ echo ³extension. ³ echo ÀÄÄÄÙ :end Chris Wesley wrote: On Thu, 5 Dec 2002, Leif K-Brooks wrote: I'm running a few simple php scripts from the (windows) co

[PHP] Making random string function function more random?

2002-12-06 Thread Leif K-Brooks
I'm using the following function to generate a random string: function randstring($minasc = 32,$maxasc = 255,$minlength = 0,$maxlength = 0){ //If maximum length is lower than minimum length, return string representation of false if($maxlength != 0 and $minlength != 0 and $minlength > $maxl

Re: [PHP] evaluating vars in a var

2002-12-06 Thread Leif K-Brooks
$htmlEmail = 'hello $firstName $lastName'; //Start loop eval("\$thisemail = $htmlemail"); //Send mail out, using $thisemail for mail body //End loop rolf vreijdenberger wrote: Hi, this problem came forth from my previously posted -Mail(): how much time-, but is different so I posted it seperatel

Re: [PHP] evaluating vars in a var

2002-12-06 Thread Leif K-Brooks
Yes. If it was in double quotes, it would parse the variables before the loop started. Another way would be to put it in double quotes and escape the dollar signs. Rolf Vreijdenberger wrote: I notice that you put everything in single quotes and then escape it. is there any special reason for

Re: [PHP] Spaces

2002-12-07 Thread Leif K-Brooks
This isn't really a PHP question, but look at the html tag. Patrick McKinley wrote: Is there a way of getting a php to display all the spaces in a file. i have used this to display an nfo file on my site: ---nfoload.php $fol = $_GET['fol']; $nfono = $_GET['nfono']; require("n

Re: [PHP] Just Curious

2002-12-07 Thread Leif K-Brooks
I use the mailing list. conbud wrote: I was just curious, but what program or website do you all use to view and reply to the newsgroups with ? Lee -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent

Re: [PHP] PHP_SELF Variable

2002-12-10 Thread Leif K-Brooks
Not quite sure what you mean, but I'm guessing you're trying to use $PHP_SELF and it's not set. If that's the case, use $_SERVER['PHP_SELF'] instead. Register_globals defaults to disabled now. [EMAIL PROTECTED] wrote: Hello List, anybody knows how to set the PHP_SELF variable? Short answers

Re: [PHP] PHP_SELF Variable

2002-12-10 Thread Leif K-Brooks
Odd. Mind doing: print_r($GLOBALS); and tsending the results? [EMAIL PROTECTED] wrote: Hello Johannes, hello all, I compiled it as CGI-php and the variable $_SERVER['PHP_SELF'] has no value either. What can I do on order to give PHP_SELF the right value? Oliver Etzel On Tuesday 10 Decembe

Re: [PHP] PHP_SELF Variable

2002-12-10 Thread Leif K-Brooks
nip How can I get this value when I run it as a CGI? Oliver Etzel - Original Message - From: Leif K-Brooks To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, December 10, 2002 1:03 PM Subject: Re: [PHP] PHP_SELF Variable Odd. Mind doing: print_r($GLOBALS); and t

Re: [PHP] Forms

2002-12-10 Thread Leif K-Brooks
Change the html to: John Mary Beauford.2002 wrote: Hi, I'm sending this to both lists as I'm not sure where the problem is, but I believe it is an issue with my HTML form. Here's the problem: I have a drop-down menu form on my webpage with employee names in it. When I choose a name and c

Re: [PHP] trimming nans from a string

2002-12-11 Thread Leif K-Brooks
$variable = ereg_replace('[^0-9]','',$variable); Frands Sørensen wrote: I want a user to type a number in an html-form. Afterwards I want to check for wrong typing. How do I remove all non numbers from the string? -- The above message is encrypted with double rot13 encoding. Any unauthor

Re: [PHP] "include" question

2002-12-12 Thread Leif K-Brooks
Variables don't get parsed in single quotes, use double quotes. RClark wrote: Hello all, I am passing a variable like so: On the "link.php" page, I have this simple code: $job = $_GET['foo']; echo "$job"; // for error checking include 'path/to/$job'; ?> The 'echo "$job";' statement works

Re: [PHP] phpinfo page doesn't display anything

2002-12-12 Thread Leif K-Brooks
I'm guessing you don't have the short start tag enabled, try Jody Cleveland wrote: You're calling it through a web server, right? Yup: http://email.winnefox.org/wals/info.php Jody -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it wi

Re: [PHP] What's the Difference?

2002-12-13 Thread Leif K-Brooks
str_replace() doesn't have regex. Stephen wrote: I can't quite figure this out... What exactly is the difference between str_replace() and ereg_replace()? Don't they both do the exact same thing? Thanks, Stephen Craton http://www.melchior.us "What is a dreamer that cannot persevere?" -- http:/

[PHP] Getting full HTTP request the page was requested with?

2002-12-15 Thread Leif K-Brooks
Is there a way to find out exactly what HTTP request was made for a page? Something like: GET http://myserver.com/whatever.php HTTP/1.1 Host: myserver.com -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent o

Re: [PHP] Getting full HTTP request the page was requested with?

2002-12-15 Thread Leif K-Brooks
fgets($sockhandle, 1024); //Set-Cookie $res .= "$line\n"; $line = fgets($sockhandle, 1024); //End Header "space" $res .= "$line\n"; $res = addslashes($res); return $res; - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: <[EMAIL

Re: [PHP] PHP/MySQL Query

2002-12-15 Thread Leif K-Brooks
mysql_query("update table set field=field+1 where whatever='whatever'"); Steven M wrote: How do i make a form that will allow me to add 2 to the value of a MySQL field? I am trying to change it from 75 to 77. Is this possible? Thanks -- The above message is encrypted with double rot13

[PHP] PHP shell scripting not working right?

2002-12-16 Thread Leif K-Brooks
I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have the following script: #!/usr/bin/php -q print "Success!\n"; ?> It's saved as test.php and CHMODed to 777. When I type "test.php" at the command line, it says: bash: test.php: command not found When I type

Re: [PHP] PHP shell scripting not working right?

2002-12-16 Thread Leif K-Brooks
Ever answered your own question five seconds after asking it? Apparently, I have to type "/path/to/test.php" even though I'm already in the right directory. Leif K-Brooks wrote: I'm trying to do shell scripting in PHP. I have PHP installed in /usr/bin/php. I have

[PHP] Put text matching regex into array?

2002-12-16 Thread Leif K-Brooks
Is there a way to put each part of a string matching a regex into an array? Example: $string = "-_-_--- --_-_-- random text here-_"; $array = regextoarray($string,"[-_]{1,}"); //Produces array of "-_-_---","--_-_--","-_" -- The above message is encrypted with double rot13 encoding. Any

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Leif K-Brooks
No, PHP version. With virtually no information, I'm going to guess that you're using a version below 4.1, which is where the $_* variables were introduced. Upgrade or use $HTTP_SERVER_VARS. Rolf Vreijdenberger wrote: yes, the server var doesn't exist in phpifno(); no difference winxp pro wit

[PHP] Good program to indent large quantity of files?

2002-12-19 Thread Leif K-Brooks
I haven't been indenting any of my code, but I want to start indenting to make the code more readable. It would be near-impossible for me to manually indent what's already there, though. So, I'm looking for a program to indent an entire folder of PHP files at once. Any suggestions? -- The ab

Re: [PHP] Good program to indent large quantity of files?

2002-12-19 Thread Leif K-Brooks
how you when it recoginises PHP4.2.3 code .. http://www.ultraedit.com Mike Bowers PlanetModz Gaming Network Webmaster [EMAIL PROTECTED] ViperWeb Hosting Server Manager [EMAIL PROTECTED] [EMAIL PROTECTED] All outgoing messages scanned for viruses using Norton AV 2002 -Original Message----- From

Re: [PHP] Good program to indent large quantity of files?

2002-12-19 Thread Leif K-Brooks
But as far as I can tell, there's no "indent all" option. I'd have to do it by hand, or remove and recreate the line breaks in the text files. Justin French wrote: on 20/12/02 4:04 PM, Leif K-Brooks ([EMAIL PROTECTED]) wrote: Thanks, but that's not what I'm

Re: [PHP] syntax to reference $_POST within function

2002-12-20 Thread Leif K-Brooks
You don't need to import the request variables for that to work. The variable names in the function definition have no relationship to variables outside of it. Most likely, you're calling with something like: check_banlist($banlist,$p_email); but you could also call it with: check_banlist($vari

Re: [PHP] Re: Good program to indent large quantity of files?

2002-12-20 Thread Leif K-Brooks
Thanks, but it inserts two line breaks where there should be one, and puts spaces in my html tags so they don't work. Any other ideas? :( michael kimsal wrote: Leif K-Brooks wrote: I haven't been indenting any of my code, but I want to start indenting to make the code more rea

Re: [PHP] Strings and default values...

2002-12-20 Thread Leif K-Brooks
1) You most likely have magic_quotes_gpc set to on. Either set it to off or stripslashes() the input. 2) No, it won't print. Think of a heredoc as a quotes string without the quotes. You can, however, do something like: $variable = <<< WHATEVER whatever text goes here WHATEVER; $variable.= exe

Re: [PHP] Undefined Functions

2002-12-23 Thread Leif K-Brooks
Try defining them at the top instead... Beauford.2002 wrote: Then based on the one below that doesn't work, what is the problem with it? As I said, the functions are at the bottom of the script. The only thing after them is the closing ?>. I also said that they work if I don't call them from wit

[PHP] Good class for managing settings stored in INI (or other format)file?

2002-12-25 Thread Leif K-Brooks
I'm looking for a class to manage settings stored in a .ini (or other format) file. I could store them in a database, but they need to be there even when the DB's down. Any ideas? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be pros

[PHP] mysql_escape_string is deprecated?

2002-12-27 Thread Leif K-Brooks
I was looking at the PHP 4.3 changelog, and it said that mysql_escape_string is deprecated. Is this true, and if so, what should I be using instead? -- 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] how could a php script return a dns error ?

2002-12-28 Thread Leif K-Brooks
No, it is IE specific. It's IE's general error message, which means the document contains no data in this case. Hatem Ben wrote: it's not an IE specefic :)) netscape or opera or whatever will return the same error message. - Original Message - From: "Paul Reed" <[EMAIL PROTECTED]> To:

Re: [PHP] HTML module problem under Linux/APache2.0

2002-12-30 Thread Leif K-Brooks
No idea what you mean html module, but it looks like a register_globals problem. Tiziano Crimella wrote: Im' sorry but I discovered a problem when I try to send an HTML module to a PHP file. Watch the example below: module.html: --

[PHP] Keeping script running, but returning control to user?

2002-12-30 Thread Leif K-Brooks
I need a way to keep the script running on the server, but control to the user. I'm doing some lengthy processes on the server, and it seems stupid to keep the user waiting pointlessly. I'm trying to do something like: if(array_key_exists('secondrun',$_GET)){ print "Processing complete!";

[PHP] Getting short (DOS) name of file?

2002-12-30 Thread Leif K-Brooks
I'm trying to run some (often user-defined) files on my windows server. Thing is, it seems to want short names (like C:\PROGRA~1\WHATEVER\PROG.EXE). Is there any way to get the short name from a long name? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt

Re: [PHP] Getting short (DOS) name of file?

2002-12-30 Thread Leif K-Brooks
Thanks... thing is, it can be anything from c:\whatever.exe to c:\program files\program name\bin\program.exe. I'll write a function that goes to each directory in a string and does a dir /x if I have to, but isn't there a simpler way? Michael Sims wrote: On Tue, 31 Dec 2002 01:12:47 -0500, you

Re: [PHP] Getting short (DOS) name of file?

2002-12-31 Thread Leif K-Brooks
I'm using exec(). Frank M. Kromann wrote: PHP should not have any problems with long file names. I use it often on both WIndows 2000 and Windows XP without anu problems. What is it you are trying to do ? - Frank Thanks... thing is, it can be anything from c:\whatever.exe to c:\program fil

Re: [PHP] Limit to size of autoindex in MySQL/PHPMyAdmin?

2003-01-03 Thread Leif K-Brooks
The limit to tinyint is 255... use int. Jim MacCormaic wrote: Hi all. I'm new here, currently implementing my first PHP/MySQL website on an iMac running Mac OS X v.10.2.3. All has been going really well until just now while I was adding records to the MySQL database. I have a table which incl

[PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
I have a page called 404.php which is set as the 404 page in a .htaccess file. At the top of this file, it has this: if(strtolower($_SERVER['REQUEST_URI']) != $_SERVER['REQUEST_URI']){ header("Location: http://{$_SERVER['HTTP_HOST']}".strtolower($_SERVER['REQUEST_URI'])); die; } which redi

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
rom: "Leif K-Brooks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 6:14 PM Subject: [PHP] Still executing afte die()? I have a page called 404.php which is set as the 404 page in a .htaccess file. At the top of this file, it has this: if(

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
just convert it to lowercase and insert that value. I can't figure what possible advantage there is to doing the redirect to a custom error page. Only difference is what the user would see in the URL, no? Mike "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECT

Re: [PHP] Still executing afte die()?

2003-01-03 Thread Leif K-Brooks
this? Jason Wong wrote: On Saturday 04 January 2003 11:00, Leif K-Brooks wrote: But it shouldn't get to the database insert because of the redirect either... I only added the die; when it still inserted with the redirect. As you have already found out, the code _does_ continue to exe

Re: [PHP] Still executing afte die()?

2003-01-04 Thread Leif K-Brooks
As I understand it, your situation is this: a) all your pages are named in lowercase b) if someone tries to access a non-existent page on your site (eg using a URI which is not fully lowercase) they'll hit your 404.php Correct. But if the page was all lowercase they wouldn't be hitting you

Re: [PHP] Perl > PHP

2003-01-04 Thread Leif K-Brooks
Not good at perl, but you need to do: Sam wrote: I don't know what the heck this is but it works: #!/usr/bin/perl $ENV{LD_LIBRARY_PATH} .=":.:..:../lib"; $ENV{CLASSPATH} .= ":Verisign.jar:."; print `javac PFProJava.java`; print `java PFProJava test-payflow.verisignscks.com`; How can it be do

Re: [PHP] printer_open

2003-01-05 Thread Leif K-Brooks
PHP is server-side. You can't do anything to the client besides give them data. This may be possible with javascript (I don't think so, though), but not with PHP. Kathy wrote: Hi, I'm Kathy and just a beginner in php. I'm using the printer_open and printer_draw_text etc. to print a report

Re: [PHP] php $query help

2003-01-06 Thread Leif K-Brooks
What the heck is if($name == $name){ supposed to mean? I've never seen a variable that's not equal to itself... :-) - [ Paul Ferrie ] - wrote: > Here is my problem > >I have created a user login system (flash+php+mysql) >And it just about works > >Here's the prob when i go to register as a new u

[PHP] Changing order of just one array item?

2003-01-18 Thread Leif K-Brooks
I need to change where one item is ordered in an array. I know how to sory an array, but I need to move one item up/down in the array. Example: $array is: 0 => "element one" 1 => "element two" 2 => "element three" 3 => "element four" I call array_order_up($array[1]) and $array is now: 0 => "elem

Re: [PHP] Changing order of just one array item?

2003-01-19 Thread Leif K-Brooks
amp;$list, $first, $second) { $tempOne = $list[$first]; $list[$first] = $list[$second]; $list[$second] = $tempOne; } swap($first, 0, 1); print_r($first); ?> Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: Leif K-Brooks [mailto:[E

Re: [PHP] NEED HELP URGENTLY

2003-01-22 Thread Leif K-Brooks
First of all, you don't need to type in all caps like that. I thought this was the Nigerian Scam for a minute there! :-) Anyway, in PHP 4.2+, the php.ini setting register_globals is off by default. You'll need to either turn it on, or start using the newer $_POST superglobal array. For mor

Re: [PHP] continue after break

2003-01-22 Thread Leif K-Brooks
Then just don't have the image inside the loop... Remon Redika wrote: I have put Image inside of my loop... and that image located between and I want the image not doing loop too. cause i just need one image.., I just do looping for my data: and

Re: [PHP] Size of images (in bytes)

2003-01-23 Thread Leif K-Brooks
No, it's not sent to the browser. Your output buffer catches it, and the output buffer is then erased with ob_end_clean(). Oliver Witt wrote: Marek Kilimajer schrieb: Use output buffer: ob_start(); ImageJPEG($im); $imagestring=ob_get_contents(); ob_end_clean(); Thanks for the answe

Re: [PHP] URLencode issues - halp! - code included

2003-01-23 Thread Leif K-Brooks
Take the $name = urldecode($name); bit out. The decoding is all handled by PHP before your script runs. Also, you should look into using $_GET['name'] instead of $name. SpyProductions Support Team wrote: Here is some code: From a form, I get username as $name and it goes to the processing f

Re: [PHP] [url] to html

2003-01-24 Thread Leif K-Brooks
Take a look at my BBCode class, http://www.phpclasses.org/browse.html/package/951.html. Niels Uhlendorf wrote: hi, how to chang [url=%link%]%descr%[/url] in %descr% thx 4 help. Niels -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will

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

[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] 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 -

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

  1   2   3   4   5   6   >