Re: [PHP] PHP Printing Error Help
I tried looking in the local Root folder of my web site as well as the remote. I don't own the server so didn't know if to look for php.ini file there. Sorry for redundant Qs but I seem to be very lost. On a different Note, This page is the original working version I have: http://www.primarywave.com/BrokerOutpost_Contact.php This is the page I want to work allowing the check box values to be reported. http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php I kept almost everything identical so Im at loss why the 2nd doesn't even send the email Thanks, C - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Chirantan Ghosh [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, August 23, 2005 10:15 AM Subject: RE: [PHP] PHP Printing Error Help [snip] I am new as you can assume. Hence, I have no clue how to turn register_globals back On [/snip] Look in your php.ini file. -- 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] PHP Printing Error Help
[snip] I tried looking in the local Root folder of my web site as well as the remote. I don't own the server so didn't know if to look for php.ini file there. Sorry for redundant Qs but I seem to be very lost. On a different Note, This page is the original working version I have: http://www.primarywave.com/BrokerOutpost_Contact.php This is the page I want to work allowing the check box values to be reported. http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php I kept almost everything identical so Im at loss why the 2nd doesn't even send the email [/snip] Is it a windows or linux server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Printing Error Help
[snip] Its Apache server, Linux [/snip] Put the follwoing in a seperate page and run it from the browser. It will give you the path to your php.ini file... ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
I went to the php.ini File it opened in notepad. I had this info: == ; You should do your best to write your scripts so that they do not require ; register_globals to be on; Using form variables as globals can easily lead ; to possible security problems, if the code is not very well thought of. register_globals = On == Does that imply register_globals is On My site's PHP info is available at http://www.primarywave.com/myPHPinfo.php Thanks, C [snip] On a different Note, This page is the original working version I have: http://www.primarywave.com/BrokerOutpost_Contact.php This is the page I want to work allowing the check box values to be reported. http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php I kept almost everything identical so Im at loss why the 2nd doesn't even email [/snip] - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Chirantan Ghosh [EMAIL PROTECTED]; php-general@lists.php.net Sent: Wednesday, August 24, 2005 10:16 AM Subject: RE: [PHP] PHP Printing Error Help [snip] Its Apache server, Linux [/snip] Put the follwoing in a seperate page and run it from the browser. It will give you the path to your php.ini file... ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Printing Error Help
[snip] I went to the php.ini File it opened in notepad. I had this info: == ; You should do your best to write your scripts so that they do not require ; register_globals to be on; Using form variables as globals can easily lead ; to possible security problems, if the code is not very well thought of. register_globals = On == Does that imply register_globals is On My site's PHP info is available at http://www.primarywave.com/myPHPinfo.php [/snip] Yes, register globals is on. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
Hi Richard , Jay helped me with the Global setting but the problem remains the same. Can you enlighten please? /[snip] If you are going to do this, you might as well just turn register_globals back On You've got the SAME security problem -- You just are doing it to yourself instead of letting PHP do it to you. /[/snip] Apparently the register_globals is On My site's PHP info is available at http://www.primarywave.com/myPHPinfo.php The problem still in hand is: == [snip] On a different Note, This page is the original working version I have: http://www.primarywave.com/BrokerOutpost_Contact.php This is the page I want to work allowing the check box values to be reported. http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php I kept almost everything identical so Im at loss why the 2nd doesn't even send the email [snip] Thanks, C - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Chirantan Ghosh [EMAIL PROTECTED] Cc: John Nichel [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, August 23, 2005 2:00 AM Subject: Re: [PHP] PHP Printing Error Help On Mon, August 22, 2005 12:56 pm, Chirantan Ghosh wrote: //[snip] You probably want to move into the relm of array's. For each one of your checkboxes, you can do this... input type=checkbox name=InterestedNumber[] value=1-877-HOMECASH /[/snip] I did look up ARRAY. I just didn't understand how I can insert a table( InterestedNumber) in an arrey so I could put something like this for form processing: -- ? foreach($HTTP_GET_VARS as $indx = $value) { ${$indx}=$value; } foreach($HTTP_POST_VARS as $indx = $value) { ${$indx}=$value; } Gak. If you are going to do this, you might as well just turn register_globals back On You've got the SAME security problem -- You just are doing it to yourself instead of letting PHP do it to you. if($sendmessage == yes){ $mailBody .= SelectedNumber: $SelectedNumber\n; //I am thinking this is where I should put the Array??/ $mailBody .= SelectedNumbers:\n; $mailBody .= implode(\n, $InterestedNumbers); $mailBody .= Comments: $comments\n\n\n; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Printing Error Help
[snip] This page is the original working version I have: http://www.primarywave.com/BrokerOutpost_Contact.php This is the page I want to work allowing the check box values to be reported. http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php I kept almost everything identical so Im at loss why the 2nd doesn't even send the email [/snip] We would actually have to see the non-working code to make a determination. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
Please find the whole HTML attached. I am sending the whole page because it has multiple PHP. The affecting PHP I thinking is the one retaining info what to email (Line 8 to 52) Thanks a lot, C NB: If I move table named InterestedNumber in an Array, how should I incorporate it in Line 34. - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Chirantan Ghosh [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Wednesday, August 24, 2005 11:28 AM Subject: RE: [PHP] PHP Printing Error Help [snip] This page is the original working version I have: http://www.primarywave.com/BrokerOutpost_Contact.php This is the page I want to work allowing the check box values to be reported. http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php I kept almost everything identical so Im at loss why the 2nd doesn't even send the email [/snip] We would actually have to see the non-working code to make a determination. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Printing Error Help
[snip] Please find the whole HTML attached. I am sending the whole page because it has multiple PHP. The affecting PHP I thinking is the one retaining info what to email (Line 8 to 52) [/snip] Please copy and paste the code into your e-mail (only the relevant lines) as most cannot receive attachments on this list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
I put the whole code in .txt version at http://www.primarywave.com/NONworkingCODE.txt I gave group global Writing permission aswell, edit if you like. Thanks, C /[snip] This page is the original working version I have: http://www.primarywave.com/BrokerOutpost_Contact.php This is the page I want to work allowing the check box values to be reported. http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php I kept almost everything identical so Im at loss why the 2nd doesn't even send the email /[/snip] - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Chirantan Ghosh [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Wednesday, August 24, 2005 11:43 AM Subject: RE: [PHP] PHP Printing Error Help [snip] Please find the whole HTML attached. I am sending the whole page because it has multiple PHP. The affecting PHP I thinking is the one retaining info what to email (Line 8 to 52) [/snip] Please copy and paste the code into your e-mail (only the relevant lines) as most cannot receive attachments on this list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Printing Error Help
[snip] I put the whole code in .txt version at http://www.primarywave.com/NONworkingCODE.txt I gave group global Writing permission aswell, edit if you like. [/snip] *smacks forehead* Hello? Is this thing on? Post only the relevant code? Can we see the source of the one that works? Only the mail code please -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Printing Error Help
[snip] I put the whole code in .txt version at http://www.primarywave.com/NONworkingCODE.txt I gave group global Writing permission aswell, edit if you like. [/snip] In the form you have name=InterestedNumber[] in the e-mail bit you have $SelectedNumber. Change them to match. If you want to print the whole array of InterestedNumber(showing one line above and one line below at line 34) $mailBody .= Main Activities: $activities\n\n; for($i = 0; $i count($InterestedNumber); $i++){ $mailBody .= SelectedNumber: . $InterestedNumber[$i] . \n; } $mailBody .= Comments: $comments\n\n\n; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
Hi Jay, Sorry for the headache I gave ya out of aggravation :) Now It mails me everything Except the check box info Here is the working mail code ( This is a different page: http://www.primarywave.com/BrokerOutpost_Contact.php ) ? foreach($HTTP_GET_VARS as $indx = $value) { ${$indx}=$value; } foreach($HTTP_POST_VARS as $indx = $value) { ${$indx}=$value; } if($sendmessage == yes){ $todaytime = date(F j, Y, g:i a); $mailTo = [EMAIL PROTECTED]; //$mailTo = [EMAIL PROTECTED]; $mailSubject = Primary Wave Media Contact BrokerOutpost Ref :: $todaytime; $mailBody = Information:\n\n; if($number){ $mailBody .= Number: $number\n\n; } $mailBody .= Full Name: $name\n; $mailBody .= Company: $company\n; $mailBody .= State:$state\n; $mailBody .= Email:$email\n; $mailBody .= Phone:$phone\n\n; $mailBody .= Main Activities: $activities\n\n; $mailBody .= SelectedNumber: $SelectedNumber\n; $mailBody .= Comments: $comments\n\n\n; $mailBody .= $todaytime; $mailHeaders = From: [EMAIL PROTECTED]; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); print CENTERH2Thank You/H2/CENTER; }else{ $_num = new number(); $_num-init(); $number = $_num-num_info[number]; ? = [snip] I put the whole NON-WORKINGcode in .txt version at http://www.primarywave.com/NONworkingCODE.txt I gave group global Writing permission aswell, edit if you like. [/snip] - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Chirantan Ghosh [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Wednesday, August 24, 2005 12:28 PM Subject: RE: [PHP] PHP Printing Error Help [snip] I put the whole code in .txt version at http://www.primarywave.com/NONworkingCODE.txt I gave group global Writing permission aswell, edit if you like. [/snip] *smacks forehead* Hello? Is this thing on? Post only the relevant code? Can we see the source of the one that works? Only the mail code please -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
On Mon, August 22, 2005 12:56 pm, Chirantan Ghosh wrote: //[snip] You probably want to move into the relm of array's. For each one of your checkboxes, you can do this... input type=checkbox name=InterestedNumber[] value=1-877-HOMECASH /[/snip] I did look up ARRAY. I just didn't understand how I can insert a table( InterestedNumber) in an arrey so I could put something like this for form processing: -- ? foreach($HTTP_GET_VARS as $indx = $value) { ${$indx}=$value; } foreach($HTTP_POST_VARS as $indx = $value) { ${$indx}=$value; } Gak. If you are going to do this, you might as well just turn register_globals back On You've got the SAME security problem -- You just are doing it to yourself instead of letting PHP do it to you. if($sendmessage == yes){ $mailBody .= SelectedNumber: $SelectedNumber\n; //I am thinking this is where I should put the Array??/ $mailBody .= SelectedNumbers:\n; $mailBody .= implode(\n, $InterestedNumbers); $mailBody .= Comments: $comments\n\n\n; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
Hi Richard, I am new as you can assume. Hence, I have no clue how to turn register_globals back On Is there any other place I can read more about creating Arrays? other than http://us2.php.net/manual/en/language.types.array.php The page is discussion: http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php doesn't seem to send the email even Can you please shed some light? Thanks, C - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Chirantan Ghosh [EMAIL PROTECTED] Cc: John Nichel [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, August 23, 2005 2:00 AM Subject: Re: [PHP] PHP Printing Error Help On Mon, August 22, 2005 12:56 pm, Chirantan Ghosh wrote: //[snip] You probably want to move into the relm of array's. For each one of your checkboxes, you can do this... input type=checkbox name=InterestedNumber[] value=1-877-HOMECASH /[/snip] I did look up ARRAY. I just didn't understand how I can insert a table( InterestedNumber) in an arrey so I could put something like this for form processing: -- ? foreach($HTTP_GET_VARS as $indx = $value) { ${$indx}=$value; } foreach($HTTP_POST_VARS as $indx = $value) { ${$indx}=$value; } Gak. If you are going to do this, you might as well just turn register_globals back On You've got the SAME security problem -- You just are doing it to yourself instead of letting PHP do it to you. if($sendmessage == yes){ $mailBody .= SelectedNumber: $SelectedNumber\n; //I am thinking this is where I should put the Array??/ $mailBody .= SelectedNumbers:\n; $mailBody .= implode(\n, $InterestedNumbers); $mailBody .= Comments: $comments\n\n\n; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Printing Error Help
[snip] I am new as you can assume. Hence, I have no clue how to turn register_globals back On [/snip] Look in your php.ini file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
Hi John, //[snip] You probably want to move into the relm of array's. For each one of your checkboxes, you can do this... input type=checkbox name=InterestedNumber[] value=1-877-HOMECASH /[/snip] I did look up ARRAY. I just didn't understand how I can insert a table( InterestedNumber) in an arrey so I could put something like this for form processing: -- ? foreach($HTTP_GET_VARS as $indx = $value) { ${$indx}=$value; } foreach($HTTP_POST_VARS as $indx = $value) { ${$indx}=$value; } if($sendmessage == yes){ $todaytime = date(F j, Y, g:i a); $mailTo = [EMAIL PROTECTED]; $mailBody .= Main Activities: $activities\n\n; $mailBody .= SelectedNumber: $SelectedNumber\n; //I am thinking this is where I should put the Array??/ $mailBody .= Comments: $comments\n\n\n; $mailBody .= $todaytime; $mailHeaders = From: [EMAIL PROTECTED]; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); print CENTERH2Thank You/H2/CENTER; }else{ $_num = new number(); $_num-init(); $number = $_num-num_info[number]; ? --- The PAGE I am testing is http://www.primarywave.com/BrokerOutpost_ContNAGHAM.php Thanks for the help, C - Original Message - From: John Nichel [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Monday, August 15, 2005 12:58 PM Subject: Re: [PHP] PHP Printing Error Help Chirantan Ghosh wrote: Hi John, I put each check box with name tried to get the values as I get of Name, etc. Somehow it didn't send that info so, now I tried to get the info of the whole TABLE named InterestedNumber(which contains all check boxes) ? //after all codes $mailBody .= Full Name: $name\n; ... $mailBody .= Company Info: $Company Info\n; $mailBody .= Interested Numbers: $InterestedNumber\n; $mailBody .= Interested Area: $InterestedArea\n; $mailBody .= Comments: $comments\n\n\n; $mailBody .= $todaytime; /// THIS is where I put in the check box How ever the main problem for me is Interested Numbers: $InterestedNumber\n; part where I have no clue what \n stands for OR why is it repeated in the Comments section. The page is http://www.primarywave.com/BrokerOutpost_Contact.htm you can see the source code if you like. Thanks a lot for the input, C The \n is just a new line. Your checkboxes are all named things like 1-877-HOMECASH and 1-877-APPLY NOW, so '$InterestedNumber' isn't going to have any of their values. You probably want to move into the relm of array's. For each one of your checkboxes, you can do this... input type=checkbox name=InterestedNumber[] value=1-877-HOMECASH input type=checkbox name=InterestedNumber[] value=1-877-APPLY NOW So on, and so forth. By naming them in this way, it will pass the value to your form processor as a numerical array of all the selected items. When you want to process it, just loop thru the array. http://us2.php.net/manual/en/language.types.array.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- 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
[PHP] PHP Printing Error Help
Hi Guys, I am new to PHP coding but that is no excuse for the mess I am making here. The ideal page for my needs is: http://www.primarywave.com/BrokerOutpost_Contact.php (Simple form in PHP where all form values are mailed) I could not make the CHECK BOX work in PHP page so tried in this HTM page. I prints out part of the PHP code itself. http://www.primarywave.com/BrokerOutpost_Contact.htm Can anyone PLEASE tell me where I am making a buffoon of myself? I am a designer who is trying to understand the language so do pardon my ignorance. Thanks, C
Re: [PHP] PHP Printing Error Help
Chirantan Ghosh wrote: Hi Guys, I am new to PHP coding but that is no excuse for the mess I am making here. The ideal page for my needs is: http://www.primarywave.com/BrokerOutpost_Contact.php (Simple form in PHP where all form values are mailed) I could not make the CHECK BOX work in PHP page so tried in this HTM page. I prints out part of the PHP code itself. http://www.primarywave.com/BrokerOutpost_Contact.htm What isn't working with the check boxes? How are you retrieving the values upon processing the form? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Printing Error Help
Ho John, I put each check box with name tried to get the values as I get of Name, etc. Somehow it didn't send that info so, now I tried to get the info of the whole TABLE named InterestedNumber(which contains all check boxes) ? //after all codes $mailBody .= Full Name: $name\n; ... $mailBody .= Company Info: $Company Info\n; $mailBody .= Interested Numbers: $InterestedNumber\n; $mailBody .= Interested Area: $InterestedArea\n; $mailBody .= Comments: $comments\n\n\n; $mailBody .= $todaytime; /// THIS is where I put in the check box How ever the main problem for me is Interested Numbers: $InterestedNumber\n; part where I have no clue what \n stands for OR why is it repeated in the Comments section. The page is http://www.primarywave.com/BrokerOutpost_Contact.htm you can see the source code if you like. Thanks a lot for the input, C - Original Message - From: John Nichel [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Monday, August 15, 2005 12:31 PM Subject: Re: [PHP] PHP Printing Error Help Chirantan Ghosh wrote: Hi Guys, I am new to PHP coding but that is no excuse for the mess I am making here. The ideal page for my needs is: http://www.primarywave.com/BrokerOutpost_Contact.php (Simple form in PHP where all form values are mailed) I could not make the CHECK BOX work in PHP page so tried in this HTM page. It prints out part of the PHP code itself. http://www.primarywave.com/BrokerOutpost_Contact.htm What isn't working with the check boxes? How are you retrieving the values upon processing the form? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- 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] PHP Printing Error Help
Chirantan Ghosh wrote: Ho John, I put each check box with name tried to get the values as I get of Name, etc. Somehow it didn't send that info so, now I tried to get the info of the whole TABLE named InterestedNumber(which contains all check boxes) ? //after all codes $mailBody .= Full Name: $name\n; ... $mailBody .= Company Info: $Company Info\n; $mailBody .= Interested Numbers: $InterestedNumber\n; $mailBody .= Interested Area: $InterestedArea\n; $mailBody .= Comments: $comments\n\n\n; $mailBody .= $todaytime; /// THIS is where I put in the check box How ever the main problem for me is Interested Numbers: $InterestedNumber\n; part where I have no clue what \n stands for OR why is it repeated in the Comments section. The page is http://www.primarywave.com/BrokerOutpost_Contact.htm you can see the source code if you like. Thanks a lot for the input, C The \n is just a new line. Your checkboxes are all named things like 1-877-HOMECASH and 1-877-APPLY NOW, so '$InterestedNumber' isn't going to have any of their values. You probably want to move into the relm of array's. For each one of your checkboxes, you can do this... input type=checkbox name=InterestedNumber[] value=1-877-HOMECASH input type=checkbox name=InterestedNumber[] value=1-877-APPLY NOW So on, and so forth. By naming them in this way, it will pass the value to your form processor as a numerical array of all the selected items. When you want to process it, just loop thru the array. http://us2.php.net/manual/en/language.types.array.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php