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

2003-02-27 Thread Leif K-Brooks
and example where a short > tag is causing some 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: > >

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

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

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

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

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

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

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

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

[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

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

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

[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

[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

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

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

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

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

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

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

[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

[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!";

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

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:

[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

[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

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

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

[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] $_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] 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] 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] 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/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

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

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

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

<    1   2   3   4   5   6   >