RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Steve Jackson
Ok this is starting to get complex! (For me anyway) This is my function: function get_order_numbers() { $conn = db_connect(); $query = select orders.orderid from orders, email where orders.orderid = email.orderid and email.checked='no'; $result = mysql_query($query) or die(Error: cannot select

[PHP] Javascript and PHP

2002-11-06 Thread vsv3
Hi. I'm not sure if is here where i have to ask this, but, if it's not i hope you say to me :D. Well the question is: i want to know how can i make to insert into the $_GET or $_POST arrays, an entry with a value from javascript. Thanks -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Ernest E Vogelsinger
At 09:52 06.11.2002, Steve Jackson said: [snip] function get_order_numbers() { $conn = db_connect(); $query = select orders.orderid from orders, email where orders.orderid = email.orderid and email.checked='no'; $result = mysql_query($query) or die(Error:

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
Michael, I like your idea, and had I designed this site, I would have the bitmask simmilar to what you suggest. However, I'm a contractor modding an existing/legacy site. Basically the way they have it, is that each user has a field in the db that is simply a string/mask of which books a person

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Ernest E Vogelsinger
At 10:18 06.11.2002, Daevid Vincent said: [snip] doesn't lend itself nicely to expansion, but may be my only way. I just have a gut feeling that it can be automated somehow. To turn 1,3,4 into 10110 seems like there is some 'math' there that can work. I also

Re: [PHP] *.PHP save-as dialog

2002-11-06 Thread Chris Hewitt
Lee, I think its the AddType line for php that you want to take out of the IfDefine HTH Chris Lee Philip Reilly wrote: Thanks for your reply. I took out the following lines, and restarted Apache, but I still have the same problem... /IfDefine IfDefine HAVE_PHP LoadModule

Re: [PHP] Javascript and PHP

2002-11-06 Thread Chris Hewitt
[EMAIL PROTECTED] wrote: Well the question is: i want to know how can i make to insert into the $_GET or $_POST arrays, an entry with a value from javascript. All the php processing (on the server) is complete before the javascript processing (on the client) commences, so you would need to

[PHP] Installation error with 4.2.3

2002-11-06 Thread Daniele Baroncelli
No one replied to this message yet. I am trying to address it again, as probably the previuos newsmessage title wasn't very descriptive. Thanks Daniele = Hi guys, I have very weird problem. I have installed the PHP version 4.2.3 on the LINUX virtual server of my web project.

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Jason Wong
On Wednesday 06 November 2002 16:52, Steve Jackson wrote: Ok this is starting to get complex! (For me anyway) This is my function: function get_order_numbers() { $conn = db_connect(); $query = select orders.orderid from orders, email where orders.orderid = email.orderid and

Re: [PHP] *.PHP save-as dialog

2002-11-06 Thread Jason Wong
On Wednesday 06 November 2002 01:50, Lee Philip Reilly wrote: Thanks for your reply. I took out the following lines, and restarted Apache, but I still have the same problem... /IfDefine IfDefine HAVE_PHP LoadModule php_module modules/mod_php.so /IfDefine IfDefine

[PHP] Foreach ...... Help

2002-11-06 Thread Remon Redika
I am Newbie in PHP My Problem It's Too Hard to Explain but i'll try its.. I have Two Text Fields The First Text Field i call it InputX, the amount of InputX is Constant, and The Second Text Field I Call it InputY, Generatable Field I have the Button usefull for Generated InputY (so If I Click

RE: [PHP] Foreach ...... Help

2002-11-06 Thread Jon Haworth
Hi Remon, I try this script with php, but i found an Error. It would be helpful if you could show us this error message. $vary(100); At the very least, you should change this line to $vary = array(); Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: MySQL GMT -- Local time

2002-11-06 Thread Pete
This might help http://www.mysql.com/doc/en/Date_and_time_functions.html Here is an example that uses date functions. The following query selects all records with a date_col value from within the last 30 days: mysql SELECT something FROM tbl_name WHERE TO_DAYS(NOW()) -

[PHP] Install mysql option without recompile PHP ?

2002-11-06 Thread Audrey bihouee
Hi, I already have the 4.2.2 PHP version running on my server. But it was compiled without mysql. I want to add this option to use mysql. Must I to recompile my PHP with mysql option, or is there a simpler solution ? Thanks a lot. *---* Audrey Bihouee INSERM U533 Faculté

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
So given the example below, 10110 means that the person can view books 1, 3, and 4, but not 2 or 5. dig? Explain that to me... I know binary, but I can't see how that equates to 1, 3, and 4. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Session Handling

2002-11-06 Thread Uma Shankari T.
Hello, I have tried session handling..after starting the session i am trying to get the value by this command session_start(); echo $varname; but it is displaying this error.. Warning: Cannot send session cookie - headers already sent by (output started Can anyone tell me how to go

RE: [PHP] Session Handling

2002-11-06 Thread John W. Holmes
You must call session_start before any output to the browser. A blank line or space outside of PHP blocks is considered output. The error message tells you exactly where the output started. Read the manual for more information, it's all covered. ---John Holmes... -Original Message-

[PHP] Permissions

2002-11-06 Thread Shaun
Hi I want to make a secure site. The username , password and permission of the users must be stored in database. I only want certain icons (navigation bars) to be available to certain users. How would i be able to do this with permissions ? Thanks Shaun -- PHP General Mailing List

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Jon Haworth
Hi John, So given the example below, 10110 means that the person can view books 1, 3, and 4, but not 2 or 5. dig? Explain that to me... I know binary, but I can't see how that equates to 1, 3, and 4. Because you know binary :-) The above is a series of yes/no flags, not a binary

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
Hi John, So given the example below, 10110 means that the person can view books 1, 3, and 4, but not 2 or 5. dig? Explain that to me... I know binary, but I can't see how that equates to 1, 3, and 4. Because you know binary :-) The above is a series of yes/no flags, not a

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
That's the EASY part John! The hard part is converting the array (which was a checkbox array from a form submission) into the binary string (as per the original post) Here's the deal. Given an array such that: $purchitem[0] = 1; //purchased book #1 checkbox enabled $purchitem[1] = 3;

Re: [PHP] PHP driven frame

2002-11-06 Thread Marek Kilimajer
top frame: form target=bottom_frame action=show_form.php select name=form onChange=this.form.submit() option value= -- choose a form -- /option option value=form1 first form /option option value=form2 second form /option /select input type=submit /form bottom frame (show_form.php):

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
That's the EASY part John! The hard part is converting the array (which was a checkbox array from a form submission) into the binary string (as per the original post) Here's the deal. Given an array such that: $purchitem[0] = 1; //purchased book #1 checkbox enabled $purchitem[1] = 3;

Re: [PHP] how to do check boxes correclty?

2002-11-06 Thread Marek Kilimajer
Karl James wrote: Good Afternoon People I am trying to create a site where you can add/delete players From a roster So what I need help is how to automatically format the check Boxes to appear in every row use a table, name your checkboxes 'player[]' with value set to the player's id

Re: [PHP] undefined symbol: curl-global-init

2002-11-06 Thread Marek Kilimajer
Do you have libcurl intaled? Ernest E Vogelsinger wrote: Hi list, maybe someone has a simple answer to this: I am running Apache 1.3.22 with libphp4.so. Everything's fine, but when starting php from the command line I get: php: relocation error: php: undefined symbol: curl-global-init Any

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Marek Kilimajer
If I understand you, you need to have a basic class with the one function and subclass it. Then you can reference the array as $this-$passed_in_array_name John Kenyon wrote: I'm trying to write a function I can plop in a bunch of different classes without having to modify it. Basically I have

Re: [PHP] addslashes/stripslashes

2002-11-06 Thread Paul Dionne
thanks guys, got it working now. Removed Addslashes and it works fine. 1lt John W. Holmes wrote: I am trying to develop a search for my database. I used addslashes when entering the data, and then use addslashes with the search but nothing comes up: Select * from tblContacts,

[PHP] Socket Programming Problem

2002-11-06 Thread ªüYam
I have a web server and want to make it as a file provider... Works similiar to the BBSHowever, the problem is appeared... How can I trigger the user to download those file while they requested?? What can i do after fsock_open() ? thx a lot -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
Ernest, close but you have it reversed for my needs (i.e. true binary form). Notice that my LSB is to the left, not right. As Evan Nemerson pointed out to me, the decbin(), bindec(), Dec2Bin() and Bin2Dec() functions shed some light. What I need is the equivillant functions but with a way to flip

Re: [PHP] Permissions

2002-11-06 Thread Marek Kilimajer
You can use array with the user permissions (stored in a session variable), and use it someway like if($_SESSION['perm']['do_that']) echo 'a href=do_that.phpDo that/a'; Shaun wrote: Hi I want to make a secure site. The username , password and permission of the users must be stored in

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Daevid Vincent
Oooh! I think you're on to something there. Nice! Hey, what's the symbol for? I see in the manual the is a reference (like a pointer in C I assume), but I can't find the explained. if($purchitem[$y] == $x) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Session Handling

2002-11-06 Thread Uma Shankari T.
On Wed, 6 Nov 2002, John W. Holmes wrote: JWHYou must call session_start before any output to the browser. A blank JWHline or space outside of PHP blocks is considered output. The error JWHmessage tells you exactly where the output started. Read the manual for JWHmore information, it's all

[PHP] ceil() function

2002-11-06 Thread Marcelo Garcia
I need a function that rounds up fractions (0.10) not an integer like ceil, or what parameters do I need to give to ceil() to round up fractions? I hope you understood me. Thanxs. MArcelo

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread John W. Holmes
Oooh! I think you're on to something there. Nice! Hey, what's the symbol for? I see in the manual the is a reference (like a pointer in C I assume), but I can't find the explained. if($purchitem[$y] == $x) It'll suppress warnings and errors. If the $purchitem does not have a key 4

RE: [PHP] ceil() function

2002-11-06 Thread John W. Holmes
I need a function that rounds up fractions (0.10) not an integer like ceil, or what parameters do I need to give to ceil() to round up fractions? I hope you understood me. Thanxs. Marcelo How about round()? www.php.net/round ---John Holmes... -- PHP General Mailing List

RE: [PHP] Session Handling

2002-11-06 Thread John W. Holmes
JWHYou must call session_start before any output to the browser. A blank JWHline or space outside of PHP blocks is considered output. The error JWHmessage tells you exactly where the output started. Read the manual for JWHmore information, it's all covered. Hello, Actually i have

Re: [PHP] PHP 4.3.0 and Zend Engine 2

2002-11-06 Thread Aaron Gould
I have read from various sources that Zend Engine 2 will make an appearance in PHP 5.0. It's a pretty significant update, and as such, I doubt it would be smart to implement it in the middle of a major series (4.x). Mind you, it's been a while since I've read anything on ZE2, so things may have

Re: [PHP] Installation error with 4.2.3

2002-11-06 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I think your problem has something to do with --enable-mbstr-enc-trans. I remember hearing about problems with that.check the archives(I think it was on PHP-DEV). HTH! ~Paul On Wednesday 06 November 2002 05:04 am, Daniele Baroncelli wrote:

[PHP] Re: Installation error with 4.2.3

2002-11-06 Thread Seung Hwan Kang
Are you aware of register_globals = off? It might be the problem. You can set register_globals = on in php.ini or you better use $_POST, $_GET, $_SERVER ... eg. $fname - $_POST[finame] or $_GET[fname] Daniele Baroncelli [EMAIL PROTECTED] wrote in message

Re: [PHP] Re: php4.2.2 remembers last GET and POST vars inHTTP_SESSION_VARS also

2002-11-06 Thread Alexander Piavka
but in the php.ini i have register_globals = on PHP 4.2.* has register_globals = off as a default. You variables has to be $_POST[fname] or $_POST[fname] or $_SERVER[PHP_SELF] etc., or you can simple incides one file eg. //extract.php ? extract($_SERVER); extract($_ENV);

RE: [PHP] xml

2002-11-06 Thread Jay Blanchard
[snip] What the hell is XML anyway? [/snip] Extensible Markup Language, a derivitave of SGML (Standard Generalized Markup Language). You can read all about it at http://www.w3c.org HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Grammar/how toes?

2002-11-06 Thread Jay Blanchard
[snip] Where is there a good place to learn How and what the ( ) means and what to put in qoautes Basically the right way to properly code? [/snip] If you want to learn PHP start with http://www.php.net . Also there are many good books on the subject of programming which illustrate many methods

RE: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Steve Jackson
On Wednesday 06 November 2002 16:52, Steve Jackson wrote: Ok this is starting to get complex! (For me anyway) This is my function: function get_order_numbers() { $conn = db_connect(); $query = select orders.orderid from orders, email where orders.orderid = email.orderid and

Re: [PHP] xml

2002-11-06 Thread Maxim Maletsky
Just read things here: http://www.phpbeginner.com/ray/xml http://www.vbxml.com/xml/articles/whatisxml/ http://www.zvon.org http://www.xml.com You should learn it if haven't done so yet -- Maxim Maletsky [EMAIL PROTECTED] Jay Blanchard [EMAIL PROTECTED] wrote... : [snip] What the hell is

[PHP] php and electronic pay system

2002-11-06 Thread Martin Hudec
Hello, does anyone have experience with implementation of electronic pay system for website based on PHP? Can you give me directions about this? -- Best regards, Martin Hudec mailto:corwin;corwin.sk -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] New to PHP, and stuck

2002-11-06 Thread Markus Jäntti
I'm working myself through Julie C. Meloni's book PHP and now I'm stuck at chapter 12. My script gives me this error: You have an error in your SQL syntax near '()' at line 1 even tho I've even tried replacing my own work with the file from the book's companion-files. I'd be very happy if someone

RE: [PHP] New to PHP, and stuck

2002-11-06 Thread Edward Peloke
I am not php expert but why are there two (( after your create table? -Original Message- From: Markus Jäntti [mailto:janmark;bodo.kommune.no] Sent: Wednesday, November 06, 2002 8:34 AM To: [EMAIL PROTECTED] Subject: [PHP] New to PHP, and stuck I'm working myself through Julie C.

Re: [PHP] undefined symbol: curl-global-init

2002-11-06 Thread Ernest E Vogelsinger
At 13:39 06.11.2002, Marek Kilimajer said: [snip] Do you have libcurl intaled? Ernest E Vogelsinger wrote: Hi list, maybe someone has a simple answer to this: I am running Apache 1.3.22 with libphp4.so. Everything's fine, but when starting php from the

[PHP] Re: New to PHP, and stuck

2002-11-06 Thread Erwin
Markus JäNtti wrote: I'm working myself through Julie C. Meloni's book PHP and now I'm stuck at chapter 12. My script gives me this error: You have an error in your SQL syntax near '()' at line 1 even tho I've even tried replacing my own work with the file from the book's companion-files.

RE: [PHP] New to PHP, and stuck

2002-11-06 Thread Edward Peloke
ok, nevermind, I think I see why... -Original Message- From: Edward Peloke [mailto:epeloke;echoman.com] Sent: Wednesday, November 06, 2002 9:20 AM To: Markus Jäntti; [EMAIL PROTECTED] Subject: RE: [PHP] New to PHP, and stuck I am not php expert but why are there two (( after your create

RE: [PHP] New to PHP, and stuck

2002-11-06 Thread Steve Bradwell
The first thing I do when confronted with this kind of problem is to print out the sql statement and carefully look through it. So if you have not done this yet, comment out the $result = statement. Above that add an echo $sql; Now look through the sql statement and make sure all fields are there

Re: [PHP] New to PHP, and stuck

2002-11-06 Thread 1LT John W. Holmes
Also, you should echo out $sql so you can see what is actually created. It will probably be obvious what the error is. ---John Holmes... - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: Markus Jäntti [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, November 06, 2002

Re: [PHP] session vs. header

2002-11-06 Thread huge junk mail
I think I have to re-explain the problem completely. I want to use this script in a login form. Once, someone is authenticated, then I register variables for indentifying him/her through session. After I register those variables I want to redirect him/her to a page, which required

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Ernest E Vogelsinger
At 13:43 06.11.2002, Daevid Vincent said: [snip] Ernest, close but you have it reversed for my needs (i.e. true binary form). Notice that my LSB is to the left, not right. Ah, ic, you want a string like 1100101 - that's easy :) Note that I do _not_ pass

Re: [PHP] php and electronic pay system

2002-11-06 Thread Ernest E Vogelsinger
At 14:50 06.11.2002, Martin Hudec said: [snip] Hello, does anyone have experience with implementation of electronic pay system for website based on PHP? Can you give me directions about this? [snip] Usually these

Re: [PHP] New to PHP, and stuck

2002-11-06 Thread Ernest E Vogelsinger
At 14:34 06.11.2002, Markus Jäntti said: [snip] $sql =CREATE TABLE $_POST[table_name] ((; [snip] If you are including an array expression within a string, you should enclose it in curly braces, like this: $sql

[PHP] php4.2.2 remembers last GET and POST vars in HTTP_SESSION_VARS also

2002-11-06 Thread Alexander Piavka
Hi, we have upgraded from php4.0.6 to php4.2.2 The problem is that php4.2.2 remembers last GET and POST vars in HTTP_SESSION_VARS also. This ruins the functionality of many programs we are running. both 4.0.6 and 4.2.2 were configured and compiled with exactly the same parameters and we are

[PHP] Re: php4.2.2 remembers last GET and POST vars in HTTP_SESSION_VARS also

2002-11-06 Thread Seung Hwan Kang
PHP 4.2.* has register_globals = off as a default. You variables has to be $_POST[fname] or $_POST[fname] or $_SERVER[PHP_SELF] etc., or you can simple incides one file eg. //extract.php ? extract($_SERVER); extract($_ENV); extract($_GET); extract($_POST); extract($_REQUEST); ? in your old

Re: [PHP] undefined symbol: curl-global-init

2002-11-06 Thread Marek Kilimajer
Ernest E Vogelsinger wrote: At 13:39 06.11.2002, Marek Kilimajer said: [snip] Do you have libcurl intaled? Ernest E Vogelsinger wrote: Hi list, maybe someone has a simple answer to this: I am running Apache 1.3.22 with libphp4.so. Everything's

Re: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Tom Rogers
Hi, Wednesday, November 6, 2002, 2:56:33 PM, you wrote: DV Does anyone know of a nice efficient way to convert an array of values DV into a mask... DV Here's the deal. Given an array such that: DV $purchitem[0] = 1; DV $purchitem[1] = 3; DV $purchitem[2] = 4; DV I want to end up with a

RE: [PHP] How do I convert an array into a mask?

2002-11-06 Thread Ford, Mike [LSS]
-Original Message- From: Daevid Vincent [mailto:daevid;daevid.com] Sent: 06 November 2002 12:23 To: [EMAIL PROTECTED] That's the EASY part John! The hard part is converting the array (which was a checkbox array from a form submission) into the binary string (as per the

Re: [PHP] undefined symbol: curl-global-init

2002-11-06 Thread Marek Kilimajer
Where does ldd libphp4.so point to? Ernest E Vogelsinger wrote: At 15:41 06.11.2002, Marek Kilimajer spoke out and said: [snip] Yes, I have (located in /usr/lib). With the apache module, as I said, PHP works, even curl calls. I'm not really a Linux

Re: [PHP] undefined symbol: curl-global-init

2002-11-06 Thread Ernest E Vogelsinger
At 16:25 06.11.2002, Marek Kilimajer spoke out and said: [snip] Where does ldd libphp4.so point to? [snip] Oops: # ldd libphp4.so ldd: ./libphp4.so: No such file or directory I found libphp4.so in /etc/httpd/modules

Re: [PHP] session vs. header

2002-11-06 Thread dwalker
What I've done : 1. Allow the user to login 2. Use the login.php page as its own 'form action' 3. Let the login form decide when to redirect the user to the 'destination' page. 4. force the destination page (welcome.php) to do additional authentication checking by comparing the users input to some

Re: [PHP] undefined symbol: curl-global-init

2002-11-06 Thread Ernest E Vogelsinger
At 16:25 06.11.2002, Marek Kilimajer spoke out and said: [snip] Where does ldd libphp4.so point to? [snip] Been too fast when hitting the reply button... # ldd /etc/http/modules/libphp4.so libdl.so.2 =

Re: [PHP] session vs. header

2002-11-06 Thread dwalker
I believe the php code gets executed before html code is processed. -Original Message- From: dwalker [EMAIL PROTECTED] To: huge junk mail [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, November 06, 2002 10:44 AM Subject: Re: [PHP] session vs. header What I've

Re: [PHP] Javascript and PHP

2002-11-06 Thread Tom Rogers
Hi, Wednesday, November 6, 2002, 2:52:31 AM, you wrote: vaue Hi. I'm not sure if is here where i have to ask this, but, if it's vaue not i hope you say to me :D. vaue Well the question is: i want to know how can i make to insert into vaue the $_GET or $_POST arrays, an entry with a value from

Re: [PHP] Help me learn! with an explanation of these two functions.

2002-11-06 Thread Jason Wong
On Wednesday 06 November 2002 21:46, Steve Jackson wrote: It doesn't contain a single result. It returns 16 order numbers (which is correct - 8 should be in the table emails with no checked and therefore the query has worked and pulled out 8 from the orders table also). What I want the

[PHP] Converting variables to integer

2002-11-06 Thread drparker
I have a bunch of form variables that I need to process as integers. The problem is that some users are writing in values with commas - e.g. 100,000, and that isn't read as an integer. There's more than one variable so I don't want to have to do a string replace for each one. Is there a general

[PHP] Running functions as other than nobody

2002-11-06 Thread Davíð Örn Jóhannsson
I need to chmod files which are owned by a nother user than nobody with a php script runing from a browser. lets say i have a file called image.gif and I want to chmod(“imgage.gif”, 0777); and I want to run it as user: myuser with passwd: passwd. Can I do this? Regards, David

Re: [PHP] Running functions as other than nobody

2002-11-06 Thread Marco Tabini
There was actually a brief thread about this last night. If you're using Apache, you could look into suexec--this may or may not be a possibility depending on the degree of control that you have on your server. Marco -- php|architect - The magazine for PHP Professionals The first

[PHP] publishing php mysql website on cd-rom

2002-11-06 Thread ROBERT MCPEAK
My organization has a need to publish some of our web content on a CD-ROM. I'm in search of suggestions on how to publish our dynamic content (php/mysql templates) in some sort of runtime configuration that would let users browse the site from cd. What's involved with this? Is there such a

Re: [PHP] publishing php mysql website on cd-rom

2002-11-06 Thread Marco Tabini
That would be a bit difficult--you would have licensing issues, particularly with MySQL, unless you actually distribute the sources. Would publishing all the files in static format be an option? -- php|architect - The magazine for PHP Professionals The first monthly worldwide

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
Thank you for replying, but I don't think I've made my problem clear enough. Let me give it another shot. What I want is a function that takes the name of an array as a parameter so that it can be popped into any class that has arrays in it and work without modification. The problem I am

Re: [PHP] publishing php mysql website on cd-rom

2002-11-06 Thread .: B i g D o g :.
That is going to be very hard to do...you might want to look at doing it all static...however, what are u going to do about the database connections... IMHO, i would take the php site and make it static and then put it on a CD-ROM...it might be out of date, however, it might be the fastest way

Re: [PHP] publishing php mysql website on cd-rom

2002-11-06 Thread John Wards
I dunno if its an old wives tail but I have heard that you can get apache/mysql and php running from a CD. You would of course need to turn off all logging etc. Do a bit off google bashing. John On Wednesday 06 Nov 2002 9:50 am, .: B i g D o g :. wrote: That is going to be very hard to

Re: [PHP] publishing php mysql website on cd-rom

2002-11-06 Thread Maxim Maletsky
Theoretically it is possible, but fact stays - you won't ever make it work well. So, try to find an alternative for this. Usually, this choice is made by the managers that know nothing about how webcontent works. -- Maxim Maletsky [EMAIL PROTECTED] ROBERT MCPEAK [EMAIL PROTECTED] wrote... :

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
You can do: ${this-$passed_in_array_name} not sure right now of the correct syntaxing, I never do that - normally I'd pass the element key. -- Maxim Maletsky [EMAIL PROTECTED] John Kenyon [EMAIL PROTECTED] wrote... : Thank you for replying, but I don't think I've made my problem clear

Re: [PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-06 Thread Tom Rogers
Hi, Wednesday, November 6, 2002, 2:50:42 PM, you wrote: EN -BEGIN PGP SIGNED MESSAGE- EN Hash: SHA1 EN I'm trying to get XSLT working with PHP, and after slowly working my way EN through several other problems, I've found one that I can't figure out. EN Software: EN PHP 4.2.3 EN Apache

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
Thanks, that may be what I was looking for. jck Maxim Maletsky wrote: You can do: ${this-$passed_in_array_name} not sure right now of the correct syntaxing, I never do that - normally I'd pass the element key. -- Maxim Maletsky [EMAIL PROTECTED] John Kenyon [EMAIL PROTECTED] wrote... :

Re[2]: [PHP] generically accessing member variables problem

2002-11-06 Thread Tom Rogers
Hi, Thursday, November 7, 2002, 3:11:12 AM, you wrote: MM You can do: ${this-$passed_in_array_name} MM not sure right now of the correct syntaxing, I never do that - normally MM I'd pass the element key. MM -- MM Maxim Maletsky MM [EMAIL PROTECTED] MM John Kenyon [EMAIL PROTECTED] wrote...

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
Tom Rogers [EMAIL PROTECTED] wrote... : Amazing what you learn on this list :) This works: class Example { var $array1 = array(); var $array2 = array(); var $array3 = array(); function add2array($array_name,$val){ $this-{$array_name}[] = $val; } } $t = new

[PHP] Code Advice

2002-11-06 Thread Jason Young
I (think I) have come up with an interesting little solution for pages that have/can potentially have a lot of get vars, and I just wanted to throw it by everyone to see if I know what I'm talking about... Instead of having a whole bunch of ... if (isset($_GET['var'])) $var = $_GET['var'] ..

Re[2]: [PHP] generically accessing member variables problem

2002-11-06 Thread Tom Rogers
Hi, Thursday, November 7, 2002, 3:45:34 AM, you wrote: MM Yet, this is not a such elegant way doing it. It can be helpful in a lot MM of cases, but most often, element key is enough. Try rethinking your MM logic: MM class Example { MM var $array = array(); MM function

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
Tom Rogers [EMAIL PROTECTED] wrote... : Hi, Thursday, November 7, 2002, 3:45:34 AM, you wrote: MM Yet, this is not a such elegant way doing it. It can be helpful in a lot MM of cases, but most often, element key is enough. Try rethinking your MM logic: MM class Example { MM

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
See below: MM class Example { MM var $array = array(); MM function add2array($element_name, $val){ MM $this-$array[$element_name] = $val; MM } MM } MM $t = new Example(); $t-add2array('array1',25); $t-add2array('array2',26); $t-add2array('array3',Hello); MM echo 'pre';

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread Maxim Maletsky
You pass it the name of the element, and whatever the data inside. You do not need to add other sub-elements to it automatically, as you would need to be searching through the elements later for the right data. Whatever your need is - it's a good idea using arrays, and add other arrays into it.

Re: [PHP] publishing php mysql website on cd-rom

2002-11-06 Thread ROBERT MCPEAK
It's a database site, containing thousands of records, similar to a products catalog like Amazon, for example. Publishing as static pages is not a viable option, and would greatly limit the search functionality. There must be a way to do this! Thanks for all the feedback. Maxim Maletsky

Re: [PHP] Code Advice

2002-11-06 Thread Kevin Stone
The method that you have described below is going to produce a numerical Key which is going to result in several errors. -Kevin - Original Message - From: Jason Young [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 06, 2002 10:52 AM Subject: [PHP] Code Advice I (think

RE: [PHP] Code Advice

2002-11-06 Thread Ford, Mike [LSS]
-Original Message- From: Kevin Stone [mailto:kevin;helpelf.com] Sent: 06 November 2002 18:32 The method that you have described below is going to produce a numerical Key which is going to result in several errors. Huh? What on earth does this mean? -Kevin - Original

Re: [PHP] Converting variables to integer

2002-11-06 Thread Kevin Stone
function str2int($str) { $str = str_replace(',', $str); // http://www.php.net/manual/en/function.str-replace.php settype($str, integer); // http://www.php.net/manual/en/function.settype.php if (is_int($str)) // http://www.php.net/manual/en/function.is-int.php return $str;

Re: [PHP] Code Advice

2002-11-06 Thread Ernest E Vogelsinger
At 18:52 06.11.2002, Jason Young spoke out and said: [snip] I (think I) have come up with an interesting little solution for pages that have/can potentially have a lot of get vars, and I just wanted to throw it by everyone to see if I know what I'm talking

Re: [PHP] Code Advice

2002-11-06 Thread Kevin Stone
All I have to go by is what I see. The method was this.. ? $get_allow = array('foo', 'bar', 'add', 'takeovertheworld'); while (list($key,$val)=each($get_allow)) { if (isset($_GET[$key])) $$key = $val; } ? The array $get_allow has numerical indicies. Looping through that in the

Re: [PHP] Converting variables to integer

2002-11-06 Thread Marek Kilimajer
This should work for you, this recursive function loops the array, if it gets array again, calls itself function convert2int($var) { foreach($var as $k = $v ) { if(is_array($v)) { $var[$k]=convert2int($v); } else { $var[$k]=str_replace(',',$v); } }

RE: [PHP] Code Advice

2002-11-06 Thread Ernest E Vogelsinger
At 19:50 06.11.2002, Ford, Mike [LSS] spoke out and said: [snip] -Original Message- From: Kevin Stone [mailto:kevin;helpelf.com] Sent: 06 November 2002 18:32 The method that you have described below is going to produce a

Re: [PHP] Converting variables to integer

2002-11-06 Thread Kevin Stone
Ooops my str_replace() function needs one more parameter. str_replace(',', '', $str); -Kevin - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, November 06, 2002 11:45 AM Subject: Re: [PHP] Converting variables to integer

RE: [PHP] Code Advice

2002-11-06 Thread Ford, Mike [LSS]
-Original Message- From: Kevin Stone [mailto:kevin;helpelf.com] Sent: 06 November 2002 18:50 To: [EMAIL PROTECTED] Subject: Re: [PHP] Code Advice All I have to go by is what I see. The method was this.. ? $get_allow = array('foo', 'bar', 'add', 'takeovertheworld'); while

RE: [PHP] Code Advice

2002-11-06 Thread Ford, Mike [LSS]
-Original Message- From: Ernest E Vogelsinger [mailto:ernest;vogelsinger.at] Sent: 06 November 2002 18:49 To: [EMAIL PROTECTED] Subject: Re: [PHP] Code Advice Ever had a headache with posted parameters, as to where to look for the value, in _GET or _POST? Try this:

Re: [PHP] Code Advice

2002-11-06 Thread Maxim Maletsky
look well through the code you posted, it had a bug :) But we got your idea - it can be a solution for limiting input. Yet, you need to also know a way to unset unwanted variables. That can only be done by accessing $_GET or $HTTP_GET_VARS (if GET method). -- Maxim Maletsky [EMAIL PROTECTED]

Re: [PHP] generically accessing member variables problem

2002-11-06 Thread John Kenyon
I am not really sure I understand what you are saying here, and I would like to. Let me first say that I think the syntax you came up with earlier will solve my immediate problem, but if I could design this in a better way I'd like to know. Let me give you a few more details: I have a large

  1   2   >