Re: [PHP] good practice

2002-02-14 Thread Peter J. Schoenster
On 14 Feb 2002, at 11:09, James Taylor wrote: Can someone recommend a better method for doing something like the following? All of my programs are written like this, but it's really poor form considering I'm not predeclaring my variables, etc. Only thing I can really think of is to assign

Re: [PHP] good practice

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 11:09, James Taylor wrote: Can someone recommend a better method for doing something like the following? All of my programs are written like this, but it's really poor form considering I'm not predeclaring my variables, etc. Only thing I can really think of is to

[PHP] File Access Security Issues

2002-02-14 Thread Steven Walker
How assured can I be that people will NOT be able to view my php code? I'm creating an e-commerce site that will contain sensitive information and algorithms. I want to to take every precaution possible to protect that data and code. One concern in particular is the ability to view the

RE: [PHP] good practice

2002-02-14 Thread Matt Schroebel
What I do is use templates to separate the html from the php. So I end up with (at least) 2 files per page, one the template; the other the html. If you have tables, then you need templates for the rows. My model is basically: If (POST == $HTTP_SERVER_VARS['REQUEST_METHOD']) { // do data

Re: [PHP] What are you using for please wait?

2002-02-14 Thread Erik Price
On Thursday, February 14, 2002, at 09:39 AM, [EMAIL PROTECTED] wrote: and the I am not giving the user any indication as to what is going on. Distract the user with a flash animation (say, a status bar or something) stored in cache on prior page. ;) Erik Erik Price Web

Re: [PHP] Sorting an array of arrays....

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 08:26, Fifield, Mike wrote: What I am trying to do is sort a array of arrays but I want to sort by one of the pieces of data stored in the arrays inside the array. For example; $data[blue] = array(name, age, time, 3); $data[green] = array(name, age, time, 7); $data[red]

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread Erik Price
On Thursday, February 14, 2002, at 10:46 AM, Alastair Battrick wrote: Do you not have to make $_SERVER a global variable in the function ? $_SERVER is global AFAIK, but good thinking. All $_* variables are global (unlike the $HTTP_*_VARS arrays). Erik Erik Price Web Developer

Re: [PHP] More about sessions.

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 11:40, Morten Nielsen wrote: Hi again, I have read about sessions in the PHP manual and as far as I understand session needs the user to allow cookies. Is my understanding correct so far? But if it is required to accept cookies why not just pass all the required

Re: [PHP] really weird problem

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 11:15, Jaxon wrote: hi folks, can someone shed some light here? i've got a file called index.php with the following contents: ?php echo debug output: index.php loadedbr; if (is_null($page_name)) $page_name=about; echo debug: page name = $page_namebr;

RE: [PHP] array variable name

2002-02-14 Thread Rick Emery
what are your trying to do with it?? -Original Message- From: Tomek Golembiewski [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 8:20 AM To: [EMAIL PROTECTED] Subject: [PHP] array variable name How can I get the name of array variable into str? -- PHP General Mailing

[PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Kevin Stone
How can I open a local PHP script and view its code to the browser? The Readfile() method appears to parse and execute the code. The Fopen() method appears to parse and then not execute the code, leaving a blank screen, or at the very least displaying any non-PHP text existing in the script.

RE: [PHP] class and session identyfier

2002-02-14 Thread Rick Emery
did you begin your script with session_start()? -Original Message- From: sasza [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 7:28 AM To: [EMAIL PROTECTED] Subject: [PHP] class and session identyfier hi I've got session identyfier in $session_id. In all sites it can be

Re: [PHP] how a function 'return' statement works

2002-02-14 Thread Erik Price
On Thursday, February 14, 2002, at 02:32 PM, Lars Torben Wilson wrote: I think what you're trying to do is return one particular element out of the array. If that's the case, just use something like: return $current_page_name[-1] to return the last element in the array. I do not know

[PHP] PHP Training wishlist

2002-02-14 Thread Michael Kimsal
Hello all: My company has developed and presented PHP training over the last year and we feel we have comprehensive 'beginner' to 'intermediate' class material. However, I'm curious to know what others out there would like to see in an 'advanced' class. Any thoughts? (to see what we cover

Re: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Erik Price
On Thursday, February 14, 2002, at 03:26 PM, Kevin Stone wrote: How can I open a local PHP script and view its code to the browser? The Readfile() method appears to parse and execute the code. The Fopen() method appears to parse and then not execute the code, leaving a blank screen, or

Re: [PHP] Anyway to open a PHP file and view its code in thebrowser?

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 12:26, Kevin Stone wrote: How can I open a local PHP script and view its code to the browser? The Readfile() method appears to parse and execute the code. The Fopen() method appears to parse and then not execute the code, leaving a blank screen, or at the very least

[PHP] access php4 intepreter

2002-02-14 Thread toni baker
php4.1.1.exe was installed in C:\My Documents directory. Do I need to include a path to the php intepreter? C:\My Documents\php4.1.1 ? phpInfo(); ? __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com --

RE: [PHP] access php4 intepreter

2002-02-14 Thread Rick Emery
or include it in your PATH environment variable -Original Message- From: toni baker [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 2:57 PM To: [EMAIL PROTECTED] Subject: [PHP] access php4 intepreter php4.1.1.exe was installed in C:\My Documents directory. Do I need to

RE: [PHP] really weird problem

2002-02-14 Thread Jaxon
Lars, Thanks, you were right that IE was dumping things. I think there must have been some wacky line breaks or somesuch. Re-typing the file by hand produced success. cheers, jaxon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PEAR DB class

2002-02-14 Thread Gary
Hi all, Before I get started and have to figure out a problem. Is it legal in PEAR DB to connect like this $dbh = DB::connect(mysql://$user:$pass@$host/$dname); where user, password, host and database names are coming from an include? TIA Gary -- PHP General Mailing List

Re: [PHP] good practice

2002-02-14 Thread J Smith
Using global in the global scope (i.e. global $Config;) does nothing. If something is declared in the global scope of a file and then included into another file, it's still global. You don't need to actually say global $whatever unless you're in a function. Also, if you're including a file

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Kevin Stone
I'm glad you posted this. It's great to know. Unfortunately it's not what I need to do. I'm uploading and updating my scripts all the time. So I need to offer code views of *active* scripts. Changing the file name to phps makes the scripts inactive. Any other ideas? -Kevin -Original

RE: [PHP] PEAR DB class

2002-02-14 Thread Matthew Walker
Sure is legal. I use it all /over/ the place. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Gary [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 2:26 PM To: [EMAIL PROTECTED] Subject: [PHP] PEAR DB class Hi all, Before I get

Re: [PHP] good practice

2002-02-14 Thread Michael Kimsal
J Smith wrote: Also, if you're including a file named CONFIG.inc from the same directory as the script itself, please, please tell me you have your web server set up not to serve CONFIG.inc to the outside world. (i.e. you have a .htaccess file or something to send DENY to a request for

Re: [PHP] Re: center text on image

2002-02-14 Thread Adrian Murphy
cool, only i can't get it exactly centred in the y position cos the numbers are baseline relatedi.e the letter 'y' goes under the line. any ideas? - Original Message - From: J Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 6:48 PM Subject: [PHP] Re:

Re: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Andreas Gietl
then do a symbolic link On Thursday 14 February 2002 22:34, Kevin Stone wrote: I'm glad you posted this. It's great to know. Unfortunately it's not what I need to do. I'm uploading and updating my scripts all the time. So I need to offer code views of *active* scripts. Changing the file

[PHP] Re: File Access Security Issues

2002-02-14 Thread Fred
A good hacker can get access no matter what precautions you take. No computer system is totally secure, the only thing you can do is take all possible precautions and keep current on security risks. If your algorithms are really valuable, then you may want to invest in the ZEND Encoder

[PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread Peter Ruan
Hi, I have a quick MySQL question...if this is not the correct forum for it, then someone please point me to the right one. Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the information on

RE: [PHP] Anyway to open a PHP file and view its code in thebrowser?

2002-02-14 Thread Kevin Stone
Oh duh. Before I was passing the whole URL and there must be some kind of security measure in place so that users can't view the code of remote scripts. That makes sense. It's working fine using the relative path on the local directory which is all I need. -- ? //peekaboo.php if

RE: [PHP] Anyway to open a PHP file and view its code in thebrowser?

2002-02-14 Thread Martin Towell
yeah - going through a seb server, you're going to get the executed version of the code and not the code itself. -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 9:19 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Anyway to open a PHP file

RE: [PHP] Anyway to open a PHP file and view its code in thebrowser?

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 14:18, Kevin Stone wrote: Oh duh. Before I was passing the whole URL and there must be some kind of security measure in place so that users can't view the code of remote scripts. That makes sense. It's working fine using the relative path on the local directory which

RE: [PHP] Cheap, PHP, mySQL hosting!

2002-02-14 Thread Gonzalez, Zara E
I use http://www.phpwebhosting.com they're pretty good and cheap too. Zara -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 11:07 AM To: 'Thomas Edison Jr.'; [EMAIL PROTECTED] Subject: RE: [PHP] Cheap, PHP, mySQL hosting!

Re: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread DL Neil
Peter, I have a quick MySQL question...if this is not the correct forum for it, then someone please point me to the right one. Can the UPDATE statement have conditional check embedded in it? I have a page that displays a record (in a FORM format) that the user can change the

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Kevin Stone
I did a net wide search on Symbolic links to learn what they are and how to use them. Wouldn't you know everyone's talking about them but no one explains what they are or how to use them. So I'm forced to ask... What are symbolic links? Why are they useful? And how do I use them? -- Kevin

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Martin Towell
symbolic links are basically pointers to another file/directory eg. you have a file foo.html you can create a symbolic link to it and call it bar.html - if you refer to bar.html, then you're really referring to foo.html why are they useful ? well, suppose you want a two or more files/dirs

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Jeff Sheltren
A symbolic link is like a pointer to a file. It is like a shortcut on windows OS's... Jeff At 03:44 PM 2/14/2002 -0700, Kevin Stone wrote: I did a net wide search on Symbolic links to learn what they are and how to use them. Wouldn't you know everyone's talking about them but no one explains

Re: [PHP] good practice

2002-02-14 Thread J Smith
Or put them outside of the web server's document hierarchy. I'd feel safer with that than naming them with a .php extension. If they can still be executed by PHP using a GET request, then something could still be output to a user's browser. (Likely unintentionally, of course, but still...)

Re: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Christopher William Wesley
Create a script to which you can pass a file namem and calls show_source() on the file name. http://www.php.net/manual/en/function.show-source.php Be very careful to check the input, such that the file name parameter which eventually gets passed to show_source() cannot be one which you do not

Re: [PHP] array variable name

2002-02-14 Thread Jim Lucas [php]
I think you are looking for the function called array_key() http://www.php.net/manual/en/function.array-keys.php Jim Lucas - Original Message - From: Tomek Golembiewski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 6:20 AM Subject: [PHP] array variable name

Re: [PHP] searching key words from a database field

2002-02-14 Thread Philip J. Newman
This works for the loop. now spliting up the words. now it searchs for just one word in the loop any suggestions on this - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 9:51 PM Subject: Re: [PHP] searching key words from

Re: [PHP] Re: center text on image

2002-02-14 Thread J Smith
Not off-hand, but if you know the general size of the font and how many pixels y, j, etc. extend below the baseline, you could just offset the text a bit to compensate. J Adrian Murphy wrote: cool, only i can't get it exactly centred in the y position cos the numbers are baseline

Re: [PHP] searching key words from a database field

2002-02-14 Thread David Robley
In article 000801c1b5b0$ee66f180$0401a8c0@philip, [EMAIL PROTECTED] says... This works for the loop. now spliting up the words. now it searchs for just one word in the loop any suggestions on this - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [PHP] searching key words from a database field

2002-02-14 Thread Philip J. Newman
the problem is there isn't any code yet and yes what you said is corrent if text input is: the big tree would like $string1 = the would like $string2 = big would like $string3 = tree and so on and so on for all the key words entered. Each key word needs to have its own string alocated. Any

[PHP] Sessions just not working...

2002-02-14 Thread Norman Cates
I cannot get session information to work under any circumstances I think I've read every single comment on http://www.php.net/manual/en/ref.session.php session_start(); Function setup() { global $HTTP_SESSION_VARS; if (!(isset($HTTP_SESSION_VARS[notesType]))){

Re: [PHP] Sorting an array of arrays....

2002-02-14 Thread Toni Kustiana
try to add to your script: function cmp ($a, $b) { return strcmp($a[3],$b[3]); } usort($data, cmp); Fifield, Mike [EMAIL PROTECTED] wrote: What I am trying to do is sort a array of arrays but I want to sort by one of the pieces of data stored in the arrays inside the array. For example;

[PHP] fopen

2002-02-14 Thread John Smythe
i wanna know if there is a way of opening a file in a certian mode so when i write to a txt file it writes at the top of the file, and doesnt overwrite whats at the start of the file Regards, John Smythe http://www.smythey.org/

Re: [PHP] fopen

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 17:34, John Smythe wrote: i wanna know if there is a way of opening a file in a certian mode so when i write to a txt file it writes at the top of the file, and doesnt overwrite whats at the start of the file No, not with fopen(). What you can do is create a temporary

RE: [PHP] fopen

2002-02-14 Thread Martin Towell
or read the original file into memory, reopen the file for writing, write the first prepend bit, then write what you just read -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 1:18 PM To: John Smythe Cc: [EMAIL PROTECTED] Subject: Re:

[PHP] GOOD, EASY part-time jobs for PROGRAMERS!!!

2002-02-14 Thread Balazs Laszlo
Hi! You can find many part-time jobs for you at: http://endi.go.ro/ml.htm __ Do You Yahoo!? Got something to say? Say it better with Yahoo! Video Mail http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] searching key words from a database field

2002-02-14 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... try something like this (not tested): ? $getme = the big tree; $getme_arr = explode( , $getme); $num = count($getme_arr); $sql = SELECT * FROM `hyperlinks` WHERE 1; for ($i = 0; $i $num; $i++) if

RE: [PHP] searching key words from a database field

2002-02-14 Thread Martin Towell
Something at the top - :) -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:47 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] searching key words from a database field In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... try something

Re: [PHP] good practice

2002-02-14 Thread Peter J. Schoenster
On 14 Feb 2002, at 16:26, J Smith wrote: Using global in the global scope (i.e. global $Config;) does nothing. If something is declared in the global scope of a file and then included into another file, it's still global. You don't need to actually say global $whatever unless you're in a

Re: [PHP] good practice

2002-02-14 Thread Peter J. Schoenster
On 14 Feb 2002, at 16:40, Michael Kimsal wrote: On that same topic, *why* do people name files with both .inc and .php? Your .inc file has PHP code in it, right? Why not just call it .php and spare the server reconfiguration. If knowing which files are include files (long time since

Re: [PHP] good practice

2002-02-14 Thread Philip J. Newman
WHo really cares, if it works it don't matter what they call it. - Original Message - From: Peter J. Schoenster [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 15, 2002 5:36 PM Subject: Re: [PHP] good practice On 14 Feb 2002, at 16:40, Michael Kimsal wrote: On that

[PHP] Imap-uw Horde::IMP

2002-02-14 Thread Devin Atencio
I am currently running an old version of imap v4 from FreeBSD 4.1, and I was going to install the latest 2001c library onto my computer. I realize that after installing the library i should recompile PHP, but is there any problems that anyone knows that will affect anything by doing this

[PHP] Re: class and session identyfier

2002-02-14 Thread Yasuo Ohgaki
Sasza wrote: hi I've got session identyfier in $session_id. In all sites it can be see very well. But in one site I use class in this form: class name { function1(); function2(); etc. } and inside it the $session_id is unknown(outside class is OK). What should I do inside class that my

[PHP] Re: Sessions just not working...

2002-02-14 Thread Yasuo Ohgaki
Norman Cates wrote: I cannot get session information to work under any circumstances SNIP But even reading the comments on the above page, nothing will work. It will not persist with the session variable... Am I doing something wrong? If you are using recent PHP, track vars are

[PHP] Looking for optimal coding

2002-02-14 Thread Phillip S. Baker
This is not a big thing. But I am looking at this thinking there is a way to make the code take up even less lines. Just want to stick this in my cap for future reference. for($i=01;$i=50;$i++) { if (!empty($content)) { if ($row[$content]==$states[$i])

RE: [PHP] Looking for optimal coding

2002-02-14 Thread Jason Murray
Any expert programmers out there with the way to chop this even further? I would suspect that chopping this further would make it even harder to understand/maintain in the future... J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] text grabber

2002-02-14 Thread Jason Whitaker
How do i pull text from one file and have it print to another? example: I have a site where i use a table alot on alot of different pages but i dont want to type out the table each time but rather use php to grab the table from file-1.txt and print it on file-2.php? -- Jason Whitaker --

[PHP] phpTriad

2002-02-14 Thread mm fernandez
hi, can someone please help? i've installed phpTriad on my pc here at the office. i've tried it at home and everything works fine. here in the office though, i can only run the apache server. but i cannot start the mySQL server. i don't get any error messages...just that nothing happens

[PHP] How get the name of the array variable?

2002-02-14 Thread Tomek Golembiewski
I got the problem , I want make preety debug function that shows array keys and values and name of the variable containing array: Here it is: function show_arr($array) //wyswietla wartosci z tablicy wraz z kluczami (przeznaczone do debugowania) { if(DABUG) { echo

<    1   2