Re: [PHP] Re: So called PHP Expert
On Fri, Mar 20, 2009 at 10:07:30PM -0400, Marc Christopher Hall wrote: This is why I am pushing for legislation to make this a licensed profession. Gawd, I hope you fail. Any number of trips into history will verify that insisting fields be licensed is a bad idea. Mostly licensing is a protection racket for people who want to protect their little area of turf and limit competition. If it doesn't start that way it ends up that way. Anyone can say anything they want, including that they are licensed. The real test is, can they produce the product? That's why you want to see what the guy's done in the past and check references before you write him a quarter million dollar check. The last official programming job I had (as a FoxPro programmer) happened because my prospective employer came to my office and I showed him some code I'd written for my then current employer. I got the job on the spot, because he could clearly see I knew how to code in FoxPro. And he wasn't sorry later that he hired me. I don't know how many guys I've seen with numerous initials after their names who couldn't actually do what they were supposedly trained to do. But people were sure impressed by all the initials. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: So called PHP Expert
Maybe someone else will disagree and say that its a masterpiece, then I'll bow out gracefully. Actually, it is a masterpiece and it _should_ be treated like the prize that it is with it's own page on some wiki. Under the title How not to do it. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script Analysis (was Conclusion of use strict...)
Thanks, I downloaded Netbeans week or two ago and I found all that. I thought there is something more advanced (these things have any decent editor/ide (for example eclipse + pdt also have all that)). We are talking completely different level of checks :-) In the end I may switch to non-free version of Codenizer (unless someone points me how to check for at least non-initialized variables with Netbeans, and save me 20$ :-) On Sat, 21 Mar 2009 01:17:20 +0100, George Larson george.g.lar...@gmail.com wrote: Ooops! Those were v5.5 videos.. A little newer stuff is here: http://www.netbeans.org/kb/docs/screencasts.html On Fri, Mar 20, 2009 at 7:44 PM, George Larson george.g.lar...@gmail.comwrote: Netbeans does have some sick fanciness... Auto-suggest, leaving your cursor over a variable momentarily highlights it everywhere in the code and define labeled folding points. You can press CTRL-R to rename that variable everywhere it is used in the code. If you can figure out how to set it up with xdebug (I'm working on it) then you can have step-by-step debugging. NetBeans is well worth giving a chance, in my opinion. You can check out some videos if you don't want to risk the time. ( http://www.netbeans.org/kb/55/flash.html) On Fri, Mar 20, 2009 at 5:07 PM, Hans Schultz h.schult...@yahoo.comwrote: On Fri, 20 Mar 2009 15:45:09 +0100, Virgilio Quilario virgilio.quila...@gmail.com wrote: On Fri, Mar 20, 2009 at 6:47 PM, Pierre Lilliman lilli...@live.com wrote: I have been using same program for some (not very long time), and I find it very useful, although it has some annoying things (inability to work with all kinds of include expressions). Still I think every serious PHP developer should consider using something like this. Cheers --- On Thu, 3/19/09, Hans Schultz wrote: If someone is still interested in problem I found litle tool that is pretty close to detecting errors in PHP at compile time (compile time rghhh :P). It is Codenizer (http://www.softwarehood.com/Codenizer/), I am still checking it, if someone uses it it would be nice to share experience :) Hi guys, Check out Netbeans IDE for PHP. http://www.netbeans.org/features/php/ Your wishes answered. Though it doesn't have use strict but it tracks variables for you. Virgil http://www.jampmark.com Can you please elaborate on this (using Netbeans to track variables), I know what Codenizer does, but I didn't manage to make Netbeans to do this variable track? Few guys also mentioned that but I couldn't really find that feature? TIA -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script Analysis (was Conclusion of use strict...)
Thanks, I downloaded Netbeans week or two ago and I found all that. I thought there is something more advanced (these things have any decent editor/ide (for example eclipse + pdt also have all that)). We are talking completely different level of checks :-) In the end I may switch to non-free version of Codenizer (unless someone points me how to check for at least non-initialized variables with Netbeans, and save me 20$ :-) Hi Hans, Is this what you are looking for? Debug PHP code using Xdebug: You can inspect local variables, set watches, set breakpoints, and evaluate code live. Navigate to declarations, types and files using Go To shortcuts and hypertext links. It is from this url: http://www.netbeans.org/features/php/ Or maybe this. It highlights those variables not initialized. See the screencast. http://www.netbeans.org/kb/docs/php/php-editor-screencast.html Maybe should try it sometime. Best wishes, Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: today i found the best function I've ever seen
It's in the upcoming retrograde release: PHP 3.11 (For Workgroups). Sweet! Will that improve security? What about right mouse button, will it remove it? Not sure about that, but I heard it should fix the bug with my new mouse and the center button tilt clicker thingy I think threads unless renamed, could misguide non-native ppl like me. Should rename it like : PHP Oddest jokes ever :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009
As a matter of fact DANIEL ...I AM A REAL PERSON ! You know, I really hate it that people like YOU reply back to me with your self-vain - self-important attitudes - and act like no one else on the F-ing planet has the right to live or even share the same air you breath YOU DANIEL are NOT that great! You are NO BETTER than me or anyone else here. As I CLEARLY state in my email, I work with other web developers in helping them do small menial work which just consumes their time and I have a crew of people willing to work and who just want to put FOOD on their TABLES! Do you understand that DANIEL? No one here is trying to OFFEND DANIEL HIS ALMIGHTY GREATNESSwe're just all trying to make the economy go around by generating business...or do I have to teach you about that as well??? You know, before you go off being nasty about everything and trying to assert your SELF-appointed importance - why don’t you kindly say - don’t email us here - of course I will not. I have no interest in causing anyone any hassles, including myself. Had I known I would have met such unkind, unprofessional, self-centered attitude I wouldn't have even bothered to try to make contact with you. This whole attitude of anti-business that's taking place in the world is just going to lead to Government dependency and elimination of all personal Freedoms to self-expression and self-reliance. So you may call me a spammer but I am entitled to try my best to pay my own bills rather than ask for an Uncle Sam handout. I hope the best to all of you and great success to your Families and your businesses. ~Samantha (a real person) hi Samantha, Real or not, please post appropriate to the list. This is about PHP programming not advertising services. We do understand your intentions but this is not the right forum for something like this. Thank you. Cheers, Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] today i found the best function I've ever seen
if( !function_exists('clean_sql_term') ) { function clean_sql_term($term) { return $term; } } beautiful hi Nathan, Nice find. You have found a very useful function. Here is how I use it to load needed PHP files that declares the function. if (!function_exists('clean_sql_term')) { require 'module.php'; } clean_sql_term($term); Above code makes sure that the function is available. Really beautiful, though jurassic but useful. Cheers, Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Having trouble with a form to mail script.
Hi there, Well, after reading the post about so called experts and licensing programming, I can say that I sure am not licensed or even remotely close to a novice PHP programmer, just a ‘lil ole PHP beginner trying to get my web page set up and learn a few things. I’m not sure if I am in the right forum but thought I would give this a shot… I just created a new mail form in Dreamweaver for a web site. I’m working on a form to mail script that I started after reading a few on line tutorials, and can’t seem to get right. When I run this little test script (named sendmail2.php) from the tutorial, on my server, just to make sure PHP is working OK for web email forms: ?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( h...@mydomain.com, Feedback Form Results, $message, From: $email ); header( Location: http://www.mydomain.com/thankyou.html; ); ? Which takes input from the following testmail.html page form: form method=post action=sendmail2.php Email: input name=email type=text /br / Message:br / textarea name=message rows=15 cols=40 /textareabr / input type=submit / /form It works great, I get the senders email address and comment sent to my email address – account. But the form I want to use my final design from Dreamweaver, is: form id=formEmail name=formEmail method=post action=sendmail2.php fieldset legendAccount Info:/legend label for=emailAddressUser Name:/label input type=text name=emailAddress id=emailAddress tabindex=10 / br / label for=pwdPassword/label input type=text name=pwd id=pwd tabindex=20 / br / label for=confirmConfirm Password:/label input type=text name=confirm id=confirm tabindex=30 / br / /fieldset fieldset legendPersonal Info/legend br / label for=firstnameFirst Name:/label input type=text name=firstname id=firstname tabindex=40 / br / br / label for=lastnameLast Name:/label input type=text name=lastname id=lastname tabindex=50 / br / br / label for=regionWhat state do you live in?/label select name=region id=region tabindex=60 option value=alAlabama/option option value=inIndiana/option option value=mich selected=selectedMichigan/option option value=ohOhio/option /select br / p How long have u been sawing?/p label input type=radio name=WoodLength value=newbie id=WoodLength_0 tabindex=70 / 0-2 years/label br / label input type=radio name=WoodLength value=novice id=WoodLength_1 tabindex=80 / 3-5 years/label/td br / label input type=radio name=WoodLength value=expert id=WoodLength_2 tabindex=90/ 6 plus years/labelbr / pWhat tools do you use most often?/p br / input type=checkbox name=shop id=shop tabindex=100 / label for=shopShopping/label br / input type=checkbox name=tools id=tools tabindex=120 / label for=toolsTools/label br / input type=checkbox name=saws id=saws tabindex=130 / label for=sawsSaws/label br / label for=CommentsAdditional Comments/label br / textarea name=Comments id=Comments cols=50 rows=10 tabindex=140/textarea br / input type=submit name=submit id=Submit value=Join Mail List tabindex=160 / br / /fieldset /form …and when I use it with the associated sendmail2.php script: ?php /*? ?php $emailAddress = $_REQUEST['emailAddress'] ; $pwd = $_REQUEST['pwd'] ; $confirm = $_REQUEST['confirm'] ; $firstname = $_REQUEST['firstname'] ; $lastname = $_REQUEST['lastname'] ; $region = $_REQUEST['region'] ; $WoodLength = $_REQUEST['WoodLength'] ; $shop = $_REQUEST['shop'] ; $tools = $_REQUEST['tools'] ; $saws = $_REQUEST['saws'] ; $Comments = $_REQUEST['Comments'] ; mail( h...@mydomain.com, Feedback Form Results, $message, From: $email ); header( Location: http://www.mydomain.com/thankyou.html; ); ? The email is received, but with a blank return email address and an empty message. None of the comments or form values get through - just a blank email sent to my address. Can anyone point me in the right direction – what am I doing wrong? Note: That password field is not really a login password, I just wanted to use it for testing purposes. Do I have to refrence the type and id attributes in the php script as well? Thanks for any input. _ Get quick access to your favorite MSN content with Internet Explorer 8. http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
Re: [PHP] Trying To Read - Show A Csv File Line By Line
The for loop iterates through each field of each line, the while loop iterates through each line. Move the br / out of the for loop, right before the end of the while loop as follows: ?php $row = 1; $handle = fopen(try3.csv, r); while (($data = fgetcsv($handle, 1000, ,)) !== FALSE) { $num = count($data); echo p $num fields in line $row: br //p\n; $row++; for ($c=0; $c $num; $c++) { echo $data[$c] . ; // This will separate each field with a space. } echo br /\n; } fclose($handle); ? hi guys, here is a shortcut to displaying a line of csv. instead of using for loop, use implode like this. echo implode(' ', $data) . br /\n; that would display the fields separated by spaces. Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009
Date: Sat, 21 Mar 2009 18:10:41 +0800 From: virgilio.quila...@gmail.com To: webdes...@ginkga.com CC: danbr...@php.net; joc...@iamjochem.com; php-general@lists.php.net; george.g.lar...@gmail.com Subject: Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009 As a matter of fact DANIEL ...I AM A REAL PERSON ! You know, I really hate it that people like YOU reply back to me with your self-vain - self-important attitudes - and act like no one else on the F-ing planet has the right to live or even share the same air you breath YOU DANIEL are NOT that great! You are NO BETTER than me or anyone else here. As I CLEARLY state in my email, I work with other web developers in helping them do small menial work which just consumes their time and I have a crew of people willing to work and who just want to put FOOD on their TABLES! Do you understand that DANIEL? No one here is trying to OFFEND DANIEL HIS ALMIGHTY GREATNESSwe're just all trying to make the economy go around by generating business...or do I have to teach you about that as well??? You know, before you go off being nasty about everything and trying to assert your SELF-appointed importance - why don’t you kindly say - don’t email us here - of course I will not. I have no interest in causing anyone any hassles, including myself. Had I known I would have met such unkind, unprofessional, self-centered attitude I wouldn't have even bothered to try to make contact with you. This whole attitude of anti-business that's taking place in the world is just going to lead to Government dependency and elimination of all personal Freedoms to self-expression and self-reliance. So you may call me a spammer but I am entitled to try my best to pay my own bills rather than ask for an Uncle Sam handout. I hope the best to all of you and great success to your Families and your businesses. ~Samantha (a real person) hi Samantha, Real or not, please post appropriate to the list. This is about PHP programming not advertising services. We do understand your intentions but this is not the right forum for something like this. Thank you. Cheers, Virgil http://www.jampmark.com Hello Virgilio, I think there was real no need for that and you would agree with me if only you had gone through the rest of the thread and then you would have realized that Almighty Dan and Miss (BOT) Samantha have made up on an ass spanking note. Alugo Abdulazeez. _ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx
Re: [PHP] Having trouble with a form to mail script.
2009/3/21 Linda Stark nads...@live.com: Hi there, Well, after reading the post about so called experts and licensing programming, I can say that I sure am not licensed or even remotely close to a novice PHP programmer, just a ‘lil ole PHP beginner trying to get my web page set up and learn a few things. I’m not sure if I am in the right forum but thought I would give this a shot… I just created a new mail form in Dreamweaver for a web site. I’m working on a form to mail script that I started after reading a few on line tutorials, and can’t seem to get right. When I run this little test script (named sendmail2.php) from the tutorial, on my server, just to make sure PHP is working OK for web email forms: ?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( h...@mydomain.com, Feedback Form Results, $message, From: $email ); header( Location: http://www.mydomain.com/thankyou.html; ); ? Which takes input from the following testmail.html page form: form method=post action=sendmail2.php Email: input name=email type=text /br / Message:br / textarea name=message rows=15 cols=40 /textareabr / input type=submit / /form It works great, I get the senders email address and comment sent to my email address – account. But the form I want to use my final design from Dreamweaver, is: form id=formEmail name=formEmail method=post action=sendmail2.php fieldset legendAccount Info:/legend label for=emailAddressUser Name:/label input type=text name=emailAddress id=emailAddress tabindex=10 / br / label for=pwdPassword/label input type=text name=pwd id=pwd tabindex=20 / br / label for=confirmConfirm Password:/label input type=text name=confirm id=confirm tabindex=30 / br / /fieldset fieldset legendPersonal Info/legend br / label for=firstnameFirst Name:/label input type=text name=firstname id=firstname tabindex=40 / br / br / label for=lastnameLast Name:/label input type=text name=lastname id=lastname tabindex=50 / br / br / label for=regionWhat state do you live in?/label select name=region id=region tabindex=60 option value=alAlabama/option option value=inIndiana/option option value=mich selected=selectedMichigan/option option value=ohOhio/option /select br / p How long have u been sawing?/p label input type=radio name=WoodLength value=newbie id=WoodLength_0 tabindex=70 / 0-2 years/label br / label input type=radio name=WoodLength value=novice id=WoodLength_1 tabindex=80 / 3-5 years/label/td br / label input type=radio name=WoodLength value=expert id=WoodLength_2 tabindex=90/ 6 plus years/labelbr / pWhat tools do you use most often?/p br / input type=checkbox name=shop id=shop tabindex=100 / label for=shopShopping/label br / input type=checkbox name=tools id=tools tabindex=120 / label for=toolsTools/label br / input type=checkbox name=saws id=saws tabindex=130 / label for=sawsSaws/label br / label for=CommentsAdditional Comments/label br / textarea name=Comments id=Comments cols=50 rows=10 tabindex=140/textarea br / input type=submit name=submit id=Submit value=Join Mail List tabindex=160 / br / /fieldset /form …and when I use it with the associated sendmail2.php script: ?php /*? ?php $emailAddress = $_REQUEST['emailAddress'] ; $pwd = $_REQUEST['pwd'] ; $confirm = $_REQUEST['confirm'] ; $firstname = $_REQUEST['firstname'] ; $lastname = $_REQUEST['lastname'] ; $region = $_REQUEST['region'] ; $WoodLength = $_REQUEST['WoodLength'] ; $shop = $_REQUEST['shop'] ; $tools = $_REQUEST['tools'] ; $saws = $_REQUEST['saws'] ; $Comments = $_REQUEST['Comments'] ; mail( h...@mydomain.com, Feedback Form Results, $message, From: $email ); header( Location: http://www.mydomain.com/thankyou.html; ); ? The email is received, but with a blank return email address and an empty message. None of the comments or form values get through - just a blank email sent to my address. Can anyone point me in the right direction – what am I doing wrong? Note: That password field is not really a login password, I just wanted to use it for testing purposes. Do I have to refrence the type and id attributes in the php script as well? Thanks for any input. It looks like you are not using the same variable names in all the places that you want to use a variable. For one thing, $email is not set, but $emailAddress is. That should be enough to get you started. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to make multiple sql run faster
Hi all, I am inserting more than 5000 rows into sql database but its taking more than 30 mins to get it all the data inserted. I use union to insert multiple rows of 20 at a time. What is the best way to make insert sql statement run faster -- andrew www.willandy.co.uk
RE: [PHP] Script Analysis (was Conclusion of use strict...)
Using it (and Codenizer within), this is completely different thing... Regards Hi guys, Check out Netbeans IDE for PHP. http://www.netbeans.org/features/php/ Your wishes answered. Though it doesn't have use strict but it tracks variables for you. Virgil http://www.jampmark.com _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic Form 'on The Fly' OT
At 1:03 PM -0500 3/20/09, Lists wrote: tedd wrote: Now, can you show me how to pull data from a mysql database so that the input statements can be created dynamically? Sure, On the WebDNA side, it's something like this (form of names from a database): -snip- However, like you said, this a PHP list, so I'd better refrain from any more WebDNA related posts for a while! ;-) I don't want to upset the powers that be. Donovan: There's no powers that be on this list. The closest is Dan and we all ignore him. :-) Next question -- how do you keep login's and passwords safe? Is the following not embedded in the html? [SQLConnect dbType=MySQLhost=192.168.1.1database=TestNamesuid=sapwd=passconn_var=conn1] [/SQLConnect] If so, then doesn't that create a security concern? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_real_escape_string paranoid enough?
At 11:41 AM -0500 3/20/09, Richard Lynch wrote: I typically do something like this: $data_sql = mysql_real_escape_string($data, $connection); $query = insert into data(data) values('$data_sql'); $insert = mysql_query($query, $connection); if (!$insert){ trigger_error(mysql_error($connection), E_USER_ERROR); } Richard: Isn't this -- $insert = mysql_query($query, $connection); if (!$insert){ trigger_error(mysql_error($connection), E_USER_ERROR); } -- the same as: $result = mysql_query($query) or die(trigger_error(mysql_error($connection), E_USER_ERROR))); Why not use die? For error reporting, I use this: $result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__)); Where: function report($query, $line, $file) { echo($query . 'br /' .$line . 'br /' . $file . 'br /' . mysql_error()); } HTH's tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP blogs?
At 12:52 PM -0700 3/20/09, Michael A. Peters wrote: Stuart wrote: 2009/3/20 George Larson george.g.lar...@gmail.com: I'm reorganizing my reader. Anybody suggest any good PHP feeds? http://www.planet-php.net/ is an aggregator of some of the good stuff that's out there. It displays horribly in Firefox. They need to fix it. Same here in Safari. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to make multiple sql run faster
Usually a single transaction is faster than an insert a time (with or without union) Date: Sat, 21 Mar 2009 12:05:18 + From: andrew4willi...@gmail.com To: php-general@lists.php.net Subject: [PHP] how to make multiple sql run faster Hi all, I am inserting more than 5000 rows into sql database but its taking more than 30 mins to get it all the data inserted. I use union to insert multiple rows of 20 at a time. What is the best way to make insert sql statement run faster -- andrew www.willandy.co.uk _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
Re: [PHP] So called PHP Expert
At 12:27 AM +0200 3/21/09, ÈýÏÝÂÔ wrote: Help me find something to say to him - I am not so good at that kind of stuff Daniel: It's pointless to say anything at all. People who claim to know everything, probably do -- in their limited world. They need the time and life experiences to open their world -- as such, what you have to say is probably wasted breath. From my perspective, once you realize how much you don't know, then you can grow. I am amazed everyday by my vast ignorance. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: So called PHP Expert
At 10:07 PM -0400 3/20/09, Marc Christopher Hall wrote: This is why I am pushing for legislation to make this a licensed profession. Licensed where, and by whom? I envision paying M$ for some form of certification -- I can do with out. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Development/Application Analysis
At 11:45 PM +0300 3/20/09, OOzy Pal wrote: I guess I did not make it clear. Sorry guys/gals. I forgot to tell you that I own a web development/design company. Thank you -- OOzy What does that have to do with your questions -- other than you should have known the answers. Some times it's just pointless to provide advice. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: So called PHP Expert
This is why I am pushing for legislation to make this a licensed profession. Licensed where, and by whom? I envision paying M$ for some form of certification -- I can do with out. Exactly. Programming is an accredited profession, not a licensed profession. Where did the OP's expert study? I should make it know that I'm self-taught, so I do not rule out the possibility that one could teach himself. But I do not play the expert card, either. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic Form 'on The Fly' OT
On Sat, Mar 21, 2009 at 8:58 AM, tedd tedd.sperl...@gmail.com wrote: At 1:03 PM -0500 3/20/09, Lists wrote: tedd wrote: Now, can you show me how to pull data from a mysql database so that the input statements can be created dynamically? Sure, On the WebDNA side, it's something like this (form of names from a database): -snip- However, like you said, this a PHP list, so I'd better refrain from any more WebDNA related posts for a while! ;-) I don't want to upset the powers that be. Donovan: There's no powers that be on this list. The closest is Dan and we all ignore him. :-) Next question -- how do you keep login's and passwords safe? Is the following not embedded in the html? [SQLConnect dbType=MySQLhost=192.168.1.1database=TestNamesuid=sapwd=passconn_var=conn1] [/SQLConnect] If so, then doesn't that create a security concern? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php For the record, I'm with Tedd. Regardless of this being a designated PHP arena, I'm enjoying this WebDNA conversation and might even give it a test drive...
Re: [PHP] Script Analysis (was Conclusion of use strict...)
Hi Virgilio, Thanks for that last link, I just know need to figure out why my Netbeans doesn't work like that (although I am using latest version) On Sat, 21 Mar 2009 10:56:46 +0100, Virgilio Quilario virgilio.quila...@gmail.com wrote: Hi Hans, Is this what you are looking for? Debug PHP code using Xdebug: You can inspect local variables, set watches, set breakpoints, and evaluate code live. Navigate to declarations, types and files using Go To shortcuts and hypertext links. It is from this url: http://www.netbeans.org/features/php/ Or maybe this. It highlights those variables not initialized. See the screencast. http://www.netbeans.org/kb/docs/php/php-editor-screencast.html Maybe should try it sometime. Best wishes, Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Development/Application Analysis
On Sat, Mar 21, 2009 at 9:40 AM, tedd tedd.sperl...@gmail.com wrote: At 11:45 PM +0300 3/20/09, OOzy Pal wrote: I guess I did not make it clear. Sorry guys/gals. I forgot to tell you that I own a web development/design company. Thank you -- OOzy What does that have to do with your questions -- other than you should have known the answers. Some times it's just pointless to provide advice. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Lol @ Tedd!
Re: [PHP] So called PHP Expert
On Sat, 2009-03-21 at 09:29 -0400, tedd wrote: At 12:27 AM +0200 3/21/09, “•ÈýÏÝ“•ÂÔ wrote: Help me find something to say to him - I am not so good at that kind of stuff Daniel: It's pointless to say anything at all. People who claim to know everything, probably do -- in their limited world. They need the time and life experiences to open their world -- as such, what you have to say is probably wasted breath. From my perspective, once you realize how much you don't know, then you can grow. I am amazed everyday by my vast ignorance. tedd kids you not. I'm standing at the edge of his ignorance and I just droppped a rock... I've yet to hear it hit the bottom. I'll let you know when I do. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script Analysis (was Conclusion of use strict...)
**On Sat, Mar 21, 2009 at 10:27 AM, Hans Schultz h.schult...@yahoo.comwrote: Hi Virgilio, Thanks for that last link, I just know need to figure out why my Netbeans doesn't work like that (although I am using latest version) On Sat, 21 Mar 2009 10:56:46 +0100, Virgilio Quilario virgilio.quila...@gmail.com wrote: Hi Hans, Is this what you are looking for? Debug PHP code using Xdebug: You can inspect local variables, set watches, set breakpoints, and evaluate code live. Navigate to declarations, types and files using Go To shortcuts and hypertext links. It is from this url: http://www.netbeans.org/features/php/ Or maybe this. It highlights those variables not initialized. See the screencast. http://www.netbeans.org/kb/docs/php/php-editor-screencast.html Maybe should try it sometime. Best wishes, Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php XDebug is not easy to set up. I have a couple of Windows (and a couple of Linux) boxes that I have tried. The instructions are generally *really *simple... and ineffective (for me). However, it looks like if you're smart enough then it is really smashing. :)
Re: [PHP] So called PHP Expert
tedd kids you not. I'm standing at the edge of his ignorance and I just droppped a rock... I've yet to hear it hit the bottom. I'll let you know when I do. That was you?!? I'm stand right here in the middle of ignorance and BAM! a rock falls out of nowhere. There are people in here, you insensitive clod! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] need help with code
I hate asking for help with simple code like this because I can usually figure it out, but I'm stumped on this one. I'm getting a parser error on line 13, whether I comment out the require_once line or not. Can you help? ?php require_once('twitterlib.php'); $consumerKey=yVVRd1QCJYBtT8tT7ocg; $consumerSecret=DHzhJYOP2hBWfHpHawGxRQEFf98nF4TBTfabel2ukE; $accessToken = $_COOKIE['accessToken']; $reqToken = $_COOKIE['reqToken']; if ($accessToken===NULL) { if ($reqToken === NULL) { //get a req token $to = new TwitterOAuth($consumerKey, $consumerSecret); $tok = $to-getRequestToken(); $reqToken = $tok['oauth_token']; $reqTokenSecret = $tok['oauth_token_secret']; $request_link = $to-getAuthorizeURL($toc); $content = 'Click on the link to go to twitter to authorize your account.'; $content .= 'br /a href='.$request_link.''.$request_link.'/a'; setCookie('reqToken',$reqToken,time()+(24*30*60*60),'/'); setCookie('reqTokenSecret',$reqTokenSecret,time()+(24*30*60*60),'/'); ? htmlheadtitleauthorize/title/headbody ?php echo $content;? /body/html ?php } else { /* If the access tokens are already set skip to the API call */ if ($_COOKIE['accessToken']===NULL) { /* Create TwitterOAuth object with app key/secret and token key/secret from default phase */ $to = new TwitterOAuth($consumerKey,$consumerSecret,$_COOKIE['reqToken'],$_COOKIE['reqTokenSecret']); /* Request access tokens from twitter */ $tok = $to-getAccessToken(); /* Save the access tokens. Normally these would be saved in a database for future use. */ setCookie('accessToken',tok['oauth_token'],time()*24*60*60*30,'/') setCookie('accessTokenSecret',tok['oauth_token_secret'],time()*24*60*60*30,'/') header(location http://www.chriswestbrook.com/twitter/twitter.php;); } } ?
Re: [PHP] Having trouble with a form to mail script.
Hi there, Well, after reading the post about so called experts and licensing programming, I can say that I sure am not licensed or even remotely close to a novice PHP programmer, just a ‘lil ole PHP beginner trying to get my web page set up and learn a few things. I’m not sure if I am in the right forum but thought I would give this a shot… I just created a new mail form in Dreamweaver for a web site. I’m working on a form to mail script that I started after reading a few on line tutorials, and can’t seem to get right. When I run this little test script (named sendmail2.php) from the tutorial, on my server, just to make sure PHP is working OK for web email forms: ?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( h...@mydomain.com, Feedback Form Results, $message, From: $email ); header( Location: http://www.mydomain.com/thankyou.html; ); ? Which takes input from the following testmail.html page form: form method=post action=sendmail2.php Email: input name=email type=text /br / Message:br / textarea name=message rows=15 cols=40 /textareabr / input type=submit / /form It works great, I get the senders email address and comment sent to my email address – account. But the form I want to use my final design from Dreamweaver, is: form id=formEmail name=formEmail method=post action=sendmail2.php fieldset legendAccount Info:/legend label for=emailAddressUser Name:/label input type=text name=emailAddress id=emailAddress tabindex=10 / br / label for=pwdPassword/label input type=text name=pwd id=pwd tabindex=20 / br / label for=confirmConfirm Password:/label input type=text name=confirm id=confirm tabindex=30 / br / /fieldset fieldset legendPersonal Info/legend br / label for=firstnameFirst Name:/label input type=text name=firstname id=firstname tabindex=40 / br / br / label for=lastnameLast Name:/label input type=text name=lastname id=lastname tabindex=50 / br / br / label for=regionWhat state do you live in?/label select name=region id=region tabindex=60 option value=alAlabama/option option value=inIndiana/option option value=mich selected=selectedMichigan/option option value=ohOhio/option /select br / p How long have u been sawing?/p label input type=radio name=WoodLength value=newbie id=WoodLength_0 tabindex=70 / 0-2 years/label br / label input type=radio name=WoodLength value=novice id=WoodLength_1 tabindex=80 / 3-5 years/label/td br / label input type=radio name=WoodLength value=expert id=WoodLength_2 tabindex=90/ 6 plus years/labelbr / pWhat tools do you use most often?/p br / input type=checkbox name=shop id=shop tabindex=100 / label for=shopShopping/label br / input type=checkbox name=tools id=tools tabindex=120 / label for=toolsTools/label br / input type=checkbox name=saws id=saws tabindex=130 / label for=sawsSaws/label br / label for=CommentsAdditional Comments/label br / textarea name=Comments id=Comments cols=50 rows=10 tabindex=140/textarea br / input type=submit name=submit id=Submit value=Join Mail List tabindex=160 / br / /fieldset /form …and when I use it with the associated sendmail2.php script: ?php /*? ?php $emailAddress = $_REQUEST['emailAddress'] ; $pwd = $_REQUEST['pwd'] ; $confirm = $_REQUEST['confirm'] ; $firstname = $_REQUEST['firstname'] ; $lastname = $_REQUEST['lastname'] ; $region = $_REQUEST['region'] ; $WoodLength = $_REQUEST['WoodLength'] ; $shop = $_REQUEST['shop'] ; $tools = $_REQUEST['tools'] ; $saws = $_REQUEST['saws'] ; $Comments = $_REQUEST['Comments'] ; mail( h...@mydomain.com, Feedback Form Results, $message, From: $email ); header( Location: http://www.mydomain.com/thankyou.html; ); ? The email is received, but with a blank return email address and an empty message. None of the comments or form values get through - just a blank email sent to my address. Can anyone point me in the right direction – what am I doing wrong? Note: That password field is not really a login password, I just wanted to use it for testing purposes. Do I have to refrence the type and id attributes in the php script as well? Thanks for any input. hi Linda, change some parameters to the mail function: mail( h...@mydomain.com, Feedback Form Results, $comments, From: $emailAddress ); if you want to include the other inputs, just concatenate them into $comments. Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So called PHP Expert
At 10:37 AM -0400 3/21/09, Robert Cummings wrote: On Sat, 2009-03-21 at 09:29 -0400, tedd wrote: From my perspective, once you realize how much you don't know, then you can grow. I am amazed everyday by my vast ignorance. tedd kids you not. I'm standing at the edge of his ignorance and I just droppped a rock... I've yet to hear it hit the bottom. I'll let you know when I do. Cheers, LOL !!! Leave it to you to drop kick me when you have the chance. Here I was trying to say something prophetic and you made it pathetic. :-) Oh well, at least I take comfort in the fact that you'll probably not live to be as old as me. But if you do, just imagine how deep your ignorance will be. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need help with code
On Sat, Mar 21, 2009 at 10:42, Chris Westbrook westbch...@gmail.com wrote: I hate asking for help with simple code like this because I can usually figure it out, but I'm stumped on this one. I'm getting a parser error on line 13, whether I comment out the require_once line or not. Can you help? Probably, but we'll need the error message and the code on the offending line. My guess from what you've shown in the code below is that line 13: $to = new TwitterOAuth($consumerKey, $consumerSecret); is telling you that it doesn't know TwitterOAuth(). And if that's the case, are you sure that it's properly defined and being included as appropriate from twitterlib.php? ?php require_once('twitterlib.php'); $consumerKey=yVVRd1QCJYBtT8tT7ocg; $consumerSecret=DHzhJYOP2hBWfHpHawGxRQEFf98nF4TBTfabel2ukE; $accessToken = $_COOKIE['accessToken']; $reqToken = $_COOKIE['reqToken']; if ($accessToken===NULL) { if ($reqToken === NULL) { //get a req token $to = new TwitterOAuth($consumerKey, $consumerSecret); $tok = $to-getRequestToken(); $reqToken = $tok['oauth_token']; $reqTokenSecret = $tok['oauth_token_secret']; $request_link = $to-getAuthorizeURL($toc); $content = 'Click on the link to go to twitter to authorize your account.'; $content .= 'br /a href='.$request_link.''.$request_link.'/a'; setCookie('reqToken',$reqToken,time()+(24*30*60*60),'/'); setCookie('reqTokenSecret',$reqTokenSecret,time()+(24*30*60*60),'/'); ? htmlheadtitleauthorize/title/headbody ?php echo $content;? /body/html ?php } else { /* If the access tokens are already set skip to the API call */ if ($_COOKIE['accessToken']===NULL) { /* Create TwitterOAuth object with app key/secret and token key/secret from default phase */ $to = new TwitterOAuth($consumerKey,$consumerSecret,$_COOKIE['reqToken'],$_COOKIE['reqTokenSecret']); /* Request access tokens from twitter */ $tok = $to-getAccessToken(); /* Save the access tokens. Normally these would be saved in a database for future use. */ setCookie('accessToken',tok['oauth_token'],time()*24*60*60*30,'/') setCookie('accessTokenSecret',tok['oauth_token_secret'],time()*24*60*60*30,'/') header(location http://www.chriswestbrook.com/twitter/twitter.php;); } } ? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need help with code
I hate asking for help with simple code like this because I can usually figure it out, but I'm stumped on this one. I'm getting a parser error on line 13, whether I comment out the require_once line or not. Can you help? ?php require_once('twitterlib.php'); $consumerKey=yVVRd1QCJYBtT8tT7ocg; $consumerSecret=DHzhJYOP2hBWfHpHawGxRQEFf98nF4TBTfabel2ukE; $accessToken = $_COOKIE['accessToken']; $reqToken = $_COOKIE['reqToken']; if ($accessToken===NULL) { if ($reqToken === NULL) { //get a req token $to = new TwitterOAuth($consumerKey, $consumerSecret); $tok = $to-getRequestToken(); $reqToken = $tok['oauth_token']; $reqTokenSecret = $tok['oauth_token_secret']; $request_link = $to-getAuthorizeURL($toc); $content = 'Click on the link to go to twitter to authorize your account.'; $content .= 'br /a href='.$request_link.''.$request_link.'/a'; setCookie('reqToken',$reqToken,time()+(24*30*60*60),'/'); setCookie('reqTokenSecret',$reqTokenSecret,time()+(24*30*60*60),'/'); ? htmlheadtitleauthorize/title/headbody ?php echo $content;? /body/html ?php } else { /* If the access tokens are already set skip to the API call */ if ($_COOKIE['accessToken']===NULL) { /* Create TwitterOAuth object with app key/secret and token key/secret from default phase */ $to = new TwitterOAuth($consumerKey,$consumerSecret,$_COOKIE['reqToken'],$_COOKIE['reqTokenSecret']); /* Request access tokens from twitter */ $tok = $to-getAccessToken(); /* Save the access tokens. Normally these would be saved in a database for future use. */ setCookie('accessToken',tok['oauth_token'],time()*24*60*60*30,'/') setCookie('accessTokenSecret',tok['oauth_token_secret'],time()*24*60*60*30,'/') header(location http://www.chriswestbrook.com/twitter/twitter.php;); } } ? hi Chris, basing on the code you posted, you're missing the closing brace for if ($accessToken===NULL) { there should be 3 closing braces before the last ? cheers, Virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic Form 'on The Fly' OT
At 10:26 AM -0400 3/21/09, George Larson wrote: For the record, I'm with Tedd. Regardless of this being a designated PHP arena, I'm enjoying this WebDNA conversation and might even give it a test drive... One of the good things about this list is that most of us are multi-lingual. Most of us know that php does not exist in a vacuum (try telling that to a css list sometime) and we need to know how to use other languages to get stuff done. If WebDNA can provide something new to the table, I'm all ears. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So called PHP Expert
On Sat, Mar 21, 2009 at 10:48, tedd tedd.sperl...@gmail.com wrote: Leave it to you to drop kick me when you have the chance. Here I was trying to say something prophetic and you made it pathetic. :-) Maybe philosophical? Oh well, at least I take comfort in the fact that you'll probably not live to be as old as me. But if you do, just imagine how deep your ignorance will be. :-) Now *this* is prophetic and a harsh response to a virtual drop-kick. You guys play rough! -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need help with code
On Sat, Mar 21, 2009 at 10:54, Virgilio Quilario virgilio.quila...@gmail.com wrote: hi Chris, basing on the code you posted, you're missing the closing brace for if ($accessToken===NULL) { there should be 3 closing braces before the last ? That'll be the next error, but that error would print unexpected $end on line xxx. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Development/Application Analysis
Tedd, You wrote a long story about a client hiring a programmer which not what I am asking. Anyhow, thank you for your post. I learned from it. I don't want to take it further. This php mailing list. On Sat, Mar 21, 2009 at 4:40 PM, tedd tedd.sperl...@gmail.com wrote: At 11:45 PM +0300 3/20/09, OOzy Pal wrote: I guess I did not make it clear. Sorry guys/gals. I forgot to tell you that I own a web development/design company. Thank you -- OOzy What does that have to do with your questions -- other than you should have known the answers. Some times it's just pointless to provide advice. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- OOzy Ubuntu (8.10) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So called PHP Expert
On Sat, 2009-03-21 at 16:40 +0200, Dotan Cohen wrote: tedd kids you not. I'm standing at the edge of his ignorance and I just droppped a rock... I've yet to hear it hit the bottom. I'll let you know when I do. That was you?!? I'm stand right here in the middle of ignorance and BAM! a rock falls out of nowhere. There are people in here, you insensitive clod! I didn't hear a BAM. You must have a soft head! :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So called PHP Expert
On Sat, 2009-03-21 at 10:48 -0400, tedd wrote: At 10:37 AM -0400 3/21/09, Robert Cummings wrote: On Sat, 2009-03-21 at 09:29 -0400, tedd wrote: From my perspective, once you realize how much you don't know, then you can grow. I am amazed everyday by my vast ignorance. tedd kids you not. I'm standing at the edge of his ignorance and I just droppped a rock... I've yet to hear it hit the bottom. I'll let you know when I do. Cheers, LOL !!! Leave it to you to drop kick me when you have the chance. Here I was trying to say something prophetic and you made it pathetic. :-) Oh well, at least I take comfort in the fact that you'll probably not live to be as old as me. But if you do, just imagine how deep your ignorance will be. :-) My ignorance is vast indeed... how else do you explain all that outer space. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So called PHP Expert
At 11:20 AM -0400 3/21/09, Robert Cummings wrote: My ignorance is vast indeed... how else do you explain all that outer space. Cheers, Rob. Rob kids you not, I stood on the edge of his vastness and saw black holes running form it. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Development/Application Analysis
At 6:15 PM +0300 3/21/09, OOzy Pal wrote: Tedd, You wrote a long story about a client hiring a programmer which not what I am asking. Anyhow, thank you for your post. I learned from it. I don't want to take it further. This php mailing list. Really -- is that what this is? I thought it was a place where people could ask: -- quote I have just hired a remote PHP programmer. His main job is web development and applications. I have few concerns, I would be happy if someone can point me to the right direction. 1. How can I provide him the requirements. I mean how can I analyze the site and put everything in writing. 2. How can I estimate manhours. -- unquote For which I provided advice and example, which apparently fell on deaf ears. As such, I won't waste my time entertaining any other questions from you. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic Form 'on The Fly' OT
George Larson wrote: [snip] Donovan: There's no powers that be on this list. The closest is Dan and we all ignore him. :-) Next question -- how do you keep login's and passwords safe? Is the following not embedded in the html? [SQLConnect dbType=MySQLhost=192.168.1.1database=TestNamesuid=sapwd=passconn_var=conn1] [/SQLConnect] If so, then doesn't that create a security concern? [snip] For the record, I'm with Tedd. Regardless of this being a designated PHP arena, I'm enjoying this WebDNA conversation and might even give it a test drive... You guys are giving me too much rope. ;-) I like to strive for multi-lingual myself (thus why I'm on the PHP talk list), but I've always loved WebDNA and have been amazed it hasn't caught on more than it has, well, other than how expensive it used to be... For passwords: Though the WebDNA parts of the code are gone by the time a client receives it, yes, it's a always good policy to use appropriate and redundant security practices. So, you have a good point. For example, I could see that if WebDNA was configured incorrectly, you'd be able to see the open text password perhaps. So, instead of hard-coding passwords, you could do a number of other things... for example; include the password from an encrypted text file or WebDNA database record. So, if the password is encrypted in a WebDNA database, The line would look something like: [SQLConnect dbType=MySQL[!] [/!]host=192.168.1.1[!] [/!]database=TestNames[!] [/!]uid=sa[!] [/!]pwd=[unencrypt][lookup db=pwds.dblookinfield=ugUIDvalue=[UID]returnfield=ugPASSnotfound=NF][/unencrypt][!] [/!]conn_var=conn1] [/SQLConnect] (The commented out returns are just to help with readability.) If you store the pass encrypted in a text file: [SQLConnect dbType=MySQL[!] [/!]host=192.168.1.1[!] [/!]database=TestNames[!] [/!]uid=sa[!] [/!]pwd=[unencrypt][include file=pwd.txt][/unencrypt][!] [/!]conn_var=conn1] [/SQLConnect] There are levels of security as well... you could encrypt the entire page if you like... then the source looks like/is binary junk other than when parsed by WebDNA. Regarding test driving.. the download is free and the install doesn't harm PHP configurations: http://dev.webdna.us/ You can also grab a free developers license so you don't keep having to solve the human equation every 30min or so. http://store.webdna.us/ Thx for the time on the soap box! :) (and if anyone objects to the conversation, I'll be happy to zip it!) Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o D. BROOKE EUCA Design Center WebDNA Software Corp. WEB: http://www.euca.us | http://www.webdna.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Select Query with Multiple Optional Values
Trying to find best way to accomplish following scenario. Looking to search inventory through a POST form, have the following optional fields to search by: Product Name, Color, Size, and Status. Search maybe for the Product Name and/or Color or they may search for just the Color or all 4 fields. I am trying to find the most efficient way to do this without having 100 different if statements.
Re: [PHP] mysql_real_escape_string paranoid enough?
On Fri, 20 Mar 2009 09:49:23 -0700, mike wrote: Slightly off topic here, but I find it annoying to have to use the connection identifier for the mysqli_real_escape_string. It would be great if there was a function that I could say mysql_escape_string that is using utf-8 instead of default, as opposed to having to use mysqli_real_escape_string. I think mysql_escape_string() should work fine with utf-8, except that it is being deprecated in 5.3.0. http://se2.php.net/manual/en/function.mysql-escape-string.php I tend to use the escape functions in very close proximity to the actual query, so I don't see a problem with supplying a connection identifier. /Nisse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_real_escape_string paranoid enough?
2009/3/21 Nisse Engström news.nospam.0ixbt...@luden.se: I tend to use the escape functions in very close proximity to the actual query, so I don't see a problem with supplying a connection identifier. Except unless explicitly specified, my applications do not require a connection identifier as it is stored in a global variable (I have a nifty little database access layer) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP (Google Summer of Code 2009)
Are you looking for developers? What could I do for you? What do you think about a translation the last PHP's documentaion to Russian?
Re: [PHP] Select Query with Multiple Optional Values
On Sat, 2009-03-21 at 10:30 -0700, ben...@gmail.com wrote: Trying to find best way to accomplish following scenario. Looking to search inventory through a POST form, have the following optional fields to search by: Product Name, Color, Size, and Status. Search maybe for the Product Name and/or Color or they may search for just the Color or all 4 fields. I am trying to find the most efficient way to do this without having 100 different if statements. ?php $where = array( '1 = 1' ); if( !empty( $_POST['name'] ) ) { where[] = 'name = '.$db-quote( $_POST['name'] ); } if( !empty( $_POST['colour'] ) ) { where[] = 'colour = '.$db-quote( $_POST['colour'] ); } if( !empty( $_POST['size'] ) ) { where[] = 'size = '.$db-quote( $_POST['size'] ); } if( !empty( $_POST['status'] ) ) { where[] = 'status = '.$db-quote( $_POST['status'] ); } $query = SELECT .* .FROM .inventory .WHERE .(.implode( ) AND (, $where ).); ? Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_real_escape_string paranoid enough?
On Sat, 2009-03-21 at 15:37 -0700, mike wrote: 2009/3/21 Nisse Engström news.nospam.0ixbt...@luden.se: I tend to use the escape functions in very close proximity to the actual query, so I don't see a problem with supplying a connection identifier. Except unless explicitly specified, my applications do not require a connection identifier as it is stored in a global variable (I have a nifty little database access layer) Yes, I'm a big fan of automatic database connection identifiers. Why just the other week I was integrating ZenCart into another system and I couldn't understand why ZenCart wasn't able to properly retrieve the last_insert_id(). After digging throught he code I found it was because they were making use of magic identifier semantics and since another db connection also existed, it was being used for the last_insert_id(). Wonderful stuff. If you have a niftly little database layer, then it shouldn't need magic semantics since it should track the connection itself. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP (Google Summer of Code 2009)
On Sat, Mar 21, 2009 at 18:39, Slava Gerchicov barda...@gmail.com wrote: Are you looking for developers? What could I do for you? Check out the GSOC 2009 Wiki page at http://wiki.php.net/gsoc/2009 for some ideas of what's being considered this year. What do you think about a translation the last PHP's documentaion to Russian? Unfortunately Google's SOC policy denies eligibility to documentation projects (including ours --- the nerve of them! ;-P), but if you would like to join us as an official translator nonetheless, we'd be happy to have you! Feel free to send a message to the Docs mailing list at php...@lists.php.net (subscribe by sending a blank email to phpdoc-subscr...@lists.php.net), and - more specifically - the Russian Translation Team's list at phpdoc...@lists.php.net (subscribe: phpdoc-ru-subscr...@lists.php.net). -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] So called PHP Expert
Date: Sat, 21 Mar 2009 10:54:56 -0400 From: danbr...@php.net To: tedd.sperl...@gmail.com CC: php-general@lists.php.net; rob...@interjinn.com Subject: Re: [PHP] So called PHP Expert On Sat, Mar 21, 2009 at 10:48, tedd tedd.sperl...@gmail.com wrote: Leave it to you to drop kick me when you have the chance. Here I was trying to say something prophetic and you made it pathetic. :-) Maybe philosophical? Oh well, at least I take comfort in the fact that you'll probably not live to be as old as me. But if you do, just imagine how deep your ignorance will be. :-) Now *this* is prophetic and a harsh response to a virtual drop-kick. You guys play rough! Oh! ref dan, I charge you to give them a yellow card or something. Alugo www.frangeovic.com _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
Re: [PHP] Select Query with Multiple Optional Values
Trying to find best way to accomplish following scenario. Looking to search inventory through a POST form, have the following optional fields to search by: Product Name, Color, Size, and Status. Search maybe for the Product Name and/or Color or they may search for just the Color or all 4 fields. I am trying to find the most efficient way to do this without having 100 different if statements. ?php $where = array( '1 = 1' ); if( !empty( $_POST['name'] ) ) { where[] = 'name = '.$db-quote( $_POST['name'] ); } if( !empty( $_POST['colour'] ) ) { where[] = 'colour = '.$db-quote( $_POST['colour'] ); } if( !empty( $_POST['size'] ) ) { where[] = 'size = '.$db-quote( $_POST['size'] ); } if( !empty( $_POST['status'] ) ) { where[] = 'status = '.$db-quote( $_POST['status'] ); } $query = SELECT . * .FROM . inventory .WHERE . (.implode( ) AND (, $where ).); ? Cheers, Rob. Yep, that's the way to do it. Or you may do it this way. $fields = array('name','colour','size','status'); foreach ($_POST as $name = $value) { if (empty($value)) continue; if (!in_array($name, $fields, TRUE)) continue; $where[] = $name . '=' . $db-quote($value); } which is more compact and useful when you have 100 different optional fields. Virgil http://www.jampmark.com Free tips, tutorials, innovative tools and techniques useful for building and improving web sites. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_real_escape_string paranoid enough?
I typically do something like this: $data_sql = mysql_real_escape_string($data, $connection); $query = insert into data(data) values('$data_sql'); $insert = mysql_query($query, $connection); if (!$insert){ trigger_error(mysql_error($connection), E_USER_ERROR); } My custom error handler logs the mysql error, and displays a nice generic Something went wrong. Please try again or contact us message to the user, wrapped in the page layout, and then exits. I've just noticed that while the function signature says: string mysql_real_escape_string( ...) The docs say it could return FALSE in case of error. I'm not real sure what all could cause a FALSE return. Obviously, if the database server/process/chipmunk has DIED just before the call to mysql_real_escape_string, I'll get FALSE back. If the input string is just too whack for the function to parse, could I get FALSE, and then I'd be inserting junk into the DB? Or is it possible that the function returns FALSE for what is obviously a hack attempt? I guess I'm asking if anybody adds a line like: if ($data_sql === false){ trigger_error(mysql_error($connection), E_USER_ERROR); } Or is that not really going to do anything useful/better than what I already have? yes you could add that condition and it would be helpful if you also include the value of $data in addtion to mysql_error so you can examine and figure out what cause it to return FALSE. also, php manual says this: mysql_query() will also fail and return FALSE if the user does not have permission to access the table(s) referenced by the query. Virgil http://www.jampmark.com Free tips, tutorials, innovative tools and techniques useful for building and improving web sites. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need help with code
hi Chris, basing on the code you posted, you're missing the closing brace for if ($accessToken===NULL) { there should be 3 closing braces before the last ? That'll be the next error, but that error would print unexpected $end on line xxx. well, if you're getting the parse error without additional description then it must be the php versions because the lib might be throwing exceptions and you are running php4. cheers, Virgil http://www.jampmark.com Free tips, tutorials, innovative tools and techniques useful for building and improving web sites. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_real_escape_string paranoid enough?
2009/3/21 Robert Cummings rob...@interjinn.com: Yes, I'm a big fan of automatic database connection identifiers. Why just the other week I was integrating ZenCart into another system and I couldn't understand why ZenCart wasn't able to properly retrieve the last_insert_id(). After digging throught he code I found it was because they were making use of magic identifier semantics and since another db connection also existed, it was being used for the last_insert_id(). Wonderful stuff. If you have a niftly little database layer, then it shouldn't need magic semantics since it should track the connection itself. What probably makes the most sense is instead of relying on mysqli_real_escape_string, to create a simple unicode-capable regex that does the database escaping for you. then it is totally portable. That is what is sticking in the back of my mind. Even though I force utf8 connection on any of my database handles already. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make multiple sql run faster
Usually a single transaction is faster than an insert a time (with or without union) Hi all, I am inserting more than 5000 rows into sql database but its taking more than 30 mins to get it all the data inserted. I use union to insert multiple rows of 20 at a time. What is the best way to make insert sql statement run faster hi, inserting 5000 rows should only take seconds. if you are looping, optimize the code inside the loop. or before entering the loop, get a connection first and the use the connection inside the loop. or maybe you could post snippets, that would surely be helpful. cheers, Virgil http://www.jampmark.com Free tips, tutorials, innovative tools and techniques useful for building and improving web sites. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php