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

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

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

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

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

[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 upgrade?

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

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 tim

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

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++) > i

[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, visit

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:

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

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

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

2002-02-14 Thread Martin Towell
try something like this (not tested): 0) $sql .= " AND `keywords` LIKE '%".$getme_arr[$i]."%'"; $sql .= " ORDER BY `id` ASC LIMIT 0, 30"; ?> -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 11:27 AM To: David Robley Cc: David

[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"]))){ $HTTP_SESSION_VARS["notesT

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 su

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

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 relat

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

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

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 wa

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...) P

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

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 to

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

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! http://www.nomo

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 whi

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 a

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. -- "; echo "$out"; ?> -- This works.

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

[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 (http://w

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

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

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 fo

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 starte

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 M

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 f

[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 (http://www.php.n

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

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 inc

[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 __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General M

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

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,

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

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 ar

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 see

[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. Th

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 List

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: > > > echo "debug output: index.php loaded"; > if (is_null($page_name)) $page_name="about"; > echo "debug: page name = $page_name"; > > $na

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

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 T

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"

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 Deve

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 val

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

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

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 assi

[PHP] More about sessions.

2002-02-14 Thread Morten Nielsen
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 parameters in the URL? Thanks, Morten -- PHP General Mailin

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

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 07:32, Erik Price wrote: > Hm... I tried quite a few variations on this. I can't seem to get any > displayable value out of this function. > > function get_current_page_name() > { > $current_page_name = explode("/", $_SERVER['PHP_SELF']); > $current_page_name = $current_pa

RE: [PHP] Store array into mysql?

2002-02-14 Thread Rick Emery
$ser_array = serialize($myarray); then store $ser_array to a table as BLOB, TEXT, or even VARCHAR to use its contents, read it from the table and use unserialize() -Original Message- From: Jan Grafström [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 10:35 AM To: [EMAIL PRO

Re: [PHP] Advanced books

2002-02-14 Thread Miles Thompson
Aside from learning by doing, there's an old adage that nothing teaches code like code. What about the articles at Zend? Download TWIG or PHPNuke or PostNuke and examine the code. The problem with "everything", is that yours differs from mine. Example, I work mostly with straight-ahead data p

[PHP] Re: good practice

2002-02-14 Thread Julio Nobrega Trabalhando
Well, for instance. I don't like forms that submit to the same page where it is located. Separating them helps to maintain the code (usually). I don't like html inside . Btw, you should start with And if $submitdata is expected to come from a form, check it: if ($_SERVER['HTTP_REFERER']

[PHP] Exams

2002-02-14 Thread DL Neil
> Best regards, > Andrey Hristov > > "Back from the exams hell" =what were you sitting Andrey? =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sessions

2002-02-14 Thread Steven Walker
On Thursday, February 14, 2002, at 11:06 AM, Andrey Hristov wrote: > Maybe you can put a small iframe in the HTML which will refresh on some > basis (3secs for example), and in the HTML of this > html you do the popup - window() or alert(). what you choose. the > message which is sent(from th

Re: [PHP] good practice

2002-02-14 Thread Steven Walker
I don't understand what you are trying to do... If you need to verify whether the page has already been submitted to itself, you can test any of the form variables using isset(). For example: "; echo ""; echo ""; } ?> You can also pass the data back int

[PHP] really weird problem

2002-02-14 Thread Jaxon
hi folks, can someone shed some light here? i've got a file called index.php with the following contents: "; if (is_null($page_name)) $page_name="about"; echo "debug: page name = $page_name"; $nav_array = array ("about => About", "reservations => Reservations",

Re: [PHP] Sessions

2002-02-14 Thread James Taylor
The thing about this is, what variables would I use regarding all active sessions, and the data that is stored in each session? Say there are three people logged on, each with the variable $name stored in their session which is their username - How do I get a list of all the names from the ses

[PHP] good practice

2002-02-14 Thread James Taylor
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 a value in the form a number like 1 or something,

Re: [PHP] Sessions

2002-02-14 Thread Andrey Hristov
Maybe you can put a small iframe in the HTML which will refresh on some basis (3secs for example), and in the HTML of this html you do the popup - window() or alert(). what you choose. the message which is sent(from the peer1 to server) is stored in db (or file) but have to stored somewhere till

[PHP] Sessions

2002-02-14 Thread James Taylor
Speaking of sessions, I was wondering if something like this is even possible: Users log on, each has their own unique session.. Is it possible to do some sort of instant messaging deal with this? Like, on the main page is displays everyone that's logged on, then you maybe choose their name

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

2002-02-14 Thread Fifield, Mike
Does anyone have an example of code that does this, I have been trying to decipher the instructions on the use of uasort but it does not make a hole lot of sense. They are using static keys and sorting by one of the array elements of each of there static keys. It does not seem like one should have

Re: [PHP] Authentication with sessions - Recommendation and suggestions?

2002-02-14 Thread Erik Price
On Wednesday, February 13, 2002, at 08:51 PM, Harry Yu wrote: > Can anyone give me any suggestions or recommendations? > Is there any security concerns? Also, the session > files are in a directory that is not world readable. I just set up my own first authentication system, and it works ver

[PHP] Advanced books

2002-02-14 Thread Jackson Miller
I am looking for advanced books on PHP. I have read many tuts and a couple of books, but I am looking for a big heavy detailed book on php and everything about coding php. any suggestions are welcomed. -Jackson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] Sessions

2002-02-14 Thread Andrey Hristov
This means that you do some output before calling session_start() or session_register(); check for echo()s or blanks before To: <[EMAIL PROTECTED]> Sent: Thursday, February 14, 2002 8:56 PM Subject: [PHP] Sessions > Hi, > I try to use sessions to keep track if a user is logged in. I keep getti

Re: [PHP] browser reload button

2002-02-14 Thread Jim Lucas [php]
about the only way I could think of doing something like this, is to create a unique value for each link on a page and take on to the end of each link for each page. then do a select to find out if that unique value has been entered already. if you use an MD5 hashing method and combine that with

Re: [PHP] character replace function

2002-02-14 Thread Steven Walker
You can also use the strtr() function: $new_data = strtr($data, "'", "`");// replaces ' with ` Also keep in mind that you can use the chr($number) to return special ascii characters. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Thursday, February 14, 2002,

RE: [PHP] character replace function

2002-02-14 Thread Rick Emery
Erase by what criteria? Position? Value? specifics!! -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 12:38 PM To: [EMAIL PROTECTED] Subject: [PHP] character replace function I need a function that will erase a particular char

RE: [PHP] Sessions

2002-02-14 Thread Rick Emery
It means you've already sent some HTML. Sessions stuff must be sent first -Original Message- From: Morten Nielsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: [PHP] Sessions Hi, I try to use sessions to keep track if a user is log

Re: [PHP] character replace function

2002-02-14 Thread Andrey Hristov
you want to remove a char at position $x. so $the_string = substr($the_string,0,$x).substr($the_string,$x+1,strlen($the_string)-1-$x); you can do some juggling in the second substr() with negative values for the parameters but they will not be more fast than this. Best regards, Andrey Hristov

[PHP] Sessions

2002-02-14 Thread Morten Nielsen
Hi, I try to use sessions to keep track if a user is logged in. I keep getting the following error: Warning: Cannot send session cache limiter - headers already sent (output started at f:\inetpub\wwwroot\2\admin\authuser.php:30) in f:\inetpub\wwwroot\2\auth.php on line 28 I use the session_start

[PHP] test php4win and apache

2002-02-14 Thread toni baker
I have downloaded and installed php4win(4.1.1) from www.php4win.com The URL http://localhost tells me that the Apache Web Server was installed successfully. What steps do I take from here to display a php 'Hello World' script in the browser? Do I need to modify httpd.conf?

[PHP] Re: center text on image

2002-02-14 Thread J Smith
If you're using GD2, try looking at ImageTTFBox() and ImageFTBox(). They'll give you the coordinates for a bounding box around the text. Use them in relation to the image to center it properly. J Adrian Murphy wrote: > I was wondering if it's possible to centre text precisely on > an image

Re: [PHP] character replace function

2002-02-14 Thread Aaron Gould
Try: $outputstring = str_replace($character_to_erase, '', $inputstring); -- Aaron Gould [EMAIL PROTECTED] Web Developer - Original Message - From: "Phil Schwarzmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 14, 2002 1:38 PM Subject: [PHP] character replace

[PHP] character replace function

2002-02-14 Thread Phil Schwarzmann
I need a function that will erase a particular character in a string. Any ideas?!? THANKS

RE: [PHP] Books on PHP

2002-02-14 Thread Michael R @ Spy
For learning PHP, I liked "PHP Essentials" by Julie Meloni. -Mike > -Original Message- > From: Chris Lott [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 2002 12:28 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] Books on PHP > > > > I am new to PHP and was wondering if anyon

[PHP] Re: [PHP-DEV] Newbie help w/ dynamic variables

2002-02-14 Thread Andrey Hristov
you can create variables dinamically like that $counter=0; foreach ($some_arr as $key=>$value){ $("your_dyn_var".$counter}="some html code"; $counter++; } So if you have 5 iterations you will have in the namespace new 5 variables : from $your_dyn_var0 to $your_dyn_var4 When you want to

Re: [PHP] Php is serversided????

2002-02-14 Thread John Meyer
Two ways this is possible: 1. The user has selected an item and hit the submit button, thereby sending everything to the server and it is working there. 2. The user comes in from a different link, different server, or has a cookie on their machine. - Original Message - From: "Morten Niel

Re: [PHP] VERY novice question!

2002-02-14 Thread Andrey Hristov
They are && and ||, also there are "AND" and "OR" case insesitive. But you have to know taht && and "and" have different place in the precedence table. The same is for || and "or". But This is very rare case to rely on the precedence. if((($m[0]=="-")&&($count<2))||($count++"0")) this seems ok

RE: [PHP] VERY novice question!

2002-02-14 Thread Johnson, Kirk
Just go with your instincts, you got 'em ;) &&, AND for "and" ||, OR for "or". The symbols are at one precendece level higher than the words, I believe. Kirk > -Original Message- > From: brendan conroy [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 14, 2002 10:47 AM > To: [EMAIL

[PHP] VERY novice question!

2002-02-14 Thread brendan conroy
Thanks for reading this! This is a really novice question but I cant find any info about this in the online manual. I would be grateful if someone could email me the PHP equivalent of the "&&"(AND) and "||"(OR) operators which are used in C. I'am trying to write if statements like if((($m[0]==

Re: [PHP] Store array into mysql?

2002-02-14 Thread Andrey Hristov
Hi, if you want to save an array and the structure is not known when you make the database schema definition, you have to serialize(), put the string in the DB, and when you restore it from the DB do unserialize(). Best regards, Andrey Hristov "Back from the exams hellReady to help again.

Re: [PHP] Store array into mysql?

2002-02-14 Thread DL Neil
Hi Jan > I have an array called $myarray and now I want to store it in a mysql table. > I tried to just, insert into mytable values('$id', '$myarray') but just got > Array when I run > while ($row = mysql_fetch_array ($result)) > $myarray= $row[myarray]; > echo $myarray > -- > Do I need to first

Re: [PHP] session problem

2002-02-14 Thread Andrey Hristov
What do you mean : "session persist"? Whe you close the browser the file(the most common case) is not deleted till the session expires. So if the expire time is 30 min it will stay in the /tmp for minimum 30 mins(the session garbage collector is not started on every request). The cookie which is

RE: [PHP] Books on PHP

2002-02-14 Thread Chris Lott
> I am new to PHP and was wondering if anyone can point me the right > direction > with > PHP urls and books In the past few months I have received nearly all of the PHP books that have been written (I wanted to evaluate possible books for some classes) and I think all of the entry-level/beginne

  1   2   >