php-general Digest 2 Aug 2013 09:00:27 -0000 Issue 8317 Topics (messages 321750 through 321756):
Re: Sending headers to server 321750 by: Karim Geiger 321756 by: Miguel Guedes Re: POST action 321751 by: Larry Garfield 321752 by: Paul M Foster 321755 by: Robert Cummings Re: SELECT data base on a upper level SELECT 321753 by: iccsi 321754 by: jomali Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net ----------------------------------------------------------------------
--- Begin Message ---Hi MiguelOn 08/01/2013 04:04 PM, Miguel Guedes wrote: > Hello List, > > > I'm running PHP 5.4.9 as CGI (via apache 2.2.22) and can't seem to be > able to send headers to the server. > > Both, > > header('Status: 500 Internal Server Error'); > > and, > > header('HTTP/1.1 500 Internal Server Error', true, 500); > > result in nothing happening on the client side. > > What am I missing? > Works for me. What happens exactly? Do you get a 200? Karim -- Karim Geiger Auszubildender Fachinformatiker AE B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---Hi Karim, On 01/08/13 15:40, Karim Geiger wrote:Works for me. What happens exactly? Do you get a 200?That's exactly right - I always get a 200. How can I diagnose this?
--- End Message ---
--- Begin Message ---On 7/29/13 3:02 PM, Paul M Foster wrote:On Mon, Jul 29, 2013 at 11:50:01AM -0500, Larry Garfield wrote:On 7/28/13 9:23 PM, Paul M Foster wrote:On Sun, Jul 28, 2013 at 08:46:06PM -0500, Larry Garfield wrote:[snip]Except as noted above. This is all home-grown, using native PHP functions designed to do these things, and classes I've written. I carefully examine each field when writing the POST-handling code with the idea in mind that no matter what the HTML says, the return value must conform to what *I* think it should be. No MVC framework written by others (though I do conform to MVC paradigm). PaulThen you're not writing your own form tags from the sound of it; you're writing your own Form API. Still an improvements. :-)No, I'm writing the form tags as well. I write the whole thing, soup to nuts. But as I'm writing the back end validation stuff, I realize that what I wrote in the HTML doesn't matter when it comes to hackers and script kiddies. So I use my bless and validation libraries to tackle form responses. That's the point I'm making. I understand what you're saying about using someone else's framework so you can make sure that tested code is being used to ensure against hacking attempts. But your pronouncement was so thunderous that I had to provide the exception. If you hang around here and read a book or two on security, you can write your own code that handles this stuff. Particularly if you have an example like CodeIgniter to use, to see how it's done. (There are times when I *don't* write the HTML. My wife the designer does. But I still go in and modify it to provide the validation bits which she can't do. She uses Dreamweaver, so a lot of the time, she doesn't even know what the raw HTML looks like.) PaulSo you're writing your own form tags for each specific time you need a form, or you wrote your own form builder API that is writing the form tags for you?Because if the former, I claim it's insecure. The development process is insecure, so you will screw up sooner or later. You're only human.--Larry Garfield
--- End Message ---
--- Begin Message ---On Thu, Aug 01, 2013 at 02:35:04PM -0500, Larry Garfield wrote: [snip] > > So you're writing your own form tags for each specific time you need > a form, or you wrote your own form builder API that is writing the > form tags for you? Unless my wife creates the form in Dreamweaver, I write the HTML for the form fields. Even when she does, I add the proper code to validate each field and the form overall, using my field validation class, etc. > > Because if the former, I claim it's insecure. The development > process is insecure, so you will screw up sooner or later. You're > only human. A-ha! That's where you're wrong, Matey! For I am SUPER-CODER! Faster than a speeding 300 baud modem! More powerful than a teletype! Able to leap tall procedural functions at a single bound! With my pocket protector and trusty slide rule, I defend the indefensible and champion the cause of spaghetti code! So there! ;-P Paul -- Paul M. Foster http://noferblatz.com http://quillandmouse.com
--- End Message ---
--- Begin Message ---On 13-08-01 05:14 PM, Paul M Foster wrote:On Thu, Aug 01, 2013 at 02:35:04PM -0500, Larry Garfield wrote: [snip]So you're writing your own form tags for each specific time you need a form, or you wrote your own form builder API that is writing the form tags for you?Unless my wife creates the form in Dreamweaver, I write the HTML for the form fields. Even when she does, I add the proper code to validate each field and the form overall, using my field validation class, etc.Because if the former, I claim it's insecure. The development process is insecure, so you will screw up sooner or later. You're only human.A-ha! That's where you're wrong, Matey! For I am SUPER-CODER! Faster than a speeding 300 baud modem! More powerful than a teletype! Able to leap tall procedural functions at a single bound! With my pocket protector and trusty slide rule, I defend the indefensible and champion the cause of spaghetti code! So there! ;-PI often get paid to fix such code... keep up the questionable methodologies ;)Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.
--- End Message ---
--- Begin Message ---Thanks for the information and help,The query can solve server side, but client side, user might select any one dropdown, for example, user might select manager from drop down without choose Department dropdown.For this case, application needs inject data for supervisor and lower level, Thanks again for helping, Regards, Iccsi, "Jim Giner" wrote in message news:8c.41.29774.c0e5a...@pb1.pair.com... On 7/31/2013 9:37 PM, iccsi wrote:I have 5 SELECT for Department, Manager, supervisor, Group Leader and Employees I want to every SELECT list narrow down for an upper SELECT. For example, once user select Department then all Manager, Supervisor, Group Leader and Employee list will be narrow down by department and same for manager and supervisor and so on. I can use iframe or jQuery to do every level, but it needs to call iframe or jQuery to 5 levels. I would like to know are there any better way to handle this situation, Your help and information is great appreciated, Regards, Iccsi,How about using just one select and add variables to the where clause? Set the variable(s) to the values that you want to filter on. For ex.: your query is $sel = 1; $q = "select Department, Manager, supervisor, Group Leader,Employees where $sel"; Then when the user selects a department $d: $sel = "Department = '$d'"; OR if you have selected a department $d and a manager $m: $sel = "Department ='$d' and Manager='$m'";One query. A variable 'where' clause.
--- End Message ---
--- Begin Message ---On Thu, Aug 1, 2013 at 6:33 PM, iccsi <inu...@gmail.com> wrote: > Thanks for the information and help, > The query can solve server side, but client side, user might select any > one dropdown, for example, user might select manager from drop down without > choose Department dropdown. > > For this case, application needs inject data for supervisor and lower > level, > No, simply prevent client from submitting form until all required fields are filled in. (A blindingly simple procedure). > > Thanks again for helping, > > Regards, > > Iccsi, > > "Jim Giner" wrote in message news:8C.41.29774.C0E5AF15@pb1.**pair.com... > > On 7/31/2013 9:37 PM, iccsi wrote: > >> I have 5 SELECT for Department, Manager, supervisor, Group Leader and >> Employees >> I want to every SELECT list narrow down for an upper SELECT. >> For example, once user select Department then all Manager, Supervisor, >> Group Leader and Employee list will be narrow down by department and >> same for manager and supervisor and so on. >> >> I can use iframe or jQuery to do every level, but it needs to call >> iframe or jQuery to 5 levels. >> I would like to know are there any better way to handle this situation, >> >> Your help and information is great appreciated, >> >> Regards, >> >> >> Iccsi, >> >> How about using just one select and add variables to the where clause? > Set the variable(s) to the values that you want to filter on. > > For ex.: > > your query is > $sel = 1; > $q = "select Department, Manager, supervisor, Group Leader,Employees > where $sel"; > > Then when the user selects a department $d: > > $sel = "Department = '$d'"; > > OR if you have selected a department $d and a manager $m: > > $sel = "Department ='$d' and Manager='$m'"; > > One query. A variable 'where' clause. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
--- End Message ---