[PHP] Multiple browser instances - is it possible to determine which browser?
We have an application framework that tidies up application session variables as you traverse from page to page. It works really nicely - until a user opens up 2 instances of a browser. Our code cannot distinguish between different browser instances, so browser instance 2 causes our application session vars for browser instance 1 to be cleared out. We've toyed with many ideas and short of forcing a unique hidden value to be 'POST'ed to every page from every page we don't have an elegant solution. Is there any other way that we could do this? Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Multiple browser instances - is it possible to determine which browser?
We've considered using javascript but cannot think of a way that would work. Take a simple example, 2 browsers - opened separately, pointing at different pages. We thought that we could set some property of each instance of the browser to a unique value (i.e. the window name). We would only need to do it once, when entering the site. But, when a new page is loaded there is no way from PHP to grab this unique value, unless it has been sent to the loaded page as a GET or POST variable. This would mean that we would have to pass this value to every page as a GET or POST variable. GETs are problematic, leaving us with POSTs only. But POSTING to every page is a pain. Is there any other way? -Original Message- From: Dennis Moore [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 15:28 To: Neil Kimber; [EMAIL PROTECTED] Subject: Re: [PHP] Multiple browser instances - is it possible to determine which browser? You may consider the use of Javascript to control the parent and child windows and frames of your application. /dkm - Original Message - From: Neil Kimber [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 04, 2002 9:51 AM Subject: [PHP] Multiple browser instances - is it possible to determine which browser? We have an application framework that tidies up application session variables as you traverse from page to page. It works really nicely - until a user opens up 2 instances of a browser. Our code cannot distinguish between different browser instances, so browser instance 2 causes our application session vars for browser instance 1 to be cleared out. We've toyed with many ideas and short of forcing a unique hidden value to be 'POST'ed to every page from every page we don't have an elegant solution. Is there any other way that we could do this? Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Multiple browser instances - is it possible to determine which browser
How would that help directly in PHP? PHP cannot interrogate framesets or other attributes of the browser. I could see this working if we had javascript that wanted to keep track of which browser instance is being handled. But from PHP I don't see how this could work. PHP can interrogate the browser to some extent (i.e. to ask for the browser name/version etc..), I guess that what we are looking for is some property of the browser that we can set that PHP can also pickup, or some unique id for a browser instance. -Original Message- From: LuC . [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 15:46 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Multiple browser instances - is it possible to determine which browser Create a frame set. if your page opens without frameset the did something wrong, at least not allowed. (like open in a new window) If the main page, containing the frameset is loaded, the page is opened in a new window or they pressed f5(reload). === We've considered using javascript but cannot think of a way that would work. Take a simple example, 2 browsers - opened separately, pointing at different pages. We thought that we could set some property of each instance of the browser to a unique value (i.e. the window name). We would only need to do it once, when entering the site. But, when a new page is loaded there is no way from PHP to grab this unique value, unless it has been sent to the loaded page as a GET or POST variable. This would mean that we would have to pass this value to every page as a GET or POST variable. GETs are problematic, leaving us with POSTs only. But POSTING to every page is a pain. Is there any other way? -Original Message- From: Dennis Moore [mailto:[EMAIL PROTECTED]] Sent: 04 March 2002 15:28 To: Neil Kimber; [EMAIL PROTECTED] Subject: Re: [PHP] Multiple browser instances - is it possible to determine which browser? You may consider the use of Javascript to control the parent and child windows and frames of your application. /dkm - Original Message - From: Neil Kimber [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 04, 2002 9:51 AM Subject: [PHP] Multiple browser instances - is it possible to determine which browser? We have an application framework that tidies up application session variables as you traverse from page to page. It works really nicely - until a user opens up 2 instances of a browser. Our code cannot distinguish between different browser instances, so browser instance 2 causes our application session vars for browser instance 1 to be cleared out. We've toyed with many ideas and short of forcing a unique hidden value to be 'POST'ed to every page from every page we don't have an elegant solution. Is there any other way that we could do this? Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Meld je aan bij de grootste e-mailservice wereldwijd met MSN Hotmail: http://www.hotmail.com/nl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: How to get a stacktrace? (was how to get a function backtrace)
There is no native PHP function for getting a stack trace. This has been discussed many times on the PHP-DEV mailing list. It has always been discarded due to an unacceptable overhead that would be introduced into the parsing process. I'm not sure if any decision has been made with respect to the Zend 2 engine, you may want to make a request there ([EMAIL PROTECTED]). -Original Message- From: Stefan Rusterholz [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 10:39 To: PHP Subject: Re: [PHP] Re: How to get a stacktrace? (was how to get a function backtrace) hmmm, i spent now a lot of time searching for such a function (discovering many many to me unknown but interesting functions :) - but it seems that there is no such function. And yes: I wanted to use it for debugging stuff. I have a lot of recursive functions and callback functions and it's sometimes incredibly hard to determine when exactly an error happened because I don't know the how maniest instance of a function actually is running and from where it got called. I have made some workarounds, but they are all unsatisfying compared to the possibilities a stacktrace function would offer... Just to give you a little impression what perl has got for such things (and i'd love to see that or something similar in PHP) an extract from the manual: caller EXPR caller Returns the context of the current subroutine call. In scalar context, returns the caller's package name if there is a caller, that is, if we're in a subroutine or eval or require, and the undefined value otherwise. In list context, returns ($package, $filename, $line) = caller; With EXPR, it returns some extra information that the debugger uses to print a stack trace. The value of EXPR indicates how many call frames to go back before the current one. ($package, $filename, $line, $subroutine, $hasargs, $wantarray, $evaltext, $is_require, $hints, $bitmask) = caller($i); Here $subroutine may be (eval) if the frame is not a subroutine call, but an eval. In such a case additional elements $evaltext and $is_require are set: $is_require is true if the frame is created by a require or use statement, $evaltext contains the text of the eval EXPR statement. In particular, for an eval BLOCK statement, $filename is (eval), but $evaltext is undefined. (Note also that each use statement creates a require frame inside an eval EXPR) frame. $hasargs is true if a new instance of @_ was set up for the frame. $hints and $bitmask contain pragmatic hints that the caller was compiled with. The $hints and $bitmask values are subject to change between versions of Perl, and are not meant for external use. Furthermore, when called from within the DB package, caller returns more detailed information: it sets the list variable @DB::args to be the arguments with which the subroutine was invoked. Be aware that the optimizer might have optimized call frames away before caller had a chance to get the information. That means that caller(N) might not return information about the call frame you expect it do, for N 1. In particular, @DB::args might have information from the previous time caller was called. - Original Message - From: Martin Wickman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 10:24 AM Subject: [PHP] Re: How to get a function backtrace? Stefan Rusterholz wrote: Im not sure if function-backtrace is the correct word for what I need, so I'll explain: If I have for example What you are looking for is a stacktrace, ie the stack of called functions. Dunno if php has any support for it, but it is normally used when debugging and error/exception handling. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: PHP vs. ASP
You should probably consider ASP.NET. Visual Studio .NET is out in early Feb and ASP.NET makes an enormous leap in functionality. It should almost be considered a new web development environment. It allows development in any CLR compliant language (straight VB.NET, C#, managed C++ etc..) It cleanly separates UI and program logic Has better OO implementation than PHP Has easier web design (web forms) Has embedded state managment (run at server tags for form fields) Allows for easily extending and creating .NET complient form controls For me the biggest attraction is the ability to use and mix and match any CLR compliant language. You can now develop a windows client app and as long as you cleanly separate the business layer from the UI layer you can re-use the same business layer in your web apps. Indeed MS are currently working on the Universal Canvas, which 'may' lead to re-usable windows/web UIs. Big downside? Has to run on MS platform. -Original Message- From: Stephen Abshire [mailto:[EMAIL PROTECTED]] Sent: 09 January 2002 17:27 To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: PHP vs. ASP I agree about not starting a war between PHP and ASP. We already have one going on that is out of hand between Linux and Windows :-) I do think it is up to how you view things. When I think of support being native I think of that meaning that something can perform a task using only its own internal capabilities. So in the case of PHP and say Oracle this would mean that PHP could connect to and utilize data in an Oracle database using only functionality that is built into PHP itself. But if you look at http://www.php.net/manual/en/ref.oci8.php you will find that you need to install the Oracle 8 Client Libraries if you want to use the Oracle 8 PHP functions. So is this really native support? You can make your own decision on that one :-) I am a professional web application developer and the consulting firm I work for leans heavily toward the Microsoft side so I am very familiar with ASP. I also do PHP on the side and have had one assignment doing PHP on my job. * My personal preference is PHP because the language is so elegant and I like the cross-platorm aspect of PHP as well. * PHP seems to be supported MUCH better than ASP. * The PHP development cycle is more current. * Possibly the biggest thing I like about PHP over ASP is dynamic includes. Those developers out there know what I mean about this one. Including a file dynamically say from a database field or some other approach. Believe it or not this really opens up a lot of doors in your development. Just my personal opinions and you will find probably everyone on this list will have their own. But that is fine too. It my be best to look at the problem to be solved then choose the platform and language that will best solve it. Original Message Follows From: Philip Hallstrom [EMAIL PROTECTED] To: Robert Klinkenberg [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: [PHP] Re: PHP vs. ASP Date: Wed, 9 Jan 2002 08:51:40 -0800 (PST) I don't want to start a war, but last time I looked PHP had native support for every database I'd ever heard of including Oracle, SQLServer, etc... Just don't want the guy doing the report that php is database limited... On Wed, 9 Jan 2002, Robert Klinkenberg wrote: Well, I personally prefer PHP over ASP because better support from webhosting companies, but ASP has some good points. This is especially the case if you can setup the complete hosting environment yourself and have some money to spend. First of all databases. PHP has support for a limited but interesting list of databases, especially the support for mysql and postgres is handy for a webserver. On the other hand, ASP has good support for most bussiness servers (ORACLE MS SQL Server,) with OLE-DB and a lot more databases with ODBC. The development tools. Definately a win for ASP (with vb.net C# and C++ you have a complete IDE and with Dreamweaver Ultradev you can pretty much point and click. SO you can choose whatever tool you like. PHP has very limited IDE's. Price. ASP solutions are mostly build with Windows 2000 Server and MS SQL Server or Oracle and an expensive IDE. So it's pretty expensive to build. PHP is mostly used with Linux, Apache and MySQL and is a lot cheaper (you only need to buy the hardware and the software is virtually free) Programming language: This is off course a personal taste but with ASP (.net) you can use VB/C++/C#. So if you are used to VB or C++ it's a bit easier to start with. Modules. Both have a lot of free tools available. However I personally find the PHP modules more usefull. (With the exception of the Crystal Report generator in .net, pretty usable reports without a lot of work). It's a bit easier for a novice to get started with ASP as with PHP, and it's
RE: [PHP] Variable definitions...
BTW, the official explanation is wrong. local part this variable is destroyed and declared again is incorrect. The global variable is not destroyed. The local namespace pushes the variable name onto the stack and gives it a value for the duration of the function. Every time you try and access this variable it is taken from the stack by the parser. Once you exit the function the local namespace is destroyed and all the local variables are popped from the stack. If the call stack is in the Global area then all variabels are accessed from the heap, so your original variable (and its original value) are still accessible. -Original Message- From: Chris Hobbs [mailto:[EMAIL PROTECTED]] Sent: 13 November 2001 17:09 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Variable definitions... Hi Stephan, IMHO, I think the answer requested is the only one that really makes sense - as soon as I read it, _my_ first thought went to scope. If a variable changes values, the other value is no longer usable, and thus there aren't really two variables with the same name in that case. When comparing global to local scope, however, you can definitely have the same name in use in two places. Of course, I wasn't a CS major, so someone else might be able to give you an answer that will help you justify yours - but prima facie, you got it wrong :( Now, if you're talking about the compiler level, then no two variables (which are actually memory registers at this point, iirc) can share the same memory space with different values - this is just logically impossible. But the question is certainly referring to source code, and so scope is the only reasonable answer. HTH! Stephan wrote: Hello, first of all I didn't exactely know where the right place is to ask this question. Well, my problem is that I just had some exams and am very unhappy on how certain things were rated. There's especially one question and I try to translate it as exact as possible: When is it possible that two variables have the same name but display different variables? The official solution was when in a script a global variable is declared and then in a local part this variable is destroyed and declared again with the same name (maybe even using different data type). As for me, I'm of the opinion that this definition according to the question is too narrow minded. I think that a variable is already different if the the value within the variable is changed due to script OR if you appoint a new value to the variable OR if the variable is an array and some elements are accessed / elements are added / elements are removed. The reason why I think variables with different values can be considered as different variable according to the question asked in the exam is that when you declare a variable it also has a value even if this value is NULL. Now I'd like very much to hear your opinion on this issue since for me very much depends on that (3 years of studying at college). Stephan P.S.: If you agree with me or not can you also send me an email to me? [EMAIL PROTECTED] -- ___ ____ _ Chris Hobbs / \ \/ / | | |/ ___\| __ \ Head Geek| (___ \ \ / /| | | | (___ | | | | WebMaster \___ \ \ \/ / | | | |\___ \| | | | PostMaster) | \ / | |__| |) | |__| | \/\/\/ \/|_/ http://www.silvervalley.k12.ca.us [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Protecting variables and functions? Like C#
Private variables will be included in Zend 2.0 (99% likely) From what I've seen private functions will not be included. Protected (ala Java/C#) variables and functions aren't being considered yet. -Original Message- From: Jason Stechschulte [mailto:[EMAIL PROTECTED]] Sent: 19 September 2001 15:13 To: Emile Bosch Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Protecting variables and functions? Like C# On Wed, Sep 19, 2001 at 03:24:31PM +0200, Emile Bosch wrote: thanks tim, but do you know wheter they are gonna implement such a feature cuz that's somethgin that the language actually must have to become really professional or somethign. The language is already quite professional. Yes a feature like that would be nice in the eyes of many people, but saying it is a must and is needed to make the language professional is quite a joke. -- Jason Stechschulte [EMAIL PROTECTED] -- 'Course, that doesn't work when 'a' contains parentheses. -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] I need everyones opinon!
Not sure I fully understand you. I'm assuming that you mean that you prefix each member method with a particular string that relates to the class. By doing this you lose a key strength of OOP. Namely the ability to write polymorphic code. In effect, you would not be able to do the following: class A { function print() { print(A); } } class B { function print() { print(B); } } $arrObjects[1]= new A(); $arrObjects[2]= new B(); foreach ($arrObjects as $key-$value) { $value-print();// This is the polymorphic piece - the object type is decided at run-time } If you methods were called A_print() and B_print() then you would not be able to build generic code as above. -Original Message- From: Scott Mebberson [mailto:[EMAIL PROTECTED]] Sent: 09 August 2001 08:20 To: [EMAIL PROTECTED] Subject: [PHP] I need everyones opinon! Hi Guys, When naming classes and function's within the class(and even functions(probably more so?)) do you use a common string infront of everything? For example HM_function_name() The reason I am asking is because what if you want to easily intergrate a class/function with lots of other classes/function and then you find out there is two with the same name? Any thoughts on this would be good! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] oop thingie
Not sure about your code, but what you describe is perfectly faesible in PHP. If you are setting values in one part of your code and cannot see these values in another part of your code then I would suggest that you have reference problem somewhere. The code you provided looks fine, maybe the problem is elsewhere. Alternatively you are looking in th ewrong place. You say that pets-dog-lostpets is always empty, yet your code seems to suggest that pets-dog is an array of objects, in which case you should be looking at pets-dog[n]-lostpets rather than pets-dog-lostpets. -Original Message- From: Jon Yaggie [mailto:[EMAIL PROTECTED]] Sent: 20 July 2001 12:15 To: [EMAIL PROTECTED] Subject: [PHP] oop thingie ok first of all i admit i am complete new to OOP. Secondly didnt write this script. but there is my problem i declare a class say dog. dog uses a constructor that has a few extra unassigned arrays. laster i declare a new instance of dog in another class (pets) i invoke the constructor and all is well with a few empty arrays as part of my object. but how can i put information in these arrays? can i do it through pet? for example can i make a member function in pet that goes soemthing like this - function wekkcount($id, $newpets) { $i=0; while($newpets[$i]) { $this-dog[$id]-lostpets[$i] = $newpets[$i]; $i++; } where this refers to class pets and dog is an instance of dog? i have been trying to all day and even though i know for sure $newpets has information in it. i always have an empty array in pets-dog-lostpets. i am starting to believe maybe i just cant do it. or maybe there is soemthing stupid i am missing? Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How is the management of memory by PHP?
Reference counting works in the following way. Normally, if you assign an identifier to the value of an instantiated object then the parser will create a copy of that object. That is, the parser will allocate a physical chunk of memory of the relevant size and copy the memory contents of the original object into this location, your new variable will refer to this new chunk of memory. Say you had something like: 1 $objA = new classA; 2 $objA-temp = 10; 3 4 $objB = $objA Line 4 will cause the allocation of memory and copying of the contents of $objA into this new memory area. $objB will refer to this new copy. Allocating memory and copying values into that memory space consumes resources (time, processor, memory space etc..). Reference counting works by putting of the allocation of memory until such a time as the new copy of the object is actually altered. So, say you have something like: 1 $objA = new classA; 2 $objA-temp = 10; 3 4 $objB = $objA 5 $objB-temp2 =20; At line 4 no new memory is allocated. Instead, both $objA and $objB refer to exactly the same instance of the object. The parser keeps a reference count to this object, in this case at line 4 it will contain a value of 2 (2 variables refering the same object). When an attempt is made to alter the contents of an object the parser checks the reference counter, if it is greater than one then it knows that it needs to create a copy. So, on line 5 the parser allocates some new memory and copies the object, $objB will then refer to this new object. Now, when a property of $objB is altered it does not affect $objA. Once the parser has created a new object for $objB it drops the reference counter for $objA to 1. This is particularly useful for when objects are passed by value to functions. Many functions do not actually change the contents of the object and just use the values inside it. Reference counting improves performance by saving resources involved in the creation of a new copy of an object. Hope this helps. Neil -Original Message- From: Luiz Fernando (Tuca) [mailto:[EMAIL PROTECTED]] Sent: 18 July 2001 08:16 To: [EMAIL PROTECTED] Subject: Re: [PHP] How is the management of memory by PHP? I would like to know like is the management, that recourses the php utlize. I am making a work to university and I need of more information. I find in www.zend.com a article about Reference Counting, but i stayed confuse, if o recourse is of PHP 4 or of ZEND Engine.. Thanks Luiz Fernando [EMAIL PROTECTED] escreveu nas notÃcias de mensagem:[EMAIL PROTECTED] Hi Luiz! On Tue, 17 Jul 2001, Luiz Fernando (Tuca) wrote: Somebody know how it is the management of memory by PHP? yes, it's quite well done :) what exactly are you interested in? -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Export to Excel
Dump to file as comma separated and then load into Excel. Excel reads comma separated files. In the file open dialog you can select file type to be .txt (csv). If you want to be really sick then you can set up an ODBC connection to a comma separated file and then use MSQuery inside Excel. Another alternative is to dump out your data to a webpage in an HTML table. Excel can link to the web page, just goto to Data-Get External Data-New Web Query. Select the URL and you're away. This is quite a cool feature as you don't have to send out updated files on a continual basis. Enjoy. -Original Message- From: Jorge Alvarez [mailto:[EMAIL PROTECTED]] Sent: 13 July 2001 17:58 To: [EMAIL PROTECTED] Subject: [PHP] Export to Excel One of my clients is requesting me to export some data from PHP-generated pages to MS Excel files. I have no clue on how to do such export with PHP. I'm using PHP/Apache/Linux Mandrake. What options do I have? Your help is very appreciated. Regards, Jorge Alvarez -- Let your screen saver contribute to cancer research. http://members.ud.com/vypc/cancer/ A new way to help. Sponsored by Intel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Excel
Probably not exactly the answer that you're looking for, but you can do the following. Output your data in PHP to a webpage that consists of purely a table of your data. Open Excel, go to : Data-Get External Data-New Web Query Type in the URL for the page with your data. Select which table you want to display (by name or number) Click OK, and hey presto! This spreadsheet can be saved, and anyone opening it can see the current results of the data from the webpage. -Original Message- From: Ron [mailto:[EMAIL PROTECTED]] Sent: 24 May 2001 15:51 To: [EMAIL PROTECTED] Subject: [PHP] Excel I was looking for a way to build a spreadsheet (Excel) dynamically with data from a table, and I was curious about doing it in PHP .. I prefer to use PHP, but I know in ASP it can be done. If I'm running PHP on Linux (can't use the COM functions), is there a way this can be done? Preferably starting with something like header(application/ms-excel...) or whatever the mime is - dunno off the top of my head, and just writing data? If there's no way to do this directly is it possible that by starting with this header and then sending a csv (comma separated) text page that excel will read it as a spreadsheet? Any help would be appreciated.. -Ron - [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Little question
A good approach to prevent this is to always put your constants on the lefthand side of the condition. This causes a parser error if you accidently try and assign instead of compare. It takes a bit of getting used to, but once you get into the swing of it you'll find it a useful tool in your arsenal of weapons against accidental bugs. So, the previous example would read: if ... == $myOra ... --- This is correct whereas: if ... = $myOra ... --- This would cause a parser error, you'd see the mistake immediately -Original Message- From: Philip Olson [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 10:23 To: Gabriele Biondo Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Little question this : if ... $myOra= ... should be more like : if ... $myOra == ... essentially you're setting $myOra as blank everytime which evaluates to true, then it ends up printing the blank, which is not good. regarding typos, this is a common one and since it reveals no error ... it can be frustrating! :) you have others but this is the big one. and for informational purposes : http://php.net/manual/en/control-structures.php http://php.net/manual/en/language.operators.comparison.php regards, philip I have this little snippet of code: ? $myOra=MY STRING ? if (!(empty($myOra) || $myOra=)){ ? br table width=550 border=0 align=center tr bgcolor=ff td colspan=3font size=2bOrario:/b?print($myOra)?/font/td /tr /table ? } endif ? It should print a little table with the string MY STRING... ... unfortunately, it doesn't. Any suggestion BTW: I run this code on the following configuration: PHP Version: 4.0.4pl1 MySQL API version: 3.23.22-beta Server API: httpd on a RHLinux 7.1 Thanks in advance Gabriele Biondo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] class inheritance question
yes, as will: Class C extends B{ function cc(){ $this-bb();// Will this work ? -- YES $this-aa(); } } -Original Message- From: py [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 14:02 To: [EMAIL PROTECTED] Subject: [PHP] class inheritance question Hello, Class A{ function aa(){} } Class B extends A{ function bb(){ $this-aa();// I know this is ok } } Class C extends B{ function cc(){ $this-bb();// Will this work ? } } py -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] print_r style array content
Try: function getStringFromObj($prmObjIn) { ob_start(); var_dump($prmObjIn); $output = ob_get_contents(); ob_end_clean(); return $output; } I grabbed this from user comments somewhere on php.net. It works a treat. -Original Message- From: Chien-pin Wang [mailto:[EMAIL PROTECTED]] Sent: 18 April 2001 05:02 To: [EMAIL PROTECTED] Subject: [PHP] print_r style array content Dear All, I wonder if there is a php function that could return content of an array, in print_r style, as a string. I need to get it and send as debug information. If not, is there a workaround or alternative, other than writing a function? Many thanks. Chien-pin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Release of PHP 4.05
Heard whispers that it could be next week. Testing isn't over. They're on the 6th release candidate. -Original Message- From: Dominique Paquin [mailto:[EMAIL PROTECTED]] Sent: 05 April 2001 19:54 To: [EMAIL PROTECTED] Subject: [PHP] Release of PHP 4.05 Greetings! Anyone knows when PHP 4.05 is supposed to be released? Dominique Paquin galea secured networks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] New buzz SOAP?
SOAP stands for Simple Object Access Protocol. It's the XML version of RPC/RMI. It's actually a specification that describes how interfaces from different systems can communicate with each other. It's called an IDL (Interface Definition Language). This is going to be big because it is a very large part of the new Microsoft .NET strategy. In essence it will enable everyone and everything to talk together without worrying about hardware, software or OS's incompatibilities (well, that's the theory, anyway). Of course, I'm sure that MS will make their own non-open extensions and tie everyone into their Worldgrin. The best thing about SOAP is the sense of humour of the designers. Part of the SOAP toolkit is called the Remote Object Proxy Engine, this is responsible for the consumption of dispatching of SOAP messages. So, you get SOAP on a ROPE! -Original Message- From: Paulson, Joseph V. "Jay" [mailto:[EMAIL PROTECTED]] Sent: 03 April 2001 17:29 To: 'Stewart Taylor'; 'Brandon Orther'; '[EMAIL PROTECTED]' Subject: [PHP] New buzz SOAP? Hello everyone- Here at work I'm hearing this new buzz word about SOAP and people are asking me if PHP can work with SOAP. Well first of all if any of you know the answer to this please let me know because I am clueless. Thanks, Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] New buzz SOAP?
Java rocks. Personally I'm not a fan of MS. However, I saw a sneak preview of .NET in action last July and was astonished by the possible potential for this. There are many aspects of .NET, SOAP being just one of them. I saw code being written in a single GUI development environment where VB called C# called COBOL(??!? I'm serious here). The code was debugged in a single debugger and jumped seamlessly from line to line across different languages. Calling a function/method in a different language was as simple as scrolling through MS's intellisense dropdowns, you don't even need to know what language the relevant function is written in. ASP has been converted to run with the .NET common language runtime(CLR), meaning that you can write ASP in any language compatible with the CLR (i.e. VB, C#, COBOL, umpteen other languages currently being converted). Most cool was the way in which you can create web services. This is where SOAP comes into play. By tagging a function in a CLR compatible language with a 'web service' tag the function becomes exposed and available across the net to anyone else using SOAP development environments (admittedly only .NET at the moment). There were many, many oohs and aahs at the conference, from my position they were well deserved. I'm not a fan of MS but don't write them off. As a developer I haven't such a potential for a revolution since Windows 2.0 first came out. -Original Message- From: David VanHorn [mailto:[EMAIL PROTECTED]] Sent: 03 April 2001 17:59 To: Neil Kimber; Paulson, Joseph V. "Jay"; 'Stewart Taylor'; 'Brandon Orther'; [EMAIL PROTECTED] Subject: RE: [PHP] New buzz SOAP? This is going to be big because it is a very large part of the new Microsoft .NET strategy. In essence it will enable everyone and everything to talk together without worrying about hardware, software or OS's incompatibilities (well, that's the theory, anyway). Of course, I'm sure that MS will make their own non-open extensions and tie everyone into their Worldgrin. I can't count the number of times I've heard this promise.. Anyone remember how Java was supposed to take over the world? The best thing about SOAP is the sense of humour of the designers. Part of the SOAP toolkit is called the Remote Object Proxy Engine, this is responsible for the consumption of dispatching of SOAP messages. So, you get SOAP on a ROPE! Don't drop the SOAP! :) -- Dave's Engineering Page: http://www.dvanhorn.org Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Passing by reference deprecated?
I'm surprised. I would have thought that it would have been the other way around. Passing by reference should have similar implications to reference counting as used the Zend engine. It means that physical memory does not have to be allocated to passed variables (thereby saving resources in physical memory and time used in allocating and copying memory). In fact, because the Zend engine uses reference counting it will in effect use pass by reference for all parameters. In the case of a parameter passed as 'non-reference' it will only be allocated its own memory at a time that the parameter value is changed within the function. You can see a detailed explanation of how reference counting works here: http://www.zend.com/zend/art/ref-count.php I am not familiar with the parser source, so these are purely my thoughts on my understanding of the parser behaviour. I'd be interested to hear of other peoples views. -Original Message- From: Yasuo Ohgaki [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 10:08 To: [EMAIL PROTECTED] Subject: Re: [PHP] Passing by reference deprecated? FYI Unless you need to modify and return modified contents of variables, pass by reference makes script execution a little slower under PHP4. -- Yasuo Ohgaki ""Neil Kimber"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Pass by reference itself is not deprecated, just call-time pass-by-reference. I believe this means your calling line of code being prevented from specifying that it should be invoked as pass-by-reference. So, function NormalPassByRefence($prmValue) { $prmValue ++; } $numValue=1; NormalPassByRefence($numValue); // This will still work // $numValue =2 at this point function CallTimePassByRefence($prmValue) { $prmValue ++; } $numValue=1; CallTimePassByRefence($numValue); // This will no longer work - it's been deprecated // $numValue =1 at this point -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 04:40 To: [EMAIL PROTECTED] Subject: [PHP] Passing by reference deprecated? set_value($variable,$value) { $variable=value; } "Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. " When did passing by reference get deprecated? The documentation at http://php.net/manual/en/language.references.pass.php doesn't suggest what to do instead--in fact, it uses an example like the syntax above. So my next question is: would using a return value or declaring a global be the (only) other options? TIA -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Arrays : Key in Array, True/False
You need a 2 step approach. 1. extract the keys from your array into another array using array_keys() 2. check the result using in_array() to see if you key exists. -Original Message- From: Knut H. Hassel Nielsen [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 10:56 To: [EMAIL PROTECTED] Subject: [PHP] Arrays : Key in Array, True/False Hi there I have a script with a function that builds a more comprehensive kind of array for parsing arguments given a script in PHP (this is a backup-script I'm currently working on). My problem is in "THE PARSING OF ARGS PART" when I'm asking the array if the key exists in the array it returns 0. The key exists, I know because of the output from the function ( var_dump($array) ), but the function 'in_array()' only returns true if I ask for a value. Does anyone know if I can use anything else to give me the possibility to also ask for the keys, or do I have to write a 'in_array()'-kind of function myself ?? #! /local/bin/php -q ?PHP // -*- C++ -*- function parse_arg( $argv, $argc ) { $array = Array(); for ( $i = 0 ; $i $argc ; $i++ ) { if ( ereg( "-", $argv[ $i ] ) ) { if ( ereg( "-", $argv[ $i + 1 ] ) ) { $array[ "$argv[$i]" ] = ""; } else { $array[ "$argv[$i]" ] = $argv[ $i + 1 ]; $i = $i + 1; } } } var_dump ($array); return $array; } // THE PARSING OF ARGS PART $arr = parse_arg( $argv, $argc ); if ( in_array( "-h", $arr ) ) { // This doesnt work print $usage; exit; } elseif ( in_array( "-b", $arr ) ) { // This doesnt work $backup = 1; } elseif ( in_array( "-d", $arr ) ) { // This doesnt work while ( list ( $key, $val ) = each ( $arr ) ) { if ( $key == "-d" ) { if ( $val == "" ) { print "No PATH to switch \"-d\"\nExiting\n"; exit; } else { $dir = $val; if ( !is_dir( $dir ) ) { print "This directory [$dir] doesnt exist\n"; exit; } else { $run = 1; } } } } } ? -- Knut -- Knut H. Hassel Nielsen Principal Engineer / Avdelingsingenir Norwegian University of Science and Technology / NTNU Department of Computer and Information Science / IDI N-7491 Trondheim, Norway Phone Office / Telefon jobb : (+47) 73 59 18 46 Fax Office / Telefax jobb : (+47) 73 59 17 33 Cell. Phone / Mobiltelefon : 91 59 86 06 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Passing by reference deprecated?
Pass by reference itself is not deprecated, just call-time pass-by-reference. I believe this means your calling line of code being prevented from specifying that it should be invoked as pass-by-reference. So, function NormalPassByRefence($prmValue) { $prmValue ++; } $numValue=1; NormalPassByRefence($numValue); // This will still work // $numValue =2 at this point function CallTimePassByRefence($prmValue) { $prmValue ++; } $numValue=1; CallTimePassByRefence($numValue); // This will no longer work - it's been deprecated // $numValue =1 at this point -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: 30 March 2001 04:40 To: [EMAIL PROTECTED] Subject: [PHP] Passing by reference deprecated? set_value($variable,$value) { $variable=value; } "Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. " When did passing by reference get deprecated? The documentation at http://php.net/manual/en/language.references.pass.php doesn't suggest what to do instead--in fact, it uses an example like the syntax above. So my next question is: would using a return value or declaring a global be the (only) other options? TIA -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is there way how to get line number from which function was called ???
No. You could pass the constant __LINE__ to your function, but I assume that you want this feature to be generically available within all functions. If you really want to be able to track your call-stack then you'd be better off using a development environment like the Zend IDE and debugger. Alternatively you could request a function to the PHP developers mailing list that would return an array containing the current call-stack. You can register your own error handler and assert handler - these guys receive the calling LINE as a parameter. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Milan Mlynarcik Sent: 28 March 2001 14:43 To: [EMAIL PROTECTED] Subject: [PHP] Is there way how to get line number from which function was called ??? Is there way how to get line number from which function was called ??? Milan Mlynarcik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Dynamic constant names
You need another level of indirection. Try: $constant_value = $$constant_name ; -Original Message- From: Geoff Caplan [mailto:[EMAIL PROTECTED]] Sent: 27 March 2001 14:19 To: PHP General List Subject: [PHP] Dynamic constant names Hi folks I am trying to create a constant name dynamically and then get at the value. // We set up the constant define( CONSTANT_1 , "Some value" ) ; // Later we try to use it dynamically ... $constant_number = 1 ; $constant_name = ( "CONSTANT_" . $constant_number ) ; // We try to assign the constant value to a variable... $constant_value = $constant_name ; But we find that $constant value still contains the NAME of the constant, and not the VALUE. Am I misunderstanding something? Is there any way that this can be done? Thanks Geoff Caplan Caplan Associates -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Creating tree using table?
This is a big topic. I'll be brief. This all depends upon your data structure. There are a couple of ways that you can store information like this. The classic (purist) method would be to have a table of the following type: table_Tree Node ID | Parent ID | Node Data ==+===+== 1 |0 | xxx 2 |1 | xxx 3 |1 | xxx This describes a tree where node 1 is the top (parent id = 0) and has 2 children (nodes 2 and 3). This approach can be used to describe any depth of tree with any number of child nodes. You then need to decide how to represent this in PHP. You could create a node class that contains a collection of child nodes, a reference to the parent node and the node data. You could then construct a physical representation of your tree in PHP. You could then write some routines to traverse your tree and count depth level of any particular node. Alternatively, you could store the data in the db table in the same way in PHP (as an array) and then write some routines to traverse your array. Both approaches are valid and work. You would have to write the code to count the depth of a node. You could also store you information in the database as: table_Tree Node ID | Depth | Node Data ==+===+== 1 |0 | xxx 2 |1 | xxx 3 |1 | xxx 4 |0 | xxx Making the assumption that the rows are ordered correctly. By reading row-by-row you can assume that if a following row is at a lower depth or the same, then you are in the same branch of the tree. As soon as the depth is at a higher level then you have traversed back up a branch. You can store this representation directly in PHP in arrays and then write some routines to render/handle your tree however you like. This approach will give you a depth level directly, however, it's not as 'nice' as the first types of trees as it relies upon order rather than strong relationships with child nodes. Your choice. Hope that helps, Neil -Original Message- From: E K L [mailto:[EMAIL PROTECTED]] Sent: 23 March 2001 08:29 To: [EMAIL PROTECTED] Subject: [PHP] Creating tree using table? Hi all, Currently, i'm trying to write a program which is related to tree manipulation. Meaning that, i'll search the tree to get level or count how many child exist for particular parent, for example. Initially i planned to use table to represent all kind of datas that are parent, left child and right child. However, i still face problem in calculating the level of the tree. So, can any one gives me an idea on how to manipulate the table so that i will be able to count the level? Your prompt reply is much appreciated. Thanks E K _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Editing Variables from another script.
Do you mean that you want to alter the physical contents of 'database.inc'? This would require you parsing the existing file yourself, writing a new version of the file, altering the relevant line of code, removing the original file and renaming your new file to the original filename. This isn't a good approach, are you sure there isn't a different way for you acheive your aims? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 10:02 To: Stewart Taylor; [EMAIL PROTECTED] Subject: Re: [PHP] Editing Variables from another script. I think you didn't get what I meant, I need a script such that I can change the content of database.inc from an external script (form or whatever) - Original Message - From: "Stewart Taylor" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 5:57 PM Subject: RE: [PHP] Editing Variables from another script. include "database.inc" . . . . $dbhost='localhost'; -Stewart -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 09:26 To: Jason Stechschulte Cc: 'PHP General List. (E-mail)' Subject: Re: [PHP] Editing Variables from another script. Okay, basically, I'm trying to create a script such that it will change the variables inside of my .inc page. Something like lets say I have this file called "database.inc" Inside it I have : $dbhost = 'blah' $dbuser= 'blah' $dbpass= 'blah' I would like to make a script such that I can modify the $variables into something else like, $dbhost into localhost. How can it be done? - Original Message - From: "Jason Stechschulte" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED] Sent: Monday, March 19, 2001 11:03 PM Subject: Re: [PHP] Editing Variables from another script. On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote: I'm trying to create a form whereby I can edit the variables with just the form. It will be something like a form for me to change the database details(username,server,password) in a .inc I'm using. Is there anyway for me to pass information into another file's variable and have it saved in there? If anyone have seen Newspro (CGI) before, when you edit some parts in a form, the information will be saved. How can it be done in PHP? There is probably a hundred or more ways this can be done. For me to be able to give you specifics, you will have to be more specific with what you are doing and what you have tried. -- Jason Stechschulte [EMAIL PROTECTED] -- Well, I think Perl should run faster than C. :-) -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Editing Variables from another script.
It depends upon what your overall aim actually is. If you want a different value depending upon where this file is being used in your site, then you should probably just set the value accordingly in that part of the site. i.e. include "database.inc" . . . . $dbhost='localhost'; If you want a different value in the same place based upon a different 'user' or other criteria, then you should probably write some logic to handle the situation. i.e. include "database.inc"; if (MYCRITERIA) { $dbhost='localhost'; } The only reason that I can think of for you wanting to change the physical file would be if you are writing some code to generate a release for different users. In which case, you'll probably want to build a parser and use some kind of templating system. Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 14:08 To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED] Subject: Re: [PHP] Editing Variables from another script. What other ways might there be ? - Original Message - From: "Neil Kimber" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; "Stewart Taylor" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 6:10 PM Subject: RE: [PHP] Editing Variables from another script. Do you mean that you want to alter the physical contents of 'database.inc'? This would require you parsing the existing file yourself, writing a new version of the file, altering the relevant line of code, removing the original file and renaming your new file to the original filename. This isn't a good approach, are you sure there isn't a different way for you acheive your aims? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 10:02 To: Stewart Taylor; [EMAIL PROTECTED] Subject: Re: [PHP] Editing Variables from another script. I think you didn't get what I meant, I need a script such that I can change the content of database.inc from an external script (form or whatever) - Original Message - From: "Stewart Taylor" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 5:57 PM Subject: RE: [PHP] Editing Variables from another script. include "database.inc" . . . . $dbhost='localhost'; -Stewart -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 09:26 To: Jason Stechschulte Cc: 'PHP General List. (E-mail)' Subject: Re: [PHP] Editing Variables from another script. Okay, basically, I'm trying to create a script such that it will change the variables inside of my .inc page. Something like lets say I have this file called "database.inc" Inside it I have : $dbhost = 'blah' $dbuser= 'blah' $dbpass= 'blah' I would like to make a script such that I can modify the $variables into something else like, $dbhost into localhost. How can it be done? - Original Message - From: "Jason Stechschulte" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED] Sent: Monday, March 19, 2001 11:03 PM Subject: Re: [PHP] Editing Variables from another script. On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote: I'm trying to create a form whereby I can edit the variables with just the form. It will be something like a form for me to change the database details(username,server,password) in a .inc I'm using. Is there anyway for me to pass information into another file's variable and have it saved in there? If anyone have seen Newspro (CGI) before, when you edit some parts in a form, the information will be saved. How can it be done in PHP? There is probably a hundred or more ways this can be done. For me to be able to give you specifics, you will have to be more specific with what you are doing and what you have tried. -- Jason Stechschulte [EMAIL PROTECTED] -- Well, I think Perl should run faster than C. :-) -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mai
RE: [PHP] Easy Object Reading
If you don't want to dump this to the screen but would prefer to have this in a string (to send to a log file etc..) then use the following function: function getStringFromObject($prmAryIn) { // Following code was ripped from http://www.php.net/manual/en/function.var-dump.php // it's very nice indeed!! ob_start(); var_dump($prmAryIn); $output = ob_get_contents(); ob_end_clean(); return $output; } -Original Message- From: Grant Walters [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 14:08 To: Php-General Cc: Thorsten Viel Subject: RE: [PHP] Easy Object Reading -Original Message- From: Thorsten Viel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 21 March 2001 00:59 To: [EMAIL PROTECTED] Subject: [PHP] Easy Object Reading Hi, does somebody know a function where I can read all variables of an object independent of there name? I have to test with large classes, more than 30 vars per class, and dont want to implement a function just for testing. I want to echo all values of vars of a class without specifyieng explicitly every single varname. var_dump(PHP3 = 3.0.5, PHP4 ) Dumps information about a variable void var_dump (mixed expression) This function returns structured information about an expression that includes its type and value. Arrays are explored recursively with values indented to show structure. Compare var_dump() to print_r(). 1 2 pre 3 ?php 4 $a = array (1, 2, array ("a", "b", "c")); 5 var_dump ($a); 6 ? 7 /pre 8 Regards Grant Walters Brainbench 'Most Valuable Professional' for Unix Admin Walters Associates, P O Box 13-043 Johnsonville, Wellington, NEW ZEALAND Telephone: +64 4 4765175, CellPhone 025488265, ICQ# 23511989 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Editing Variables from another script.
Gotya. The why not limit your include file to only contain those values that are important to you. So you get something like: varsdatabase.inc $dbhost="x"; $dbuser="y"; $dbpass="z"; Then, in your PHP code you just rewrite this simple file. That way you don't have to worry about parsing files etc... Just delete the existing varsdatabase.inc and build a new one from scratch. It's no longer difficult because it's only 3 lines long. $dbhost='localhost'; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 14:26 To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED] Subject: Re: [PHP] Editing Variables from another script. Basically, thats not what I'm going to do. I'm making an administrative script such that admins can change the location and values of the $dbhost, $dbuser, $dbpass in the database.inc with just a form. Kinda tough eh ? - Original Message - From: "Neil Kimber" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; "Stewart Taylor" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 10:25 PM Subject: RE: [PHP] Editing Variables from another script. It depends upon what your overall aim actually is. If you want a different value depending upon where this file is being used in your site, then you should probably just set the value accordingly in that part of the site. i.e. include "database.inc" . . . . $dbhost='localhost'; If you want a different value in the same place based upon a different 'user' or other criteria, then you should probably write some logic to handle the situation. i.e. include "database.inc"; if (MYCRITERIA) { $dbhost='localhost'; } The only reason that I can think of for you wanting to change the physical file would be if you are writing some code to generate a release for different users. In which case, you'll probably want to build a parser and use some kind of templating system. Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 14:08 To: Neil Kimber; Stewart Taylor; [EMAIL PROTECTED] Subject: Re: [PHP] Editing Variables from another script. What other ways might there be ? - Original Message - From: "Neil Kimber" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; "Stewart Taylor" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 6:10 PM Subject: RE: [PHP] Editing Variables from another script. Do you mean that you want to alter the physical contents of 'database.inc'? This would require you parsing the existing file yourself, writing a new version of the file, altering the relevant line of code, removing the original file and renaming your new file to the original filename. This isn't a good approach, are you sure there isn't a different way for you acheive your aims? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 10:02 To: Stewart Taylor; [EMAIL PROTECTED] Subject: Re: [PHP] Editing Variables from another script. I think you didn't get what I meant, I need a script such that I can change the content of database.inc from an external script (form or whatever) - Original Message - From: "Stewart Taylor" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 20, 2001 5:57 PM Subject: RE: [PHP] Editing Variables from another script. include "database.inc" . . . . $dbhost='localhost'; -Stewart -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 09:26 To: Jason Stechschulte Cc: 'PHP General List. (E-mail)' Subject: Re: [PHP] Editing Variables from another script. Okay, basically, I'm trying to create a script such that it will change the variables inside of my .inc page. Something like lets say I have this file called "database.inc" Inside it I have : $dbhost = 'blah' $dbuser= 'blah' $dbpass= 'blah' I would like to make a script such that I can modify the $variables into something else like, $dbhost into localhost. How can it be done? - Original Message - From: "Jason Stechschulte" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: "'PHP General List. (E-mail)'" [EMAIL PROTECTED] Sent: Monday, March 19, 2001 11:03 PM Subject: Re: [PHP] Editing Variables from another script. On Sun, Mar 18, 2001 at 01:06:34PM +0800, [EMAIL PROTECTED] wrote: I'm trying to create a form whereby I can edit the variables with just the form. It will be something like a form for me to change the database details(username,server,password) in a .inc I'm using. Is there anyway for me to pass
RE: [PHP] Objectclass
see http://www.php.net/manual/en/function.get-class.php -Original Message- From: Thorsten Viel [mailto:[EMAIL PROTECTED]] Sent: 20 March 2001 17:33 To: [EMAIL PROTECTED] Subject: [PHP] Objectclass Hi, first thanks for your help on my last thread. Another question. Is there a function what specifies the class of an object? for example: class test { blabla } $object = new test; any_function($object) results "test" thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Can PHP for Oracle randomly access rows in a result set?
The OCIFetchStatement() function returns a resultset to PHP that is actually a multi-dimensional array. You can randomly access this array however you like. -Original Message- From: Thies C. Arntzen [mailto:[EMAIL PROTECTED]] Sent: 19 March 2001 10:43 To: Andrew Halliday Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Can PHP for Oracle randomly access rows in a result set? On Mon, Mar 19, 2001 at 01:19:44PM +1030, Andrew Halliday wrote: Can PHP for Oracle randomly access rows in a result set? I have read documentation for both Oracle functions (ora_*) and Oracle 8 functions (OCI_*) but cant seem to find a way to randomly access rows in a result set like you can with PostgreSQL or MySQL ... whats the story here?! Are we FORCED to access the result set sequentially with an Oracle database? Is that a restriction of the DB or PHP? that's an oracle restriction. tc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] sending SMS messages via PHP
Errrm, no easy solution. You should either find an SMS gateway connection that can receive formatted emails, convert them and post them (at a charge to you), or go the whole hog and get yourself a connection to an SMSC via http. I would suggest you pursue the first approach as the second is only viable if you're intending to set yourself up as an SMS business. As an example, check out http://www.cygnet.co.uk/sms/ I've never used this company, but they're the first one I clicked on after searching for EMAIL SMS GATEWAY Hope this helps, Neil -Original Message- From: Michael Smith [mailto:[EMAIL PROTECTED]] Sent: 07 March 2001 17:00 To: [EMAIL PROTECTED] Subject: [PHP] sending SMS messages via PHP I can easily send standard email messages via PHP. Does anyone know how to send SMS messages? -- Michael A. Smith [EMAIL PROTECTED] Director of Data Systems, wcities.com ICQ: 35884415 :wq -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Is it possible to get call stack information?
Is there anyway within PHP to get a complete dump of the call-stack? I can't use the Zend debugger for technical reasons (awaiting bug fix before it will work in our environment). I'd love to have a call that would return an array of call stack info. to the current line. Thanks, Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Caller's __LINE__
Better still - use the set_error_handler() to define an error handler that will output your debug statement and create your dbug message using trigger_error(). Your registered error_handler will automatically receive line number, file name and some other useful parameters. -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: 28 February 2001 09:37 To: [EMAIL PROTECTED] Subject: Re: [PHP] Caller's __LINE__ In article 97ifmk$p85$[EMAIL PROTECTED], [EMAIL PROTECTED] ("elias") wrote: function debuginfo($msg) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } in my code: line 1 line 2 line x: debuginfo("hello!!!"); is there is anyway to show the caller's line number? in this case 'x' ? Pass __LINE__ to the function as one of its arguments: function debuginfo($msg, __LINE__) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] redefine constants
define() gives you a literal copy of the value of the second parameter. In this case your second parameter is __LINE__. The value of __LINE__ represents the current line number of the define statement. Once defined the value assigned remains constant, irrespective of whether or not __LINE__ changes later on. You could 'redefine' the value - but you'd just get the line number of the redefinition. You really want a reference (pointer) to the __LINE__ constant, however, you can't have references to constants. So, you just plain can't do it. If you think about it, this is a pain only with the parser 'constants', you wouldn't need a reference to your own constants as they never change. -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: 28 February 2001 16:13 To: [EMAIL PROTECTED] Subject: [PHP] redefine constants why can't I redefine __LINE__? like define(LN,__LINE__); it's a rather big constant to put in code to generate my error messages, I was thinking more of L, or LN... but if I redefine it, it assumes the value of de redefine() line of code... so it's not really redefining a constant it's only atributing LN the value of __LINE__... and in the manual I saw examples where redefining constants were used... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Zend debugger running across virtual servers
I've got the Zend IDE and debugger up and running. But, the debugger isn't picking up my 'Local Value' for the include path. It only seems to have the 'Master Value'. Has anyone else experienced this? And more importantly, how do I get around this problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problems getting Zend IDE to run.
I'm running on Windows 2000. I've installed the JRE 1.3. I've installed the IDE I run the IDE I get: "Could not find the main class. Program will exit!" As far as I can tell the following appear to be true: There are no other installations of Java installed on the machine. My path doesn't point anywhere that seems problematic. The IDE files appear to have installed correctly. Does anyone have any ideas that I can try before I start pulling my hair out? Thanks, Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] when using die(), how can i get the line number that errored?
Rather than use die() why not use trigger_error() and have an error_handler registered with the parser. Firstly, create an error handler and register it - I use something like the following: function myErrorHandler($errno, $errstr, $errfile, $errline) { $locStrMessage = $errfile . " " . $errline . " " . $errno . " : " . $errstr; error_log($locStrMessage . "\r\n",3,'debug/debug.log'); } Register this in your autoprepend file using: set_error_handler("myErrorHandler"); Now, whenever you get an error it gets logged to your debug file with the file and line number. You can 'generate' errors using trigger_error() and pass it a string of information. You can use this method to catch absolute bad bugs and also to dump useful debug information. This is quiet an elementary implementation of good error handling, you can take this and extend it into quite a useful system for tracking bugs. You could add system flags for turning debug on and off, alter levels of debugging etc... regards, Neil p.s. assert() is cool too. -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: 30 January 2001 08:50 To: [EMAIL PROTECTED] Subject: Re: [PHP] when using die(), how can i get the line number that errored? function errtrapper($file, $line){ echo "In $file on line $lineBR\n"; #current body here. } die(errtrapper(__FILE__, __LINE__)); -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: "Noah Spitzer-Williams" [EMAIL PROTECTED] Newsgroups: php.general Sent: Monday, January 29, 2001 6:59 PM Subject: [PHP] when using die(), how can i get the line number that errored? here's my code: $res = mysql_query($badsqlstatement) or die(errtrapper()); inside errtrapper(), is there a way to find out what line this error occurred? thanks!! - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] passing arrays via forms ..
serialise it using serialize() - see under chapter 12 of the PHP manual 'Miscellaneous functions' -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 23 January 2001 12:42 To: PHP list Subject: [PHP] passing arrays via forms .. howdy again :) does anybody knwo how to pass an array via forms using something like input type=\"hidden\" name=\"client_services\" value=\"$client_services\" where $client_services is an array ? Hetni -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]