Re: [PHP] Introduction ... !
Hello Nick, Welcome to the list. I joined the list awhile back then unsubscribed for no apparent reason. This list was very active years ago. I came back about a few months ago just as a watcher. I didn't really post or participate at all. I guess, there are a lot of watchers only people here. They receive digest e-mails; they just don't participate in any way. Then, there are those who lost their jobs due to the recession and so they dropped off the list as well. There are a lot of developers unemployed. I would imagine that other developers didn't keep up with the changes. PHP has come a long way as far as Object Oriented Programming is concerned. There have been many discussions about Design Patterns and extending existing classes. So a lot has changed in the last 5 years. I do believe that the list will pick up again. Welcome back, Ravi. On Fri, Mar 1, 2013 at 10:57 AM, Nick Whiting prg...@gmail.com wrote: Hello PHP'ers! Just thought I would introduce myself to the mailing list since I've worked with PHP for almost 10 years now and yet haven't really been community active ... I've developed quite a few open-source projects over the years that I hope someone here will find as useful as I have ... they are all hosted on Github @prggmr. XPSPL - Signal Processor in PHP docpx - PHP Documentation Generator for Sphinx Again Hello Everyone! Cheers! -- Nickolas Whiting - prggmr.org - Remember to write less code that does more faster -
Re: [PHP] Introduction ... !
I am new too here (no more than a week) On Mar 2, 2013 1:37 AM, Nick Whiting prg...@gmail.com wrote: On Fri, Mar 1, 2013 at 6:32 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Mar 1, 2013 at 11:56 AM, Daniel Brown danbr...@php.net wrote: On Fri, Mar 1, 2013 at 12:54 PM, Jim Giner jim.gi...@albanyhandball.com wrote: What gives you such optimism? I recently saw a list of languages in use and PHP has dropped quite a bit over the last 5 or more years. Being a relative newbie myself, I'm happy that PHP exists and is so readily available to us hobbyists, etc. Certainly am in favor of your optimism, but curious (hey it's Friday!) about your prediction. Just knowing how the patterns go. It's always the same, and it will likely be the same again. No guarantees, but all it takes is a bit of fostering of the community to return it to a decently-vibrant forum. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Things come, things go, ebb and flow. PHP is easy for people to pick on, for some good and not so good reasons. It, to me, is still the easiest programming language for someone to learn, in *NO* small reason because of all the excellent documentation and community contributed comments. And places like this list. I've been working in Rails for the past several months, and although I much prefer Ruby as a language, the documentation on libraries, extensions, packages, and frameworks is rather lacking. The ruby doc website has the space for users to add comments, but there's hardly any. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.php.net/unsub.php Nickolas Whiting - http://www.php.net/unsub.phpprggmr.org - Remember to write less code that does more faster - One would think with such a widely used language the mailing list would be crazy ... then again sites such as SO seem to be taking the internet world by storm and moving what some would call *old school* forums such as this into the dark. That said ... it never occurred to me until just recently to get into this forum, in-fact for a number of years I simply didn't know this forum existed.
Re: [PHP] Introduction ... !
[snip] ...good conversation... [/snip] I have been on this list for years and I have watched it ebb and flow. I have heard all the bad and good about PHP. The fact remains that we use PHP in some very heavy applications and it never fails us for what we want or need to do. I always encourage devs to use the proper tool for the job, and when using that tool use it to its maximum capability. Let each tool do the heavy lifting that it is designed to do. PHP can tote some really heavy loads when asked properly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
I've been on this list since the early 2000's. I used to participate a lot back then but then took up a non-php related job and I stopped paying attention to the list. I've been working again with php for the past 4.5 years but choose to just monitor the list and haven't participated much. Perhaps I should participate more. But yeah, I've been here like 12 years or so. God I'm getting old. On Sat, Mar 2, 2013 at 11:10 AM, Jay Blanchard jay.blanch...@sigmaphinothing.org wrote: [snip] ...good conversation... [/snip] I have been on this list for years and I have watched it ebb and flow. I have heard all the bad and good about PHP. The fact remains that we use PHP in some very heavy applications and it never fails us for what we want or need to do. I always encourage devs to use the proper tool for the job, and when using that tool use it to its maximum capability. Let each tool do the heavy lifting that it is designed to do. PHP can tote some really heavy loads when asked properly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
[snip] I've been on this list since the early 2000's. I used to participate a lot back then but then took up a non-php related job and I stopped paying attention to the list. I've been working again with php for the past 4.5 years but choose to just monitor the list and haven't participated much. Perhaps I should participate more. But yeah, I've been here like 12 years or so. God I'm getting old. [/snip] No - Tedd is old. The rest of us are just Spring chickens. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On 2 Mar 2013, at 16:25, Jay Blanchard jay.blanch...@sigmaphinothing.org wrote: [snip] I've been on this list since the early 2000's. I used to participate a lot back then but then took up a non-php related job and I stopped paying attention to the list. I've been working again with php for the past 4.5 years but choose to just monitor the list and haven't participated much. Perhaps I should participate more. But yeah, I've been here like 12 years or so. God I'm getting old. [/snip] No - Tedd is old. The rest of us are just Spring chickens. Speak for yourself, I'm an autumn turkey! -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
[snip] Speak for yourself, I'm an autumn turkey! -Stuart [/snip] My body is an Autumn turkey, my head says differently - save on certain mornings when too much popping and cracking occurs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Sat, Mar 2, 2013 at 10:35 AM, Jay Blanchard jay.blanch...@sigmaphinothing.org wrote: [snip] Speak for yourself, I'm an autumn turkey! -Stuart [/snip] My body is an Autumn turkey, my head says differently - save on certain mornings when too much popping and cracking occurs. See, you can't really call yourself old until that's pooping and cramping... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Mar 2, 2013, at 11:25 AM, Jay Blanchard jay.blanch...@sigmaphinothing.org wrote: No - Tedd is old. The rest of us are just Spring chickens. Hey, let's watch that... a, what? What the hell was I saying??? Awww .. forget it. Did I tell you about when I programed with rocks? That was before someone invented the absence of rock (a really abstract idea) and then things got mondo weird. We were finally able to build things that didn't always look like pyramids. You see, we had been stuck in Oh Oh Pyramids days, which we called OOP. The more things change... Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Mar 2, 2013, at 11:26 AM, Stuart Dallas stu...@3ft9.com wrote: On 2 Mar 2013, at 16:25, Jay Blanchard jay.blanch...@sigmaphinothing.org wrote: No - Tedd is old. The rest of us are just Spring chickens. Speak for yourself, I'm an autumn turkey! -Stuart What's this autumn nonsense? tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Mar 2, 2013, at 2:20 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: See, you can't really call yourself old until that's pooping and cramping... That reminds me -- a couple of my older friends and I were discussing getting old. One friend said At 8:00 am I have a terrible time taking a poop. My other friend said -- At 8:00 am my problem is taking a piss. I replied -- At 8:00 am I crap like a goose and piss like a race hoarse. Both friends said: That doesn't sound bad -- what's the problem? I told them Yeah, but I wake up at 9:00 am. Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Fri, Mar 1, 2013 at 10:57 AM, Nick Whiting prg...@gmail.com wrote: Hello PHP'ers! Just thought I would introduce myself to the mailing list since I've worked with PHP for almost 10 years now and yet haven't really been community active ... I've developed quite a few open-source projects over the years that I hope someone here will find as useful as I have ... they are all hosted on Github @prggmr. XPSPL - Signal Processor in PHP docpx - PHP Documentation Generator for Sphinx Again Hello Everyone! Welcome to the list, Nick. Looking forward to having you involved in the discussions we have go on here. The list isn't nearly as active as it was about five years ago, but that's likely to change. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On 3/1/2013 12:43 PM, Daniel Brown wrote: On Fri, Mar 1, 2013 at 10:57 AM, Nick Whiting prg...@gmail.com wrote: Hello PHP'ers! Just thought I would introduce myself to the mailing list since I've worked with PHP for almost 10 years now and yet haven't really been community active ... I've developed quite a few open-source projects over the years that I hope someone here will find as useful as I have ... they are all hosted on Github @prggmr. XPSPL - Signal Processor in PHP docpx - PHP Documentation Generator for Sphinx Again Hello Everyone! Welcome to the list, Nick. Looking forward to having you involved in the discussions we have go on here. The list isn't nearly as active as it was about five years ago, but that's likely to change. What gives you such optimism? I recently saw a list of languages in use and PHP has dropped quite a bit over the last 5 or more years. Being a relative newbie myself, I'm happy that PHP exists and is so readily available to us hobbyists, etc. Certainly am in favor of your optimism, but curious (hey it's Friday!) about your prediction. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Fri, Mar 1, 2013 at 12:54 PM, Jim Giner jim.gi...@albanyhandball.com wrote: What gives you such optimism? I recently saw a list of languages in use and PHP has dropped quite a bit over the last 5 or more years. Being a relative newbie myself, I'm happy that PHP exists and is so readily available to us hobbyists, etc. Certainly am in favor of your optimism, but curious (hey it's Friday!) about your prediction. Just knowing how the patterns go. It's always the same, and it will likely be the same again. No guarantees, but all it takes is a bit of fostering of the community to return it to a decently-vibrant forum. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Fri, Mar 1, 2013 at 11:56 AM, Daniel Brown danbr...@php.net wrote: On Fri, Mar 1, 2013 at 12:54 PM, Jim Giner jim.gi...@albanyhandball.com wrote: What gives you such optimism? I recently saw a list of languages in use and PHP has dropped quite a bit over the last 5 or more years. Being a relative newbie myself, I'm happy that PHP exists and is so readily available to us hobbyists, etc. Certainly am in favor of your optimism, but curious (hey it's Friday!) about your prediction. Just knowing how the patterns go. It's always the same, and it will likely be the same again. No guarantees, but all it takes is a bit of fostering of the community to return it to a decently-vibrant forum. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Things come, things go, ebb and flow. PHP is easy for people to pick on, for some good and not so good reasons. It, to me, is still the easiest programming language for someone to learn, in *NO* small reason because of all the excellent documentation and community contributed comments. And places like this list. I've been working in Rails for the past several months, and although I much prefer Ruby as a language, the documentation on libraries, extensions, packages, and frameworks is rather lacking. The ruby doc website has the space for users to add comments, but there's hardly any. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction ... !
On Fri, Mar 1, 2013 at 6:32 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Fri, Mar 1, 2013 at 11:56 AM, Daniel Brown danbr...@php.net wrote: On Fri, Mar 1, 2013 at 12:54 PM, Jim Giner jim.gi...@albanyhandball.com wrote: What gives you such optimism? I recently saw a list of languages in use and PHP has dropped quite a bit over the last 5 or more years. Being a relative newbie myself, I'm happy that PHP exists and is so readily available to us hobbyists, etc. Certainly am in favor of your optimism, but curious (hey it's Friday!) about your prediction. Just knowing how the patterns go. It's always the same, and it will likely be the same again. No guarantees, but all it takes is a bit of fostering of the community to return it to a decently-vibrant forum. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Things come, things go, ebb and flow. PHP is easy for people to pick on, for some good and not so good reasons. It, to me, is still the easiest programming language for someone to learn, in *NO* small reason because of all the excellent documentation and community contributed comments. And places like this list. I've been working in Rails for the past several months, and although I much prefer Ruby as a language, the documentation on libraries, extensions, packages, and frameworks is rather lacking. The ruby doc website has the space for users to add comments, but there's hardly any. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://www.php.net/unsub.php Nickolas Whiting - http://www.php.net/unsub.phpprggmr.org - Remember to write less code that does more faster - One would think with such a widely used language the mailing list would be crazy ... then again sites such as SO seem to be taking the internet world by storm and moving what some would call *old school* forums such as this into the dark. That said ... it never occurred to me until just recently to get into this forum, in-fact for a number of years I simply didn't know this forum existed.
Re: [PHP] Introduction and questions...
Jason Pruim wrote: Hi Everyone, I'm very new to php and to this list. I'm hoping to be able to suck up as much knowledge from this list as I possibly can and be able to help and contribute in the future. But until that time, I'm in need of some help. I'm trying to write an image gallery script(Or program/application?) for displaying images on a web page. That part of it is working just fine, what I want to add though is the ability for people who use this script to be able to copy/paste a link to insert the HTML into their page/weblog. In other words... How do I get it to display the text: img src=myserver.com/path/to/picture height=reasonable size instead of actually displaying the picture? htmlentities() is the beast you want, something like: $imgHTML = 'img src=myserver.com/path/to/pic.jpg height=200px /'; echo htmlentities($imgHTML, ENT_QUOTES); see here for more details: http://php.net/htmlentities ... Anyway... Long enough post for my question I think, if you need more info let me know, and thanks in advance for any help even if it's just a RTFM... Just please include TFM ;) we generally wait until the third post before throwing manuals at you. :-) ... We hold these truths to be self-evident. That all men are created equal, that they are endowed by their creator with certain unalienable rights, (and) that among these are Life, Liberty, and the pursuit of Happiness. desire to make political comment regarding bush administration repressed / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction and questions...
Jason Pruim wrote: ... http://php.net/htmlentities Okay, So after this post I have 1 more before everyone throws the manual at me... So lets make this good, I added that as you suggested, but think I may have put the entries in the wrong place... As it sits right now the $imgHTML= string is above a while($filename = readdir($dir)) statement with only the echo htmlentities($imgHTML,ENT_COMPAT); down in the actual if then statement. I changed it from ENT_QUOTES to ENT_COMPAT because of wanting to be able to automatically pickup the file name for that particular photo and the way it is right now it has single quotes ' around the file name and I wanted it to leave those alone. I don't follow what your saying here exactly - got an example? given that you want to display the HTML within the page as if it were plain text I'm pretty sure you want to turn every relevant character into it's html entity equivelant When I try and load the page this way, I see the image, and then it says: link info echo htmlentities($imgHTML, ENT_COMPAT); in the browser window. Obviously not what I'm hoping for... So is there a PHP for idiots manual I can look at and see what I'm doing wrong? :) the code is being output instead of being parsed and run. php will only parse and run code that is between php 'tags'. this means you'll need something like: link info: ?php echo htmlentities($imgHTML, ENT_COMPAT); ? ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction
Hello Julie Have you checked what is passed in your post / get request??? A Simple way of doing this is using a script similar to this one ?PHP while(list($key, $value) = each($_POST)) // use $_GET for get request { echo 'br'.$key.'='.$value; // this prints to the browser } ? This will show you a simple list of all variables being passed to your script. I had a problem once with forms that for empty fields the variables were set to contain an empty string so a call to isset($var) still returns true. Not sure how this happend or why but it did... If you run the above script you can at least see if the form returns the variables that are set and what they contain. Before I forget don't run this script before your header() or else you will get an error stating that headers have allready been send. Hope it helps Stefan Langer P.S.: As stated before for security reasons it is better to rely on $_POST and $_GET global arrays and register_globals turned off.
Re: [PHP] Introduction
On Saturday 01 February 2003 17:39, [EMAIL PROTECTED] wrote: Hello Julie Have you checked what is passed in your post / get request??? A Simple way of doing this is using a script similar to this one ?PHP while(list($key, $value) = each($_POST)) // use $_GET for get request { echo 'br'.$key.'='.$value; // this prints to the browser } ? A easier way to achieve the above is simply: print_r($_POST); -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Unix: Some say the learning curve is steep, but you only have to climb it once. -- Karl Lehenbauer */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Introduction
Thanks for the welcome! And naturally, I need help. :-) I am just learning PHP, although I have taken programming classes in C and am a little familiar with writing small scripts. My husband wrote a simple PHP script for a client of ours, which I have the pleasure of fine-tuning, the idea being to get me to learn PHP. Well, the script doesn't do what it should, and neither I nor even my husband can figure out why. Hopefully, someone here can guide us as to what we are doing wrong. :-) Basically, all the script does (or should do) is build an e-mail to a client based on a set of variables defined by the user, using an HTML form. It is also supposed to warn the user with a print message whenever a variable is missing. The form is at the following address: http://www.swedishengineering.com/newsite/requestresponse.html I've saved the script in text format so that you can look at, it is located at the following address: http://www.swedishengineering.com/newsite/requestresponse.rtf The errors are as follows: When the customer's e-mail is omitted, a print message should appear, to the effect of Hey, you need to specify the e-mail!. However, when the e-mail is omitted *and* one of the options is clicked, the message does not appear, but rather, the user gets re-directed to the index page. When the Parts option is chosen, but no parts are indicated, a print message should appear to let the user know that a part number needs to be entered. However, the script bypasses this and builds the e-mail anyway. I hope this makes sense and would greatly appreciate any help. Thanks!! Julie -Original Message- From: Mike Kercher [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 6:21 PM To: 'Julie Williams' Subject: RE: [PHP] Introduction You have the right address and welcome -Original Message- From: Julie Williams [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 11:07 PM To: [EMAIL PROTECTED] Subject: [PHP] Introduction Hello everyone, I just subscribed to the list and wanted to say hello. Also to check if I have the right address. :-) Julie Williams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Introduction
On Saturday 01 February 2003 00:47, Julie Williams wrote: Basically, all the script does (or should do) is build an e-mail to a client based on a set of variables defined by the user, using an HTML form. It is also supposed to warn the user with a print message whenever a variable is missing. The form is at the following address: http://www.swedishengineering.com/newsite/requestresponse.html I've saved the script in text format so that you can look at, it is located at the following address: http://www.swedishengineering.com/newsite/requestresponse.rtf If your code isn't humungous then you should include it (inline, not as an attachment) with your post. There are many reasons why people would not click on a link to see your code (laziness, or fear of being social-engineered to spread the latest MS-related exploit etc). If your code _is_ humungous, then a link might be appropriate and note saying _why_ you're posting a link would be nice. Also, your intent to make the code look pretty(?) by converting to RTF seems misguided. Stick to plain-text. The errors are as follows: When the customer's e-mail is omitted, a print message should appear, to the effect of Hey, you need to specify the e-mail!. However, when the e-mail is omitted *and* one of the options is clicked, the message does not appear, but rather, the user gets re-directed to the index page. When the Parts option is chosen, but no parts are indicated, a print message should appear to let the user know that a part number needs to be entered. However, the script bypasses this and builds the e-mail anyway. I hope this makes sense and would greatly appreciate any help. It's good you that you explain what you're trying to do, and what you expect the program to do, and what actually happens instead. (Some people just say here's my code, it doesn't work, what's wrong? -- or words to that effect) However it would make more sense if we could see some code :) -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Sleep is for the weak and sickly. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Introduction
Hi Jason, Sorry, I'm very new to this. Since my code is not huge, I have included it below. I removed some of the text so that it is less bulky. I hope everything is clear. Thanks for your help! ?php //Build email Body based on customer request IF (isset($custemail)) { IF ($request_type==Service_Advice) { $body = Thank you for your request for service information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Service Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts_Advice) { $body = Thank you for your request for parts information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts) { IF ((!isset($part1)) (!isset($part2)) (!isset($part3)) (!isset($part4)) (!isset($part5)) (!isset($part6))) print (Please go back and include part information!); ELSE { $body = Thank you for your parts request. The information you requested is listed below:BRnbsp;BR; $body .= TABLE; $body .= TRTHPart #/THTHPart Name/THTHPrice/THTHShipping/THTHAvailability/TH/TR; IF (isset($part1)) $body .= TRTD$part1/TDTD$partname1/TDTD$price1/TDTD$sprice1/TDTD $avail1/TD/TR; IF (isset($part2)) $body .= TRTD$part2/TDTD$partname2/TDTD$price2/TDTD$sprice2/TDTD $avail2/TD/TR; IF (isset($part3)) $body .= TRTD$part3/TDTD$partname3/TDTD$price3/TDTD$sprice3/TDTD $avail3/TD/TR; IF (isset($part4)) $body .= TRTD$part4/TDTD$partname4/TDTD$price4/TDTD$sprice4/TDTD $avail4/TD/TR; IF (isset($part5)) $body .= TRTD$part5/TDTD$partname5/TDTD$price5/TDTD$sprice5/TDTD $avail5/TD/TR; IF (isset($part6)){ $body .= TRTD$part6/TDTD$partname6/TDTD$price6/TDTD$sprice6/TDTD $avail6/TD/TR; $body .= /TABLE; $body .= Our Service departments are located on the following page:BRnbsp;BR; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Request, $body, $headers); header(Location:index.html); } } } ELSE { print (Please go back and enter the customer's request type!); } } ELSE { print (Please go back and enter the customer's email address!); } ? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 6:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Introduction On Saturday 01 February 2003 00:47, Julie Williams wrote: Basically, all the script does (or should do) is build an e-mail to a client based on a set of variables defined by the user, using an HTML form. It is also supposed to warn the user with a print message whenever a variable is missing. The form is at the following address: http://www.swedishengineering.com/newsite/requestresponse.html I've saved the script in text format so that you can look at, it is located at the following address: http://www.swedishengineering.com/newsite/requestresponse.rtf If your code isn't humungous then you should include it (inline, not as an attachment) with your post. There are many reasons why people would not click on a link to see your code (laziness, or fear of being social-engineered to spread the latest MS-related exploit etc). If your code _is_ humungous, then a link might be appropriate and note saying _why_ you're posting a link would be nice. Also, your intent to make the code look pretty(?) by converting to RTF seems misguided. Stick to plain-text. The errors are as follows: When the customer's e-mail is omitted, a print message should appear, to the effect of Hey, you need to specify the e-mail!. However, when the e-mail is omitted *and* one of the options is clicked, the message does not appear, but rather, the user gets re-directed to the index page. When the Parts option is chosen, but no parts are indicated, a print message should appear to let the user know that a part number needs to be entered. However, the script bypasses this and builds the e-mail anyway. I hope this makes sense and would greatly appreciate any help. It's good you that you explain what you're trying to do, and what you expect the program to do, and what actually happens instead
Re: [PHP] Introduction
Julie, What version of PHP? Where is $custemail coming from, form on another page/same page, database? Global variables on or off in your php.ini? Julie Williams wrote: Hi Jason, Sorry, I'm very new to this. Since my code is not huge, I have included it below. I removed some of the text so that it is less bulky. I hope everything is clear. Thanks for your help! ?php //Build email Body based on customer request IF (isset($custemail)) { IF ($request_type==Service_Advice) { $body = Thank you for your request for service information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Service Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts_Advice) { $body = Thank you for your request for parts information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts) { IF ((!isset($part1)) (!isset($part2)) (!isset($part3)) (!isset($part4)) (!isset($part5)) (!isset($part6))) print (Please go back and include part information!); ELSE { $body = Thank you for your parts request. The information you requested is listed below:BRnbsp;BR; $body .= TABLE; $body .= TRTHPart #/THTHPart Name/THTHPrice/THTHShipping/THTHAvailability/TH/TR; IF (isset($part1)) $body .= TRTD$part1/TDTD$partname1/TDTD$price1/TDTD$sprice1/TDTD $avail1/TD/TR; IF (isset($part2)) $body .= TRTD$part2/TDTD$partname2/TDTD$price2/TDTD$sprice2/TDTD $avail2/TD/TR; IF (isset($part3)) $body .= TRTD$part3/TDTD$partname3/TDTD$price3/TDTD$sprice3/TDTD $avail3/TD/TR; IF (isset($part4)) $body .= TRTD$part4/TDTD$partname4/TDTD$price4/TDTD$sprice4/TDTD $avail4/TD/TR; IF (isset($part5)) $body .= TRTD$part5/TDTD$partname5/TDTD$price5/TDTD$sprice5/TDTD $avail5/TD/TR; IF (isset($part6)){ $body .= TRTD$part6/TDTD$partname6/TDTD$price6/TDTD$sprice6/TDTD $avail6/TD/TR; $body .= /TABLE; $body .= Our Service departments are located on the following page:BRnbsp;BR; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Request, $body, $headers); header(Location:index.html); } } } ELSE { print (Please go back and enter the customer's request type!); } } ELSE { print (Please go back and enter the customer's email address!); } ? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 6:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Introduction On Saturday 01 February 2003 00:47, Julie Williams wrote: Basically, all the script does (or should do) is build an e-mail to a client based on a set of variables defined by the user, using an HTML form. It is also supposed to warn the user with a print message whenever a variable is missing. The form is at the following address: http://www.swedishengineering.com/newsite/requestresponse.html I've saved the script in text format so that you can look at, it is located at the following address: http://www.swedishengineering.com/newsite/requestresponse.rtf If your code isn't humungous then you should include it (inline, not as an attachment) with your post. There are many reasons why people would not click on a link to see your code (laziness, or fear of being social-engineered to spread the latest MS-related exploit etc). If your code _is_ humungous, then a link might be appropriate and note saying _why_ you're posting a link would be nice. Also, your intent to make the code look pretty(?) by converting to RTF seems misguided. Stick to plain-text. The errors are as follows: When the customer's e-mail is omitted, a print message should appear, to the effect of Hey, you need to specify the e-mail!. However, when the e-mail is omitted *and* one of the options is clicked, the message does not appear, but rather, the user gets re-directed to the index page. When the Parts option is chosen, but no parts are indicated, a print message should appear to let the user know that a part number needs to be entered. However, the script bypasses this and builds the e-mail anyway. I hope this makes sense and would greatly appreciate any
Re: [PHP] Introduction
Take a look at http://www.php.net/manual/en/security.registerglobals.php Basicly you should use $_REQUEST['custemail'] ... Julie Williams wrote: Hi Jason, Sorry, I'm very new to this. Since my code is not huge, I have included it below. I removed some of the text so that it is less bulky. I hope everything is clear. Thanks for your help! ?php //Build email Body based on customer request IF (isset($custemail)) { IF ($request_type==Service_Advice) { $body = Thank you for your request for service information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Service Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts_Advice) { $body = Thank you for your request for parts information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts) { IF ((!isset($part1)) (!isset($part2)) (!isset($part3)) (!isset($part4)) (!isset($part5)) (!isset($part6))) print (Please go back and include part information!); ELSE { $body = Thank you for your parts request. The information you requested is listed below:BRnbsp;BR; $body .= TABLE; $body .= TRTHPart #/THTHPart Name/THTHPrice/THTHShipping/THTHAvailability/TH/TR; IF (isset($part1)) $body .= TRTD$part1/TDTD$partname1/TDTD$price1/TDTD$sprice1/TDTD $avail1/TD/TR; IF (isset($part2)) $body .= TRTD$part2/TDTD$partname2/TDTD$price2/TDTD$sprice2/TDTD $avail2/TD/TR; IF (isset($part3)) $body .= TRTD$part3/TDTD$partname3/TDTD$price3/TDTD$sprice3/TDTD $avail3/TD/TR; IF (isset($part4)) $body .= TRTD$part4/TDTD$partname4/TDTD$price4/TDTD$sprice4/TDTD $avail4/TD/TR; IF (isset($part5)) $body .= TRTD$part5/TDTD$partname5/TDTD$price5/TDTD$sprice5/TDTD $avail5/TD/TR; IF (isset($part6)){ $body .= TRTD$part6/TDTD$partname6/TDTD$price6/TDTD$sprice6/TDTD $avail6/TD/TR; $body .= /TABLE; $body .= Our Service departments are located on the following page:BRnbsp;BR; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Request, $body, $headers); header(Location:index.html); } } } ELSE { print (Please go back and enter the customer's request type!); } } ELSE { print (Please go back and enter the customer's email address!); } ? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 6:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Introduction On Saturday 01 February 2003 00:47, Julie Williams wrote: Basically, all the script does (or should do) is build an e-mail to a client based on a set of variables defined by the user, using an HTML form. It is also supposed to warn the user with a print message whenever a variable is missing. The form is at the following address: http://www.swedishengineering.com/newsite/requestresponse.html I've saved the script in text format so that you can look at, it is located at the following address: http://www.swedishengineering.com/newsite/requestresponse.rtf If your code isn't humungous then you should include it (inline, not as an attachment) with your post. There are many reasons why people would not click on a link to see your code (laziness, or fear of being social-engineered to spread the latest MS-related exploit etc). If your code _is_ humungous, then a link might be appropriate and note saying _why_ you're posting a link would be nice. Also, your intent to make the code look pretty(?) by converting to RTF seems misguided. Stick to plain-text. The errors are as follows: When the customer's e-mail is omitted, a print message should appear, to the effect of Hey, you need to specify the e-mail!. However, when the e-mail is omitted *and* one of the options is clicked, the message does not appear, but rather, the user gets re-directed to the index page. When the Parts option is chosen, but no parts are indicated, a print message should appear to let the user know that a part number needs to be entered. However, the script bypasses this and builds the e-mail anyway. I hope this makes sense and would greatly appreciate any help. It's good you that you explain what you're trying
RE: [PHP] Introduction
Hi John, The variables are coming from a form, located at: http://www.swedishengineering.com/newsite/requestresponse.html I don't know what version of PHP or if the global variables are on or off. I would have to ask the client who their provider is and contact them. I'm guessing you're asking me this because you don't see anything wrong with the script's logic? Julie -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 8:10 AM To: Julie Williams Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Introduction Julie, What version of PHP? Where is $custemail coming from, form on another page/same page, database? Global variables on or off in your php.ini? Julie Williams wrote: Hi Jason, Sorry, I'm very new to this. Since my code is not huge, I have included it below. I removed some of the text so that it is less bulky. I hope everything is clear. Thanks for your help! ?php //Build email Body based on customer request IF (isset($custemail)) { IF ($request_type==Service_Advice) { $body = Thank you for your request for service information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Service Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts_Advice) { $body = Thank you for your request for parts information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts) { IF ((!isset($part1)) (!isset($part2)) (!isset($part3)) (!isset($part4)) (!isset($part5)) (!isset($part6))) print (Please go back and include part information!); ELSE { $body = Thank you for your parts request. The information you requested is listed below:BRnbsp;BR; $body .= TABLE; $body .= TRTHPart #/THTHPart Name/THTHPrice/THTHShipping/THTHAvailability/TH/TR; IF (isset($part1)) $body .= TRTD$part1/TDTD$partname1/TDTD$price1/TDTD$sprice1/TDTD $avail1/TD/TR; IF (isset($part2)) $body .= TRTD$part2/TDTD$partname2/TDTD$price2/TDTD$sprice2/TDTD $avail2/TD/TR; IF (isset($part3)) $body .= TRTD$part3/TDTD$partname3/TDTD$price3/TDTD$sprice3/TDTD $avail3/TD/TR; IF (isset($part4)) $body .= TRTD$part4/TDTD$partname4/TDTD$price4/TDTD$sprice4/TDTD $avail4/TD/TR; IF (isset($part5)) $body .= TRTD$part5/TDTD$partname5/TDTD$price5/TDTD$sprice5/TDTD $avail5/TD/TR; IF (isset($part6)){ $body .= TRTD$part6/TDTD$partname6/TDTD$price6/TDTD$sprice6/TDTD $avail6/TD/TR; $body .= /TABLE; $body .= Our Service departments are located on the following page:BRnbsp;BR; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Request, $body, $headers); header(Location:index.html); } } } ELSE { print (Please go back and enter the customer's request type!); } } ELSE { print (Please go back and enter the customer's email address!); } ? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 6:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Introduction On Saturday 01 February 2003 00:47, Julie Williams wrote: Basically, all the script does (or should do) is build an e-mail to a client based on a set of variables defined by the user, using an HTML form. It is also supposed to warn the user with a print message whenever a variable is missing. The form is at the following address: http://www.swedishengineering.com/newsite/requestresponse.html I've saved the script in text format so that you can look at, it is located at the following address: http://www.swedishengineering.com/newsite/requestresponse.rtf If your code isn't humungous then you should include it (inline, not as an attachment) with your post. There are many reasons why people would not click on a link to see your code (laziness, or fear of being social-engineered to spread the latest MS-related exploit etc). If your code _is_ humungous, then a link might be appropriate and note saying _why_ you're posting a link would be nice. Also, your intent to make
Re: [PHP] Introduction
Well, one of the most common problems encountered here is forms / global variables. The form on your page is using the post method, so chances are, you need to reference your variables by the global post array, ie $_POST['custemail'] $_POST['request_type'] etc. Instead of $custemail and $request_type. If the form is using the get method (or any time variables are being passed in the URL), you'll want to use the global get array, ie $_GET['some_variable'] $_GET['anoter_variable'] Then there's the global request array which will get all types passed to the page, ie. $_REQUEST['some_variable'] You may want to take a look here for a better explanation of variables and scope... http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php Julie Williams wrote: Hi John, The variables are coming from a form, located at: http://www.swedishengineering.com/newsite/requestresponse.html I don't know what version of PHP or if the global variables are on or off. I would have to ask the client who their provider is and contact them. I'm guessing you're asking me this because you don't see anything wrong with the script's logic? Julie -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 8:10 AM To: Julie Williams Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Introduction Julie, What version of PHP? Where is $custemail coming from, form on another page/same page, database? Global variables on or off in your php.ini? Julie Williams wrote: Hi Jason, Sorry, I'm very new to this. Since my code is not huge, I have included it below. I removed some of the text so that it is less bulky. I hope everything is clear. Thanks for your help! ?php //Build email Body based on customer request IF (isset($custemail)) { IF ($request_type==Service_Advice) { $body = Thank you for your request for service information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Service Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts_Advice) { $body = Thank you for your request for parts information...; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Advice Request, $body, $headers); header(Location:index.html); } ELSE IF ($request_type==Parts) { IF ((!isset($part1)) (!isset($part2)) (!isset($part3)) (!isset($part4)) (!isset($part5)) (!isset($part6))) print (Please go back and include part information!); ELSE { $body = Thank you for your parts request. The information you requested is listed below:BRnbsp;BR; $body .= TABLE; $body .= TRTHPart #/THTHPart Name/THTHPrice/THTHShipping/THTHAvailability/TH/TR; IF (isset($part1)) $body .= TRTD$part1/TDTD$partname1/TDTD$price1/TDTD$sprice1/TDTD $avail1/TD/TR; IF (isset($part2)) $body .= TRTD$part2/TDTD$partname2/TDTD$price2/TDTD$sprice2/TDTD $avail2/TD/TR; IF (isset($part3)) $body .= TRTD$part3/TDTD$partname3/TDTD$price3/TDTD$sprice3/TDTD $avail3/TD/TR; IF (isset($part4)) $body .= TRTD$part4/TDTD$partname4/TDTD$price4/TDTD$sprice4/TDTD $avail4/TD/TR; IF (isset($part5)) $body .= TRTD$part5/TDTD$partname5/TDTD$price5/TDTD$sprice5/TDTD $avail5/TD/TR; IF (isset($part6)){ $body .= TRTD$part6/TDTD$partname6/TDTD$price6/TDTD$sprice6/TDTD $avail6/TD/TR; $body .= /TABLE; $body .= Our Service departments are located on the following page:BRnbsp;BR; $body .= $comments; $headers .= MIME-Version: 1.0\r\n; $headers .= Content-type: text/html; charset=iso-8859-1\r\n; $headers .= From: [EMAIL PROTECTED]\r\n; $headers .= To: .$custemail.\r\n; mail($custemail, Your Parts Request, $body, $headers); header(Location:index.html); } } } ELSE { print (Please go back and enter the customer's request type!); } } ELSE { print (Please go back and enter the customer's email address!); } ? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 6:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Introduction On Saturday 01 February 2003 00:47, Julie Williams wrote: Basically, all the script does (or should do) is build an e-mail to a client based on a set of variables defined by the user, using an HTML form. It is also supposed to warn the user with a print message whenever a variable