Re: [PHP] Authentication Question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 14-01-02 at 09:48 * Ben Clumeck said I am new to MySQL and PHP. I am wondering how Authentication through PHP and MySQL. How does a username and password now where to take that user? An example is online banking. You enter your account number for (username) and your password. How does it know where to go for your specific account? I am looking to create a system similar to online banking. I appreciate your help. Start by having a look at the crypt() function in the manual then check out www.phpbuilder.com www.devshed.com for articles relating to this topick. (I seem to remember there being a couple on one or both of those sites) - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8Qp7rHpvrrTa6L5oRAm1kAJ0epBcWeDdJBHg3DlS32nqe1vyEWgCfbmGD HIH+FMlUCRb8DDIDLLYhYXY= =GUQE -END PGP SIGNATURE- -- 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] 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]
Re: [PHP] Setting up an XML platform/website
Is anyone interested in setting up an XML platform for PHP, where the use of XML is explained, with sample PHP/XML applications and in-depth real live tutorials? Since lot's of people underestimate the power of XML. Maybe, it's nice to be ready when Microsoft's dotNet crashes in and launches an new XML era. Anyone wants to help building such an platform/website? I used the XML parser in a credit card authorisation front end i wrote. Both the info to and from the credit card server was in XML and i used PHP to both build and parse the XML. I dont mind writing a tutorial on what I did, it works well but not sure how proficient it was in using XML. -- -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key -- 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: 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]
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]
[PHP] Passing variables with include()
Hi all, at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server. I have read in the php manual that [quote] When a file is include()ed, the code it contains inherits the variable scope of the line on which the include() occurs. Any variables available at that line in the calling file will be available within the called file. If the include() occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function. [/quote] But for some reason, i simply do not get the script to work. I use a form in the local script to determine which standings are to be shown, and the value is stored in $serie_id. This is done in the main scope (no function used). $serie_id can be 2, 3 or 4. Then I make an include call to the remote script: include(http://www.someremote.server/calculate_drivers.php;); In that remote script I use $serie_id to make a database query. But so far, the query fails because $serie_id is not known. Are there any known exceptions (f.i. specific server settings) that might explain why the variable is not known on the remote server? Thanks in advance! -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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 variables with include()
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 14-01-02 at 13:01 * Imar de Vries said Hi all, Hello! at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server. But for some reason, i simply do not get the script to work. I use a form in the local script to determine which standings are to be shown, and the value is stored in $serie_id. This is done in the main scope (no function used). $serie_id can be 2, 3 or 4. Then I make an include call to the remote script: include(http://www.someremote.server/calculate_drivers.php;); In that remote script I use $serie_id to make a database query. But so far, the query fails because $serie_id is not known. Are there any known exceptions (f.i. specific server settings) that might explain why the variable is not known on the remote server? Thanks in advance! -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 Are you absolutely certain that the var is being set properly? Try printing it to the screen just before you call the script. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QspAHpvrrTa6L5oRAistAKCmkjCwFRXf57JBwRn2gA65vyr6EACgiOqu kmrKG/BaSZtyMcaIUa/xWT8= =X8wX -END PGP SIGNATURE- -- 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] Re: Passing variables with include()
include(http://www.someremote.server/calculate_drivers.php;); Very simple really: You cannot include remote files... --|-- Tino Didriksen http://ProjectJJ.dk/ -- 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 variables with include()
- Original Message - From: Imar de Vries [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 12:53 PM Subject: [PHP] Passing variables with include() Hi all, at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server. I have read in the php manual that [quote] When a file is include()ed, the code it contains inherits the variable scope of the line on which the include() occurs. Any variables available at that line in the calling file will be available within the called file. If the include() occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function. [/quote] But for some reason, i simply do not get the script to work. I use a form in the local script to determine which standings are to be shown, and the value is stored in $serie_id. This is done in the main scope (no function used). $serie_id can be 2, 3 or 4. Then I make an include call to the remote script: include(http://www.someremote.server/calculate_drivers.php;); I'd make a bet (I haven't tried it) that you receive the file already parsed and so as pure html. Try it with the extension .txt or something that the remote webserver doesn't process before it outputs the content. In that remote script I use $serie_id to make a database query. But so far, the query fails because $serie_id is not known. Are there any known exceptions (f.i. specific server settings) that might explain why the variable is not known on the remote server? Thanks in advance! -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 best regards Stefan Rusterholz -- 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: Passing variables with include()
Sure you can. Right out from the manual: If URL fopen wrappers are enabled in PHP (which they are in the default configuration), you can specify the file to be include()ed using an URL instead of a local pathname. See Remote files and fopen() for more information. best regards Stefan Rusterholz - Original Message - From: Tino Didriksen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 1:53 PM Subject: [PHP] Re: Passing variables with include() include(http://www.someremote.server/calculate_drivers.php;); Very simple really: You cannot include remote files... --|-- Tino Didriksen http://ProjectJJ.dk/ -- 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] open a New Window
Hi to everybody I wonder if is posiblle to open a new predefined size window (new html page) with php code. Thanks in advance for your time. Best Regards Simos
[PHP] Creating rich interfaces for web applications??
Hi folks I have been looking for a practical way to create rich dynamic forms in the client using PHP, and would appreciate any pointers to workable approaches. With the launch of .Net I suspect that customer expectations are going to change, and good old plain HTML will begin to look dated. I am thinking of client-side functionality such as lists that can sort and filter, cascading dropdowns, drag and drop, validation in the client that is double-checked on the server etc etc. I am doing quite large and complex applications, so there is no way to code the client side stuff by hand - I need some kind of dynamic library. This is for intranet use, so I will be able to specifiy the browser verion to be used, and any plugins required. There seem to be all kinds of technologies emerging, but most of them are either too immature, too slow (such as Flash based solutions - see www.carels.com), or are based on Java. For all its shorcomings, some kind of XML/DHTML solution seems best, and I guess it will improve as Browsers catch up with CSS2. I have spotted a very nice Java/Tomcat solution, for example (see isomorphic.com), which shows what can be done. But the only DHTML/PHP library I can find is dynapi, which looks promising but is still a bit limited so far as functionality goes and the documentation is kinda thin. Do any of you folks know of a workable way to do this - either commercial or open source?? Any pointers would be much appreciated Geoff Caplan. -- 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] Re: Passing variables with include()
A lot of different answers, which I will respond to: - The variable is definately set before the include call is made, there is no doubt about that at all :) - Including remote files *is* possible. The php manual does not mention this does not work, and when I add the variable to the call (include /calculate_drivers?serie_id=3.php) the code is processed perfectly. The thing is, I can not pass the variable with the call, because it's value is determined by the form field. I could use a switch statement of course, but that adds a lot more text to the code. - I'm not sure changing the file extension will help (because the code in that remote php file has to be processed on the remote server, in order to be able to query the db), but I will give it a try. -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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] open a New Window
Simos Varelakis wrote: Hi to everybody I wonder if is posiblle to open a new predefined size window (new html page) with php code. This won't work with PHP, only with JavaScript Code which may be dynamically outputted by php, which means, you could open windows with a piece of javaScript, but you could save the size each individual user wants in a database and output the size part from there. the Javascript Code that would open a new window would be something like: window.open(datei.htm,Fenster1,width=310,height=400,left=0,top=0); sorry, don't know a good JavaScript Reference in English or greek by now, you have to look for your own Henning -- 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 rich interfaces for web applications??
Geoff Caplan wrote: Hi folks I have been looking for a practical way to create rich dynamic forms in the client using PHP, and would appreciate any pointers to workable approaches. With the launch of .Net I suspect that customer expectations are going to change, and good old plain HTML will begin to look dated. I am thinking of client-side functionality such as lists that can sort and filter, cascading dropdowns, drag and drop, validation in the client that is double-checked on the server etc etc. I am doing quite large and complex applications, so there is no way to code the client side stuff by hand - I need some kind of dynamic library. This is for intranet use, so I will be able to specifiy the browser verion to be used, and any plugins required. If you don't want to use HTML/CSS and are not bound to use a webbrowser, you could try to use PHP-GTK - it lets you build GUI's very quickly and easily, and works on Win and UNix machines, the Data Processing can be done in the same way you always did when coding PHP. It is in an early stage, but there are already some interesting applications, as a Mail Client and an editor. look at http://gtk.php.net and subscribe to the Mailing Lists there if you run into problems. There seem to be all kinds of technologies emerging, but most of them are either too immature, too slow (such as Flash based solutions - see www.carels.com), or are based on Java. For all its shorcomings, some kind of XML/DHTML solution seems best, and I guess it will improve as Browsers catch up with CSS2. hmm, my experience with JavaScript is not much better than with Java - both are error prone, lead to browser crashes, and are slow or just don't work, if things get real comlicated and beyond displaying a page with some text and links and rollovers. I have spotted a very nice Java/Tomcat solution, for example (see isomorphic.com), which shows what can be done. But the only DHTML/PHP library I can find is dynapi, which looks promising but is still a bit limited so far as functionality goes and the documentation is kinda thin. aehm, above you are talking client-side, now here Java/Tomcat /PHP, it's all server side... what is your _real_ problem? Creating Lists and all that sort of things which are easily to program and maintain for developers - either client or server side, or what? Are you just looking for a library that helps you to build forms and things like that dynamically? henning -- 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] Re: Passing variables with include()
Imar De Vries wrote: - Including remote files *is* possible. The php manual does not mention this does not work, and when I add the variable to the call (include /calculate_drivers?serie_id=3.php) the code is processed perfectly. The thing is, I can not pass the variable with the call, because it's value is determined by the form field. I could use a switch statement of course, but that adds a lot more text to the code. I just changed the code to (include .../calculate_drivers?serie_id=$serie_id.php) ... and this worked! Weird solution... -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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] open a New Window
no, its not possible. Try javascript - Original Message - From: Simos Varelakis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 14. sijeanj 2002 14:08 Subject: [PHP] open a New Window Hi to everybody I wonder if is posiblle to open a new predefined size window (new html page) with php code. Thanks in advance for your time. Best Regards Simos -- 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] Re: Passing variables with include()
Imar De Vries wrote: Imar De Vries wrote: - Including remote files *is* possible. The php manual does not mention this does not work, and when I add the variable to the call (include /calculate_drivers?serie_id=3.php) the code is processed perfectly. The thing is, I can not pass the variable with the call, because it's value is determined by the form field. I could use a switch statement of course, but that adds a lot more text to the code. I just changed the code to (include .../calculate_drivers?serie_id=$serie_id.php) ... and this worked! Weird solution... Not really. The http://.../foo.php request returns html and not php. The foo.php file is parsed and executed by the remote server and returned to you as html. By adding serie_id=xxx you actually give the remote php-script the name and value of the variable. You should think of include/require as a way to *include* any file into your script. Instead of cutting and pasting code into your file, you use include. Thats the way it works in practice. No magic is going on here :-) -- 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: Passing variables with include()
Hi Al. While we are on topic, what are the key differences between include() require() ? Cheers Scott - Original Message - From: Martin Wickman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 3:40 PM Subject: [PHP] Re: Passing variables with include() Imar De Vries wrote: Imar De Vries wrote: - Including remote files *is* possible. The php manual does not mention this does not work, and when I add the variable to the call (include /calculate_drivers?serie_id=3.php) the code is processed perfectly. The thing is, I can not pass the variable with the call, because it's value is determined by the form field. I could use a switch statement of course, but that adds a lot more text to the code. I just changed the code to (include .../calculate_drivers?serie_id=$serie_id.php) ... and this worked! Weird solution... Not really. The http://.../foo.php request returns html and not php. The foo.php file is parsed and executed by the remote server and returned to you as html. By adding serie_id=xxx you actually give the remote php-script the name and value of the variable. You should think of include/require as a way to *include* any file into your script. Instead of cutting and pasting code into your file, you use include. Thats the way it works in practice. No magic is going on here :-) -- 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: Passing variables with include()
Since some time there has only one difference left (don't know at which version it changed): include causes a warning and require an error on fail. (very useful for debugging - require your error-handler and include everything else) best regards Stefan Rusterholz - Original Message - From: Scott Houseman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 13, 2002 2:54 PM Subject: Re: [PHP] Re: Passing variables with include() Hi Al. While we are on topic, what are the key differences between include() require() ? Cheers Scott - Original Message - From: Martin Wickman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 3:40 PM Subject: [PHP] Re: Passing variables with include() Imar De Vries wrote: Imar De Vries wrote: - Including remote files *is* possible. The php manual does not mention this does not work, and when I add the variable to the call (include /calculate_drivers?serie_id=3.php) the code is processed perfectly. The thing is, I can not pass the variable with the call, because it's value is determined by the form field. I could use a switch statement of course, but that adds a lot more text to the code. I just changed the code to (include .../calculate_drivers?serie_id=$serie_id.php) ... and this worked! Weird solution... Not really. The http://.../foo.php request returns html and not php. The foo.php file is parsed and executed by the remote server and returned to you as html. By adding serie_id=xxx you actually give the remote php-script the name and value of the variable. You should think of include/require as a way to *include* any file into your script. Instead of cutting and pasting code into your file, you use include. Thats the way it works in practice. No magic is going on here :-) -- 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: Passing variables with include()
Scott Houseman wrote: Hi Al. While we are on topic, what are the key differences between include() require() ? Unlike include(), require() will always read in the target file, even if the line it's on never executes. If you want to conditionally include a file, use include(). The conditional statement won't affect the require(). However, if the line on which the require() occurs is not executed, neither will any of the code in the target file be executed. -- 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] Re: Creating rich interfaces for web applications??
Hi Geoff, Have a look at phpLens at http://phplens.com/ It's a commercial php software that my company wrote that allows you to perform sort/filter/edit and validation too on your data. Many of our customers are using on Intranets/Extranets. Works well with NN 4/6 and IE browsers. Regards, John Geoff Caplan [EMAIL PROTECTED] wrote in message 006c01c19cfb$c04caf60$0339a8c0@ajanta">news:006c01c19cfb$c04caf60$0339a8c0@ajanta... Hi folks I have been looking for a practical way to create rich dynamic forms in the client using PHP, and would appreciate any pointers to workable approaches. With the launch of .Net I suspect that customer expectations are going to change, and good old plain HTML will begin to look dated. I am thinking of client-side functionality such as lists that can sort and filter, cascading dropdowns, drag and drop, validation in the client that is double-checked on the server etc etc. I am doing quite large and complex applications, so there is no way to code the client side stuff by hand - I need some kind of dynamic library. This is for intranet use, so I will be able to specifiy the browser verion to be used, and any plugins required. There seem to be all kinds of technologies emerging, but most of them are either too immature, too slow (such as Flash based solutions - see www.carels.com), or are based on Java. For all its shorcomings, some kind of XML/DHTML solution seems best, and I guess it will improve as Browsers catch up with CSS2. I have spotted a very nice Java/Tomcat solution, for example (see isomorphic.com), which shows what can be done. But the only DHTML/PHP library I can find is dynapi, which looks promising but is still a bit limited so far as functionality goes and the documentation is kinda thin. Do any of you folks know of a workable way to do this - either commercial or open source?? Any pointers would be much appreciated Geoff Caplan. -- 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] problem with apache php module on solaris
Hi, I met some problems starting apache with php module on solaris 8. Apache is so configured: --prefix=/usr/local/apache-np --enable-shared=max The httpd -l response is: Compiled-in modules: http_core.c mod_so.c Php indeed: ./configure --prefix=/usr/local/apache-np --with-apxs=/usr/local/apache-np/b in/apxs --with-ldap=/usr/local/ns-solaris-ldap-sdk-5/ --with-mysql=/usr/loca l/mysql --enable-ctype --enable-sockets --enable-ftp --with-java=/usr/local/ j2sdk1_3_1_02 --with-sybase=/usr/local/freetds The error is: Syntax error on line 223 of /usr/local/apache-np/conf/httpd.conf: Cannot load /usr/local/apache-np/libexec/libphp4.so into server: ld.so.1: /usr/local/apache-np/bin/httpd: fatal: relocation error: file /usr/local/apache-np/libexec/libphp4.so: symbol uncompress: referenced symbol not found Any hint?? Nobody steals our chickens and lives to tell. (Duke Nukem) Saluti Ginox. -- 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: Passing variables with include()
Scott Houseman wrote: Hi Al. While we are on topic, what are the key differences between include() require() ? Unlike include(), require() will always read in the target file, even if the line it's on never executes. If you want to conditionally include a file, use include(). The conditional statement won't affect the require(). However, if the line on which the require() occurs is not executed, neither will any of the code in the target file be executed. I'm pretty sure that at last for PHP 4.06 or higher this is deprecated. I don't know why it is still in the manual. Please correct me if I'm wrong. best regards Stefan Rusterholz -- 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] problem with apache php module on solaris
I think you need to add the apache module extensions to your apache configuration. try adding --enable-apxs or --with-apxs (I can remember the exact syntax) to the apache configure. - Original Message - From: Gino Paoletti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 9:36 AM Subject: [PHP] problem with apache php module on solaris Hi, I met some problems starting apache with php module on solaris 8. Apache is so configured: --prefix=/usr/local/apache-np --enable-shared=max The httpd -l response is: Compiled-in modules: http_core.c mod_so.c Php indeed: ./configure --prefix=/usr/local/apache-np --with-apxs=/usr/local/apache-np/b in/apxs --with-ldap=/usr/local/ns-solaris-ldap-sdk-5/ --with-mysql=/usr/loca l/mysql --enable-ctype --enable-sockets --enable-ftp --with-java=/usr/local/ j2sdk1_3_1_02 --with-sybase=/usr/local/freetds The error is: Syntax error on line 223 of /usr/local/apache-np/conf/httpd.conf: Cannot load /usr/local/apache-np/libexec/libphp4.so into server: ld.so.1: /usr/local/apache-np/bin/httpd: fatal: relocation error: file /usr/local/apache-np/libexec/libphp4.so: symbol uncompress: referenced symbol not found Any hint?? Nobody steals our chickens and lives to tell. (Duke Nukem) Saluti Ginox. -- 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] CSS Editors
Hi TopStyle - http://www.bradsoft.com I endorse that - it is an excellent product. And for casual use, they have a free version with nags. Geoff Caplan Advantae.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]
RE: [PHP] Passing variables with include()
Does http://www.someremote.server/calculate_drivers.php; contain a function? If so, you may have to declare $serie_id as global within it. -Original Message- From: Imar de Vries [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 5:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Passing variables with include() Hi all, at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server. I have read in the php manual that [quote] When a file is include()ed, the code it contains inherits the variable scope of the line on which the include() occurs. Any variables available at that line in the calling file will be available within the called file. If the include() occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function. [/quote] But for some reason, i simply do not get the script to work. I use a form in the local script to determine which standings are to be shown, and the value is stored in $serie_id. This is done in the main scope (no function used). $serie_id can be 2, 3 or 4. Then I make an include call to the remote script: include(http://www.someremote.server/calculate_drivers.php;); In that remote script I use $serie_id to make a database query. But so far, the query fails because $serie_id is not known. Are there any known exceptions (f.i. specific server settings) that might explain why the variable is not known on the remote server? Thanks in advance! -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- 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] in-browser WYSIWYG html editor
Hi, I'm setting up a website and one of the needs is a good in-browser WYSIWYG editor. I want to be able that people with no HTML knowledge can manage to edit format content. I've looked at several utilities, such as the one used in postnuke. I need something with more image manipulation possibilities. eg: list all images on a dir on the server when you click the insert image button. cfdev's activedit (http://www.cfdev.com/activedit/) is such a tool but i find it a bit too expensive... Could anyone help me ? Thx very much Serge -- 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] Re: strtok bug
Hi Manuel and all developers. I understand that the implementation of strtok was broken (non POSIX compliant) but since it has been like this for ages would be better to give a chance to developers worldwide (that has been using and relied on this broken implementation) to control the behaviour of such feature much the same way REGISTER_GLOBALS (or something) in recently 4.1.0. Imagine recoding 100+ distributed scripts to change this! The decision of having this fixed is great but not paying attention (like you always did in the past) with backwards compatibility is (IMHO) a mistake. Best regards, Robert --- Manuel Lemos [EMAIL PROTECTED] wrote: Hello, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced After 4.0.6 . in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? You may want to ask that in php-dev mailing list because last time that I reported it I was told that it would not be fixed because it was just me complaining. __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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 rich interfaces for web applications??
Oops - forgot to send this to the list... Henning aehm, above you are talking client-side, now here Java/Tomcat /PHP, it's all server side... what is your _real_ problem? Creating Lists and all that sort of things which are easily to program and maintain for developers - either client or server side, or what? Are you just looking for a library that helps you to build forms and things like that dynamically? Sorry if I didn't make it clear enough. I am talking about creating client-side code dynamically on the server. For example, I have an application that generates a data-entry system dynamically from a data-dictionary and config files. Right now, it serves up HTML 3.2, but I would like to be able to offer a more windoze-style interface, with tabs, drag-and-drop, spreadsheet style grids, fancy combos etc etc. I am extending the app to include some CRM stuff, so I would also like calendar widgets and stuff like that. But it must be fast and reliable. So maybe HTML is still the only way to go. Geoff -- 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] help using ereg_replace()
Hello everyone, I am trying to learn how to use ereg_replace(), but I don't seem to be doing it correctly. $phone is a 10-digit string. I want to perform the following: $phone = ereg_replace(.{10}, [part where I am confused], $phone); I would like the output to be $phone = (555) 555-; Can a regexp guru help me out? Thank you Erik -- 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 rich interfaces for web applications??
Henning I did not work a lot with applications in PHP-GTK until now to say something about speed and reliability ( the list may answer those questions, i am only working on the translation of the manual for now), but I think it's worth a look at, and i know there are already some people out there who use it in a commercial environment. I think PHP-GTK is a great project, but I really do need to create the interface on the server and send it to some kind of thin client. But as you, maybe DHTML is just too unstable. I don't know if there is some kind of commercial plugin that does this and will work with PHP. You can do forms in Flash, and they seem to be stable, but they are much too slow. Geoff Caplan -- 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] CSS Editors
That looks cool -- is there anything like it that uses Tk or GTK? On Monday, January 14, 2002, at 09:52 AM, Geoff Caplan wrote: Hi TopStyle - http://www.bradsoft.com I endorse that - it is an excellent product. And for casual use, they have a free version with nags. Geoff Caplan Advantae.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]
Re: [PHP] help using ereg_replace()
Hi Erik, $phone is a 10-digit string. I would like the output to be $phone = (555) 555-; you don't need regex to do that. just insert add ( to the beginning of $phone, add ) to the 4th position, and - to the 4th position from behind, using substr_replace() function. anyway if you insist on using regex: preg_replace(/(\d{3})(\d{3})(\d{4})/, (\\1) \\2-\\3, $arr); -- Jimmy Everything loses its value when overly used, including love. -- 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] Re: help using ereg_replace()
Hello Erik, Hello everyone, I am trying to learn how to use ereg_replace(), but I don't seem to be doing it correctly. $phone is a 10-digit string. I want to perform the following: $phone = ereg_replace(.{10}, [part where I am confused], $phone); I would like the output to be $phone = (555) 555-; I would use preg_replace to do this. ? $phone = 55; $phone = preg_replace(/([0-9]{3,3})([0-9]{3,3})([0-9]+)/, ($1) $2-$3, $phone); echo $phone; ? The parentheses in the first part of the expression capture what you want. The stuff between the [and] is a characterclass (in this instance 0 through 9). The stuff between the curly braces is min,max. So. ([0-9]{3,3}) Match 0 through 9 a minimum (and max) of three times ([0-9]+) - match at least once. Hence the number becomes: ($1) $2-$3 ($1) = stuff in first parentheses (three digits) - this case, (555) followed by a space followed by the next three digits followed by a dash followed by whatever's left. Note that in the second part of the expression, parentheses lose their special meaning, and can be used as regular characters (as can the other metacharacters). You will want to make sure that the numbers when inputted are in the format you want them when you bring them back out of the file / db whatever - if (!preg_match(/^[0-9]{10,10}/, $input)) { // We need 10 numbers! } Hope that helps. James -- 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: help using ereg_replace()
liljim, Thanks for the advice (and especially the explanation!) -- I note that you chose the Perl regexp engine rather than the e regexp engine (POSIX?). Quite a few people recommended O'Reilly's Mastering Regular Expressions over the weekend. Does anyone know if it covers the Perl syntax*? This seems like a good book to learn more. Erik * I don't know Perl On Monday, January 14, 2002, at 11:11 AM, liljim wrote: I would use preg_replace to do this. -- 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: help using ereg_replace()
Hi Erik, Thanks for the advice (and especially the explanation!) -- I note that you chose the Perl regexp engine rather than the e regexp engine (POSIX?). Quite a few people recommended O'Reilly's Mastering Regular Expressions over the weekend. Does anyone know if it covers the Perl syntax*? This seems like a good book to learn more. The book (though going into examples using perl mainly) gives you a general grounding in regular expressions - I learned php before perl, and javascript, though the book has equipped me equally well for all three. I love it, and would recommend it for anyyone who's even vaguely interested in regexes. James -- 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: help using ereg_replace()
I own and have read Mastering Regular Expressions (excellent book). I've programmed perl for 3 years and have recently started migrating one of my projects into php. I can't stand ereg, I prefer preg. While functions such as substitute and match differ in syntax from perl to php, this book will teach you quite a bit about how to effectively use preg, which i've found to be easier, and faster than ereg. For the record, I like perl's syntax better... ;p Hope this helps, /bart -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 11:26 AM To: liljim Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: help using ereg_replace() liljim, Thanks for the advice (and especially the explanation!) -- I note that you chose the Perl regexp engine rather than the e regexp engine (POSIX?). Quite a few people recommended O'Reilly's Mastering Regular Expressions over the weekend. Does anyone know if it covers the Perl syntax*? This seems like a good book to learn more. Erik * I don't know Perl On Monday, January 14, 2002, at 11:11 AM, liljim wrote: I would use preg_replace to do this. -- 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 rich interfaces for web applications??
Geoff Caplan wrote: Henning I did not work a lot with applications in PHP-GTK until now to say something about speed and reliability ( the list may answer those questions, i am only working on the translation of the manual for now), but I think it's worth a look at, and i know there are already some people out there who use it in a commercial environment. I think PHP-GTK is a great project, but I really do need to create the interface on the server and send it to some kind of thin client. It might seem that I am advocating PHP-GTK too much, but even this is possible. PHP-GTK Apps would run on any X or Windows System where you have the GTK Libs and PHP compiled - nothing more needed. I am not shure but it might even be very well that these both together still use less memory than a webbrowser - in RAM and on HD or when beeing fetched over the network at boot time. When really want to write your application in PHP instead of C/C++ or maybe Java I would still consider it better than DHTML. I don't know if there is some kind of commercial plugin that does this and will work with PHP. You can do forms in Flash, and they seem to be stable, but they are much too slow. What exactly is too slow with flash? dynamical genberation with action script? You could generate your content and data with PHP and display it with flash. henning -- 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] Image Fields and PHP...
Not sure if this is off topic for this list or not, but thought I would try... I have a Linux server running Redhat 7.0, PHP 4.1.1, and freetds 0.53. My Linux server connects to a Win2k server running MSSQL 2000. Everything works wonderfully, except, I have an image field in one of my tables and I can't seem to find a way to pull it out without having PHP completely freak out. (i.e. I get no error message at all just page cannot be displayed) So I'm wondering, can you pull image fields out with PHP? If so, I'm guessing my limitation is freetds. If not, is there any way to pull an image out of a database using php? (i.e. store it in a different type of field not image.) Any help is appreciated, Thanks, Zara -- 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] Header problem
Here is my question. I wrote a script, which gets parameters from db about document (location on disc, hashed filename and original filename). Then script open this file a send it to user. I use this headers Header(Content-Type: application/download\n); Header(Content-Disposition: attachment;filename=\name_of_file\); Header(Content-Transfer-Encoding: binary); On Windows it works good, but on Mac it doesn't accept name_of_file and try save this file with name of script. What is wrong ? Do you have any idea ?? If I used: Header(Content-Disposition: filename=\jmeno_souboru\); then this script doesn't work also on Windows with Mozilla. Is there any error in MSIE on Mac, isn't it ? Thank you for any idea Petr -- 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] in-browser wysiwyg html editor
Hi, I'm looking for an in-browser html editor. I've got the scripts used in postnuke and ariadne... But i need more image possibilities. such as image listing of images on a certain directory on the server. I know that activedit from cfdev does it but imho a bit to expensive. http://www.cfdev.com/activedit/ does anybody know of an alternative ? opensource or commercial ? thx ... Serge -- 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] Header problem
It seems to be bug in IE/Netscape/Other www browser on Mac, that's all. Header wasn't correct interpreted. I had similar problem with NETSCAPE 6 on Windows. I hope they will correct it shortly. Krzysztof Petr Rezek wrote: Here is my question. I wrote a script, which gets parameters from db about document (location on disc, hashed filename and original filename). Then script open this file a send it to user. I use this headers Header(Content-Type: application/download\n); Header(Content-Disposition: attachment;filename=\name_of_file\); Header(Content-Transfer-Encoding: binary); On Windows it works good, but on Mac it doesn't accept name_of_file and try save this file with name of script. What is wrong ? Do you have any idea ?? If I used: Header(Content-Disposition: filename=\jmeno_souboru\); then this script doesn't work also on Windows with Mozilla. Is there any error in MSIE on Mac, isn't it ? Thank you for any idea Petr -- Bojkot dokumentow w formacie Worda? http://komputery.interia.pl/id/arch/www/wysinf_id=218065 -- 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 variables with include()
-Original Message- From: Imar de Vries [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 5:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Passing variables with include() at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server. I have read in the php manual that [quote] When a file is include()ed, the code it contains inherits the variable scope of the line on which the include() occurs. Any variables available at that line in the calling file will be available within the called file. If the include() occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function. [/quote] This is only true for include()s that occur on a local file. The next paragraph from the manual contains the information that you'll actually need: [quote] If the include()ed file is called via HTTP using the fopen wrappers, and if the target server interprets the target file as PHP code, variables may be passed to the include()ed file using an URL request string as used with HTTP GET. This is not strictly speaking the same thing as include()ing the file and having it inherit the parent file's variable scope; the script is actually being run on the remote server and the result is then being included into the local script. [/quote] The distinction is: When you include() a local file, the parser will insert the *code* from that file into your script, and it will behave just as if the code itself was typed in at that point. When you include() a remote file, all the parser has access to is the *results* of the remote file request. --- Mark Roedel | Blessed is he who has learned to laugh Systems Programmer| at himself, for he shall never cease LeTourneau University | to be entertained. Longview, Texas, USA | -- John Powell -- 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] apache authentication
Hi, I am using the Nusphere application server with apache user directories. I have several protected user directories that are of different realms. When a user logs into the 'secure area' i would like to send them to pages contained in a secure directory but pass the encoded user:pass in the URL as to avoid the pop-up apache authentication dialogue. Is this possible and how do i achieve this? TIA, Aaron Lake Programmer/Analyst Kvaerner Chemetics A Division of Kvaerner Canada Inc (604) 730 4206 -- 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 rich interfaces for web applications??
Hi What exactly is too slow with flash? dynamical genberation with action script? You could generate your content and data with PHP and display it with flash. I have just been talking to the engineers at Carrels, who have produced a Flash based system for rich forms, but I said I found it too slow and they agreed. Downloading and rendering the movies is just too slow, even if they are cached on the server, so Carrels are creating their own specialised plugin for forms, and also talking with Macromedia about how this aspect of Flash can be speeded up. The Carrels solution may be a solution once it is out of beta, but for now, Flash doesn't seem to be the way to go. I am thinking of using Flash to produce printable documents, though, such as letters, labels and invoices. I think the Flash format is easier to handle than PDF, and is generally faster all round. There is an interesting looking commercial product which looks a bit like Macromedia Generator, but which has an PHP api. Have you ever heard of this? http://www.blue-pac.com/products/phpturbine/default.htm Geoff -- 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] in-browser wysiwyg html editor
This is really a javascript thing so you'll probably get a better response from a javascript group, but I can say that a script like that will only ever work on IE. On Sun, 13 Jan 2002 04:00:18 +0100, Serge wrote: Hi, I'm looking for an in-browser html editor. I've got the scripts used in postnuke and ariadne... But i need more image possibilities. such as image listing of images on a certain directory on the server. I know that activedit from cfdev does it but imho a bit to expensive. http://www.cfdev.com/activedit/ does anybody know of an alternative ? opensource or commercial ? thx ... Serge -- 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] apache authentication
Your question is not very clear, not to me anyway. Are you trying to write some PHP code that remembers a user name and password over several requests? If so, I can answer that. According to me, it's hard. The problem is that PHP (in fact Apache itself) doesn't remember any information between requests - there is (almost) no persistent storage. In any case, an apache web server machine runs several copies of Apache, and you would have to share the data between all the copies. Furthermore, there can be more than one physical server. Your PHP could remember the credentials in a shared database, but that would be slow. Once you have some persistent storage, you need to be sure that the incoming requests are really coming from where you think they are - some sort of secure session management. Without that, a hacker can break into somebody else's logged-in session by sending suitable fake requests. All this is easier in HTTPS. I am working on some code that implements persistent storage with HTTPS, but I haven't got the shared memory part working yet. Simon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 14 January 2002 17:41 To: [EMAIL PROTECTED] Subject: [PHP] apache authentication Hi, I am using the Nusphere application server with apache user directories. I have several protected user directories that are of different realms. When a user logs into the 'secure area' i would like to send them to pages contained in a secure directory but pass the encoded user:pass in the URL as to avoid the pop-up apache authentication dialogue. Is this possible and how do i achieve this? TIA, Aaron Lake Programmer/Analyst Kvaerner Chemetics A Division of Kvaerner Canada Inc (604) 730 4206 -- 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] Persistent Database Resources?
Lets say I have a page that makes queries with multiple sorts, returning plenty of rows and displaying part of the result set. Each time the client accesses the page the query must be re-executed, spinning the CPU and thus tieing up resources. In PHP, or any other language could the result set be stored persistently until the client accesses the page again, or the result expires and must be re-executed? -- 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] Persistent Database Resources?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 14-01-02 at 19:58 * Nathan Cassano said Lets say I have a page that makes queries with multiple sorts, returning plenty of rows and displaying part of the result set. Each time the client accesses the page the query must be re-executed, spinning the CPU and thus tieing up resources. In PHP, or any other language could the result set be stored persistently until the client accesses the page again, or the result expires and must be re-executed? Have a look at www.devshed.com I'm pretty sure there's a good article on caching there that you'd find usefull. (if not there is *definately* one on www.zend.com) - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QyrtHpvrrTa6L5oRAk2FAJ40NBy2f4nOWWQ2341qhu2FlcrXVwCffzmg V9IXgNa9QnnCarHSHzjn+pw= =24yn -END PGP SIGNATURE- -- 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] Php.ini file missing
ahhh, if this is indeed the problem, then you (michael from the original message) need to enable sendmail in /etc/hostconfig by changing the line MAILSERVER=-NO- to MAILSERVER=-YES- (isn't everything different in macosx) again, you need to do this from an administrator account. this will start sendmail each time you reboot. i'm not exactly sure how to start sendmail correctly from the command line, but one of the sites i mentioned earlier might have something. mike -- mike cullerton I would like to thank you all for all the info you gave me and the php.ini file! Your suggestions have been really useful and I made some progresses, but I've still got problems :-( I changed the MAILSERVER line to YES as you said, and now sendmail should start every time I reboot, but I haven't yet resolved some configurations problems. As you all suggested I looked again in several websites and followed many instructions I've finally found. However it still doesn't work :-( The last and *most important* thing left to do is to start sendmail, but I always get errors like: A) Failed to start sendmail : 451 4.0.0 /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory B) Failed to start sendmail : /etc/mail/sendmail.cf: WARNING: dangerous write permissions 451 4.0.0 /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory I've got this errors either trying to start sendmail using the terminal or an interesting applications called Webmin I've found looking around for more information. Webmin allows to manage from your browser various items like Apache, sendmail and similar stuff, more easily than doing it through the terminal (at least for a beginner like me). I always get the same errors and I believe it is because of the file local-host-names privileges. I tried changing them in any combination, but it still doesn't work... I will continue trying and hope to get it fixed , if not I will download another mail server I found looking for info. It is called post fix and, as I read, should be easier to configure and use than sendmail. Do you think this could be a valid solution? Thanks again for the patience and the kindness. Bye, Michael -- 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] I18n problems: Working with double-byte languages
Hi people ! I have a query regarding double-byte languages on PHP. I need to sort a index localized from English to Korean. My idea is: * get the Korean strings from file; * convert them to UTF8; * insert them in a Oracle database set to work with UTF8; * set NLS_LANG with Alter session SQL command to this variable match with Korean language; * get the strings sorted by Oracle with a SELECT * FROM table SORT BY field ASC SQL command; I've tried to convert the Korean string to UTF8 with utf8_encode function, but this function converted each byte from double-byte string to its relative in UTF8 chars. Reverting this string encoded to UTF8 with utf8_decode function, the browser can display successfully the Korean chars (because the individual bytes of the double-byte string will be as them were before), but Oracle can't sort the strings properly because that UTF8 chars converted by utf8_encode function were not relative to a double-byte char, but relative to a 2 single bytes chars! How can I convert a double-byte string to UTF8 properly??? Really thanks _ Ricardo J. A. Júnior, Software Engineer Trainee Bowne Global Solutions Phone +55 21 2515 7713 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.bowneglobal.com.br http://www.bowneglobal.com.br/ -- 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] apache authentication
Apparently i have been unclear, allow me to rephrase: I want to send user:pass to an apache authentication header for a apache protected user directory. Unfortunately, I have php installed as CGI so native php authentication will not function. I would like to either send the user:pass via GET in a url encoded sting (if possible as CGI) OR send user:pass directly to the header using a different method. Due to restrictions imposed on me, i am not able to make use of a single unified logon using LDAP or NTLM. In my case, since there are several user directories spanning severl realms, I must first authenticate users against a mysql auth db and fetch the the realm user:pass based on that users permissions. Is it possible to send the user:pass in any of the methods described above? If so, how can i implement this? Aaron Lake Programmer/Analyst Kvaerner Chemetics A Division of Kvaerner Canada Inc (604) 730 4206 -- 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] Php.ini file missing
On Tuesday 15 January 2002 03:06, Michael Sciascia wrote: I would like to thank you all for all the info you gave me and the php.ini file! Your suggestions have been really useful and I made some progresses, but I've still got problems :-( I changed the MAILSERVER line to YES as you said, and now sendmail should start every time I reboot, but I haven't yet resolved some configurations problems. As you all suggested I looked again in several websites and followed many instructions I've finally found. However it still doesn't work :-( The last and *most important* thing left to do is to start sendmail, but I always get errors like: AFAIK you don't actually need to start the sendmail (smtpd?) daemon. You just need the /usr/bin/sendmail (or wherever it's located) program. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Life is like an onion: you peel off layer after layer and then you find there is nothing in it. -- James Huneker */ -- 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] Looking for article writers.
Hi I need someone who can write articles about PHP for my site for free. In exchange i'll put in each article information about author and link to his site. Valery Vlasyuk http://www.cgi-network.net
[PHP] problems with includes and extending classes
I can't figure this one out... I boiled it down to a test case where I have a bunch of classes and a demo program: demo.php: === ? require_once L.php; $l = new L(); ? === L.php === ? require_once P.php; require_once C2.php; class L extends P{ var $class = L class; var $c; function L() { $this-c = new C2(); echo L init\n; } } ? = ? class P { var $class = P class; function P() { echo P init\n; } } ? C2.php ? class C2 extends L{ var $class = C2 class; function C2(){ echo C2 init\n; } } ? so I'm instantiating L, L is a subclass of P and C2 is a subclass of L. The contructor for L creates an instance of C2. I just want users to have to require_once the L class file (L.php) and not have to think about P.php or C2.php so I include them in L.php (incase it helps, in real life P is PEAR.php, L is LDAP.php, and C2 is Connection.php) When I run demo.php I get 'Fatal error: Class c2: Cannot inherit from undefined class l in C2.php on line 2' if I move the 'require_once C.php;' line from L.php to demo.php I don't get the error. can anyone explain what is going on? .~. /v\L I N U X // \\ Phear the Penguin /( )\ ^`~'^ If it beeps, port Linux to it. -Somebody. -- 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] override nobody@example.com
When using the mail () function to send an email to a linux server the header information shows two from addresses. (1)e-mail address that was defined in $from variable in the header. (2) [EMAIL PROTECTED] Can someone explain this? I only want the $from variable to show up in the header. Can I do this with the simple mail () function? Thanks Header info is below: From [EMAIL PROTECTED] Mon Jan 14 08:33:19 2002 Return-Path: [EMAIL PROTECTED] Received: from localhost.localdomain ([EMAIL PROTECTED] [204.65.32.5]) by [EMAIL PROTECTED] (8.9.3/8.9.3) with ESMTP id IAA12868 for [EMAIL PROTECTED]; Mon, 14 Jan 2002 08:33:19 -0600 Received: from [EMAIL PROTECTED] (IDENT:root@[EMAIL PROTECTED] [204.65 .32.11]) by localhost.localdomain (8.12.1/8.11.2) with ESMTP id g0EEXpOn001442 for [EMAIL PROTECTED]; Mon, 14 Jan 2002 08:33:51 -0600 Received: (from nobody@localhost) by [EMAIL PROTECTED] (8.9.3/8.9.3) id IAA09861; Mon, 14 Jan 2002 08:35:08 -0600 Date: Mon, 14 Jan 2002 08:35:08 -0600 Message-Id: 200201141435.IAA09861@[EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: TESTING From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Mail () function below: $to = [EMAIL PROTECTED]; $subj = TESTING; $body=Begin101Test . \n . $N . \n . $C . \n . $r . \nEnd101; $header=From: . $email . \r\nReply-To: [EMAIL PROTECTED]; mail ($to, $subj, $body, $header); __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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 Digest 14 Jan 2002 21:01:07 -0000 Issue 1111
php-general Digest 14 Jan 2002 21:01:07 - Issue Topics (messages 80436 through 80492): Re: How to get a function backtrace? 80436 by: Martin Wickman Re: Setting up an XML platform/website 80437 by: Jon Farmer Re: How to get a stacktrace? (was how to get a function backtrace) 80438 by: Stefan Rusterholz 80439 by: Neil Kimber Passing variables with include() 80440 by: Imar de Vries 80441 by: Nick Wilson 80442 by: Tino Didriksen 80443 by: Stefan Rusterholz 80444 by: Stefan Rusterholz 80447 by: Imar de Vries 80450 by: Imar de Vries 80452 by: Martin Wickman 80453 by: Scott Houseman 80454 by: Stefan Rusterholz 80455 by: Martin Wickman 80458 by: Stefan Rusterholz 80461 by: Rick Emery 80478 by: Mark Roedel open a New Window 80445 by: Simos Varelakis 80448 by: Henning Sprang 80451 by: Rambo Amadeus Creating rich interfaces for web applications?? 80446 by: Geoff Caplan 80449 by: Henning Sprang 80456 by: John Lim 80464 by: Geoff Caplan 80466 by: Geoff Caplan 80473 by: Henning Sprang 80480 by: Geoff Caplan problem with apache php module on solaris 80457 by: Gino Paoletti 80459 by: Dennis Moore Re: CSS Editors 80460 by: Geoff Caplan 80467 by: Erik Price in-browser WYSIWYG html editor 80462 by: Serge 80476 by: Serge 80481 by: Mark Re: strtok bug 80463 by: Robert Mena help using ereg_replace() 80465 by: Erik Price 80468 by: Jimmy 80469 by: liljim 80470 by: Erik Price 80471 by: liljim 80472 by: Bart Brinkmann Image Fields and PHP... 80474 by: Gonzalez, Zara E Header problem 80475 by: Petr Rezek 80477 by: Krzysztof Kocjan apache authentication 80479 by: aaron.lake.kvaerner.com 80482 by: Simon Ritchie 80487 by: aaron.lake.kvaerner.com Persistent Database Resources? 80483 by: Nathan Cassano 80484 by: Nick Wilson Re: Php.ini file missing 80485 by: Michael Sciascia 80488 by: Jason Wong I18n problems: Working with double-byte languages 80486 by: Junior, Ricardo Looking for article writers. 80489 by: Vlasyuk Valera how to control hook calling order 80490 by: Charmaine Tian problems with includes and extending classes 80491 by: Chris Jackson override [EMAIL PROTECTED] 80492 by: toni baker Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- 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. ---End Message--- ---BeginMessage--- Is anyone interested in setting up an XML platform for PHP, where the use of XML is explained, with sample PHP/XML applications and in-depth real live tutorials? Since lot's of people underestimate the power of XML. Maybe, it's nice to be ready when Microsoft's dotNet crashes in and launches an new XML era. Anyone wants to help building such an platform/website? I used the XML parser in a credit card authorisation front end i wrote. Both the info to and from the credit card server was in XML and i used PHP to both build and parse the XML. I dont mind writing a tutorial on what I did, it works well but not sure how proficient it was in using XML. -- -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key ---End Message--- ---BeginMessage--- 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
Re: [PHP] override nobody@example.com
i perefer to use such mail code: $pipe=popen(/usr/sbin/sendmail -f [EMAIL PROTECTED] -i [EMAIL PROTECTED],w); $email_body=Customer name: $customer_name email: $email features: $features; if ($pipe) { fputs($pipe,To: [EMAIL PROTECTED]\n); fputs($pipe,From: $email\n); fputs($pipe,Subject: New order\n); fwrite($pipe,$email_body); pclose($pipe);} }else{ print Error, can't open pipe; } _ Valery Vlasyuk http://www.cgi-network.net - free php scripts - Original Message - From: toni baker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 14, 2002 11:00 PM Subject: [PHP] override [EMAIL PROTECTED] When using the mail () function to send an email to a linux server the header information shows two from addresses. (1)e-mail address that was defined in $from variable in the header. (2) [EMAIL PROTECTED] Can someone explain this? I only want the $from variable to show up in the header. Can I do this with the simple mail () function? Thanks Header info is below: From [EMAIL PROTECTED] Mon Jan 14 08:33:19 2002 Return-Path: [EMAIL PROTECTED] Received: from localhost.localdomain ([EMAIL PROTECTED] [204.65.32.5]) by [EMAIL PROTECTED] (8.9.3/8.9.3) with ESMTP id IAA12868 for [EMAIL PROTECTED]; Mon, 14 Jan 2002 08:33:19 -0600 Received: from [EMAIL PROTECTED] (IDENT:root@[EMAIL PROTECTED] [204.65 .32.11]) by localhost.localdomain (8.12.1/8.11.2) with ESMTP id g0EEXpOn001442 for [EMAIL PROTECTED]; Mon, 14 Jan 2002 08:33:51 -0600 Received: (from nobody@localhost) by [EMAIL PROTECTED] (8.9.3/8.9.3) id IAA09861; Mon, 14 Jan 2002 08:35:08 -0600 Date: Mon, 14 Jan 2002 08:35:08 -0600 Message-Id: 200201141435.IAA09861@[EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: TESTING From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Mail () function below: $to = [EMAIL PROTECTED]; $subj = TESTING; $body=Begin101Test . \n . $N . \n . $C . \n . $r . \nEnd101; $header=From: . $email . \r\nReply-To: [EMAIL PROTECTED]; mail ($to, $subj, $body, $header); __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] Setting up an XML platform/website
Emile Is anyone interested in setting up an XML platform for PHP, where the use of XML is explained, Why not offer to edit a section on this on one of the popular PHP community sites, such as PHPBuilder.com? I agree that this is an important subject, but I am not sure that we need yet more sites. The material will get a bigger audience on an existing site, I suspect. Anyway, I hope you get this off the ground one way or another Geoff Caplan Advantae Ltd -- 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] how to control hook calling order
Hi there, I'm creating a PHP extension of my own, and I'd like my extension's module_startup_function (i.e., PHP_MINIT_FUNC) to be the last one called among all the extensions' MINIT funcs. I'd also like my extension's request_startup_function (PHP_RINIT_FUNC) to be the first one called among all extension's RINIT funcs. Is there any way that allows me to control the calling order of the module_startup/shutdown functions and request_startup/shutdown functions of my own extension relative to other extensions? I'm using PHP-4.1.0 on Linux. Thanks a lot for your help. --Charmaine Tian -- 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] Re: strtok bug
Hello, Robert Mena wrote: Hi Manuel and all developers. I understand that the implementation of strtok was broken (non POSIX compliant) but since it has been like this for ages would be better to give a chance to developers worldwide (that has been using and relied on this broken implementation) to control the behaviour of such feature much the same way REGISTER_GLOBALS (or something) in recently 4.1.0. Imagine recoding 100+ distributed scripts to change this! The decision of having this fixed is great but not paying attention (like you always did in the past) with backwards compatibility is (IMHO) a mistake. My opinion precisely. The problem is that PHP developers that decided to break strtok did not seem to have thought of that so they did not ask any users if they were relying on the original behaviour. They would not need to poll anybody. Common sense can lead to the conclusion that if a function has a certain behaviour for 4 years, chances are that there must be enough people relying on it that changing the behaviour would break their code. It seems that the person that broke strtok came to PHP much earlier than that and did not cross his mind about existing users relying on the original behaviour. If making it POSIX compliance was a good idea, it would have been better to add a function to the POSIX extension named posix_strtok and whoever thinks that POSIX compliance was a good idea could use that and it would not require breaking the existing strtok function. The same goes for dirname function that was broken before PHP 4.0.3pl1 . Anyway, do not count on PHP developers to ever reconsider and provide any means to restore the original. Despite the change was only made 2 months ago, they are too proud and already state that they will not admit it was a mistake. Usually they don't like somebody from outside to tell them that there are better solutions, especially after the mistake is already made. So, I advise you to not expect anything from the PHP developers regarding fixing the mistakes. To solve your problem it is either more realistic to not upgrade to PHP 4.1 now (if ever) unless you have the time to replace the calls to strtok and dirname with something else that provides the original behaviour like those replacement functions that I wrote and made available here: http://phpclasses.UpperDesign.com/browse.html/package/404 Regards, Manuel Lemos --- Manuel Lemos [EMAIL PROTECTED] wrote: Hello, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced After 4.0.6 . in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? You may want to ask that in php-dev mailing list because last time that I reported it I was told that it would not be fixed because it was just me complaining. __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] Compile problems php 4.1.1
I'm trying to compile php 4.1.1 and when it gets to the --with-apxs option it errors out with the following: Sorry, I was not able to successfully run APXS. Possible reasons: 1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs The output of apxs follows ./configure: apxs: command not found I've run the httpd -l command and I have the mod_so.c configured into apache as you can see below Compiled-in modules: http_core.c mod_so.c suexec: enabled; valid wrapper /usr/sbin/suexec I then tried to find the apxs file on my machine and well it returns nothing. Does anyone have any ideas on what I can do? Thanks..
Re: [PHP] Compile problems php 4.1.1
You don't mention which OS you are on, but usually apxs is found in the apache-devel package. You probably didn't install that. -Rasmus On Mon, 14 Jan 2002, Jay Paulson wrote: I'm trying to compile php 4.1.1 and when it gets to the --with-apxs option it errors out with the following: Sorry, I was not able to successfully run APXS. Possible reasons: 1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs The output of apxs follows ./configure: apxs: command not found I've run the httpd -l command and I have the mod_so.c configured into apache as you can see below Compiled-in modules: http_core.c mod_so.c suexec: enabled; valid wrapper /usr/sbin/suexec I then tried to find the apxs file on my machine and well it returns nothing. Does anyone have any ideas on what I can do? Thanks.. -- 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] Re: Finding PHP Developers for Remote Project
thanks,.. guru.com is great. And, thank all of you for your great help. Terrific, etc. Rick Laserjetter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You could try guru.com LJ Richard Spangenberg [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I may need some help on a project I am working on. Does anyone know of a good source of PHP developers where I can advertise my needs? Rick -- 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] checkboxes vs text filed array and hidden variables
Hi my problem : i have to pass the price, and part number which i get from the database to the shopping cart so when i select some of the items by checking the checkboxes and submit the form i get only the last item in the list i use hidden variables to pass these values to shopping cart. my code look like this: echo TDinput type=\checkbox\ name=\product[]\ value=\$product_id\/TD; echo TDinput type=\text\ size=\2\ name=\quantity[$part_number]\ value=\1\ ; echo/TD; echo input type=\hidden\ value=\$part_number\ name=\part_number\/; echo input type=\hidden\ value=\$discount_price\ name=\discount_price\/; -- 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: Finding PHP Developers for Remote Project
Hi A good place to put this would be either in the projects area of weberdev (http://www.weberdev.com/index.php3?GoTo=jobmatching/about.php3) or the jobs area (http://www.weberjob.com). Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Richard Spangenberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 12:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Finding PHP Developers for Remote Project thanks,.. guru.com is great. And, thank all of you for your great help. Terrific, etc. Rick Laserjetter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You could try guru.com LJ Richard Spangenberg [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I may need some help on a project I am working on. Does anyone know of a good source of PHP developers where I can advertise my needs? Rick -- 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] Wrong result (345php.tmp) instead a filepath from input file type=file...
I have a page with a html-form headed with ...ENCTYPE=multipart/form-data ... and multiple inputs,e.g.: input type=file name=formname1... If I select a file,e.g. abc.jpg with the path c:\abc.jpg I get a value like 345php.tmp instead of c:\abc.jpg. Any idea what is wrong?
[PHP] Padding with mcrypt_generic
I'm trying to use mcrypt_generic and it works fine except it pads the data with ^@'s when, according to the manual page, the length of the data is not n * blocksize. I've been trying to remove the padding from my decrypted data using something like $string = str_replace(^@,,$string);, but it doesn't seem to work right (^@ is a single character, not just ^ . @). Has anyone had to do this before and found a solution? -- Ben Sinclair [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] unable to copy and chmod
unable to copy and chmod I'm trying to copy a file and chmod it to make it writable, but after I copy it using PHP I can't even chmod in ftp ! I can't change the file owner too. -- 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] An idea...
Just want to bounce this idea off you guys/gals. Im looking to improve the security of my scripts. Now lets say, I initialise the script with a constant in the main config file that all the pages access. Then when Im accepting data from a form or maybe even a link I could do if (isset($HTTP_POST_VARS['foo']) defined(CONSTANT)) { process data } Just an idea, what do you think.. Thanks -- 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] An idea...
Quote from the php manual. Once a constant is defined, it can never be changed or undefined. I figure, since the constant is initialised in the script, it cannot be changed or undefined, then I can put my trust in it that it comes from the server and no where else Martin Towell wrote: how is that going to increase security? -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 11:21 AM To: php Subject: [PHP] An idea... Just want to bounce this idea off you guys/gals. Im looking to improve the security of my scripts. Now lets say, I initialise the script with a constant in the main config file that all the pages access. Then when Im accepting data from a form or maybe even a link I could do if (isset($HTTP_POST_VARS['foo']) defined(CONSTANT)) { process data } Just an idea, what do you think.. Thanks -- 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] Mysql
Hello php-general, Hi everybody Please help me. If i want to create a table in some database what should I do. The database is on server. -- Best regards, -=LukA=- mailto:[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] Re:[PHP] Mysql
Even though this is OT as it is not a PHP question it is an easy one :) Please see the following URL: http://www.mysql.com/documentation/mysql/bychapter/ It is the MySQL manual broken out by chapter. You will find the next URL particularly useful as it is the syntax for the create table command: http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#CREATE_TABLE HTH --Sam On Tue, 15 Jan 2002 03:46:47 +0300 -=LukA=- [EMAIL PROTECTED] wrote: Hello php-general, Hi everybody Please help me. If i want to create a table in some database what should I do. The database is on server. -- Best regards, -=LukA=- mailto:[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] Mysql
Hi, Sorry if I am being a rude, but you need to read the document on how to create a table: www.mysql.com and www.php.net (assuming that you will use php) thx. --- -=LukA=- [EMAIL PROTECTED] wrote: Hello php-general, Hi everybody Please help me. If i want to create a table in some database what should I do. The database is on server. -- Best regards, -=LukA=- mailto:[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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] An idea...
Martin Towell wrote: 1. so you're trying to stop people from link straight to your page? 2. or are you trying to stop them from using your code without permission (on the same server)? a. will others be able to see the source code? i. if so, then what's to stop them from defining the constant themselves? ii. if not, this looks like a good way of doing it I could see how links in the url bar could get spoofed, but I have no idea how a form can. I presented a question maybe last week about $HTTP_POST_VARS security or lack of, and one the replies, got me thinking. I guess what I had in mind is along the lines of #2. What I had in mind was that each install would have a different value for the constant. So will others be able to see the source code, no not unless the webserver becomes compromised... -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 11:31 AM To: Martin Towell Cc: PHP Subject: Re: [PHP] An idea... Quote from the php manual. Once a constant is defined, it can never be changed or undefined. I figure, since the constant is initialised in the script, it cannot be changed or undefined, then I can put my trust in it that it comes from the server and no where else Martin Towell wrote: how is that going to increase security? -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 11:21 AM To: php Subject: [PHP] An idea... Just want to bounce this idea off you guys/gals. Im looking to improve the security of my scripts. Now lets say, I initialise the script with a constant in the main config file that all the pages access. Then when Im accepting data from a form or maybe even a link I could do if (isset($HTTP_POST_VARS['foo']) defined(CONSTANT)) { process data } Just an idea, what do you think.. Thanks -- 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] Padding with mcrypt_generic
Ben Sinclair wrote: I'm trying to use mcrypt_generic and it works fine except it pads the data with ^@'s when, according to the manual page, the length of the data is not n * blocksize. I've been trying to remove the padding from my decrypted data using something like $string = str_replace(^@,,$string);, but it doesn't seem to work right (^@ is a single character, not just ^ . @). Has anyone had to do this before and found a solution? -- Ben Sinclair [EMAIL PROTECTED] I worked around this by padding the plaintext myself. Basically, add NUL (character 0) bytes so that your plaintext becomes an exact multiple of blocksize. Then change the very last byte to the number of padding bytes used. If the plaintext is already an exact multiple of blocksize, then pad with an entire block. On decryption, reverse the process, and you'll have your original string back exactly the way you started. Here are two functions that I use for this: (note: I modified these slightly from the originals without testing) function pad_plaintext($data, $blocksize) { $buffer = ; $numpad = $blocksize - (strlen($data) % $blocksize); $nul_str = chr(0); $buffer = $data . str_repeat($nul_str, $numpad); $buffer[strlen($buffer) - 1] = chr($numpad); return($buffer); } function depad_plaintext($data) { $buffer = ; $numpad = ord($data[strlen($data) - 1]); $buffer = substr($data, 0, -1 * $numpad); return($buffer); } HTH, --Joe -- 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] Mysql
You need some tutorials on using MySQL and PHP. There are some good ones at thickbook http://www.thickbook.com, you can also search, using Google, for tutorial MySQL PHP. You will find good ones at WebMonkey, DevShed and Zend. Good luck and welcome - Miles Thompson At 03:46 AM 1/15/2002 +0300, -=LukA=- wrote: Hello php-general, Hi everybody Please help me. If i want to create a table in some database what should I do. The database is on server. -- Best regards, -=LukA=- mailto:[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] apache authentication
I'm trying to do a similar thing, although I'm running PHP as an Apache module. There's a directory I want to protect, containing PDf files, access to which will be constrained by .htaccess. Our users have already logged in through a custom login script. I could modify this script so that when the users are authenticated, I can assign a username/password combination which would be acceptable to .htpasswd. Alternately I could add mod_auth_mysql and use it to authenticate. In either case, a user name and password have to be passed to Apache. Is this done by assignment to $PHP_AUTH_USER and $PHP_AUTH_PW? If so would mod_auth_mysql pick those up automatically, thus the popup wouldn't appear? My other alternative is to move the PDF's outside the web tree and deliver them using the header() function. Although it's been tested and works, many subscribers have IE 5.5 and work in an environment where the company directs what browser will be used. This has become a sticky issue, and all suggestions will be welcome. (Including that I RTFM, if I've missed a particular section.) Regards - Miles Thompson At 11:35 AM 1/14/2002 -0800, [EMAIL PROTECTED] wrote: Apparently i have been unclear, allow me to rephrase: I want to send user:pass to an apache authentication header for a apache protected user directory. Unfortunately, I have php installed as CGI so native php authentication will not function. I would like to either send the user:pass via GET in a url encoded sting (if possible as CGI) OR send user:pass directly to the header using a different method. Due to restrictions imposed on me, i am not able to make use of a single unified logon using LDAP or NTLM. In my case, since there are several user directories spanning severl realms, I must first authenticate users against a mysql auth db and fetch the the realm user:pass based on that users permissions. Is it possible to send the user:pass in any of the methods described above? If so, how can i implement this? Aaron Lake Programmer/Analyst Kvaerner Chemetics A Division of Kvaerner Canada Inc (604) 730 4206 -- 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] unable to copy and chmod
Hi Edgard, I'm trying to copy a file and chmod it to make it writable, but after I copy it using PHP I can't even chmod in ftp ! since you upload it using PHP, most likely the owner of the file is nobody.nobody, that's why you can't chmod thru ftp. (unless you login to ftp as nobody ;)) I can't change the file owner too. only root can chown You need root access to fix your problem...or re-upload your file using ftp, not php. -- Jimmy A diplomat is man who always remembers a woman's birthday but never her age. -- 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] Re: SMS
Hello, Yogesh Mahadnac wrote: Hi everyone! I'd be grateful if someone could please tell me a link where I can find a good tutorial on how to develop a SMS tool with PHP, or if somebody has already developed something like it, or if there are any experts around, please give me some information about it. You may want to look into this. http://phpclasses.upperdesign.com/browse.html/package/396 Regards, Manuel Lemos -- 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] checkboxes vs text filed array and hidden variables
On Monday 14 January 2002 06:03, m. ali wrote: Hi my problem : i have to pass the price, and part number which i get from the database to the shopping cart so when i select some of the items by checking the checkboxes and submit the form i get only the last item in the list i use hidden variables to pass these values to shopping cart. my code look like this: echo TDinput type=\checkbox\ name=\product[]\ value=\$product_id\/TD; echo TDinput type=\text\ size=\2\ name=\quantity[$part_number]\ value=\1\ ; echo/TD; echo input type=\hidden\ value=\$part_number\ name=\part_number\/; echo input type=\hidden\ value=\$discount_price\ name=\discount_price\/; But what is your question? Does the above code work? If not does it give any error messages? Help us to help you by giving us some details :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The probability of someone watching you is proportional to the stupidity of your action. */ -- 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] PHP array or SQL problem
I've got a database with lname (lastname), fname (firstname), and nickname. What I want to do is search by either first name or last name. Either way, I display the nickname instead of the firstname if it exists. I have no problems on the last name, but when I sort by firstname, the people with nicknames that are very different come up at the place where their first name (not the displayed name) is. For example: Adam Smith Joe Schmoe Bill Somebody When Bill Somebody is really William Somebody in the database, his nickname is bill and that's what's displayed but he 'bill' shows up in 'williams' spot. Here is my SQL query: select * from employees order by fname; Should I create an array and sort it there or can I somehow query MySQL to sort by nickname only if it exists and then by fname? Dean