[PHP] pup
Hi, I'm new to this list. Can I post PUP questions to this list? regards, -ramesh P Save a tree...please don't print this e-mail unless you really need to Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
RE: [PHP] pup
Hi, I'm new to php. Say I have a check box which is checked already. Now I need to uncheck it and when I press the submit button, I should get the unchecked value. Can anyone help me on this. One.php if($qry[0]!=$login_type) { echo td class=tabhead align=center style=background-color:#CC66CCinput type=checkbox name=disable value=a.$count. checked DISABLED //br.$slot_value./td; } else { echo td class=tabhead align=center style=background-color:#00input type=checkbox name=enable[] value='--user .$slot_value. --ne .$nen. --timespec .$slt.' checked /br.$slot_value./td; } One.php calls Two.php Two.php $enable_slot= $_POST['enable']; $uncheck_slot= $_POST['uncheck']; if ($enable_slot){ echo $enable_slot; foreach($enable_slot as $a) { echo p.$a. --unreserve/p; } } I get only the results only if checked. I think I'm doing a mistake in the code in red font. regards, -rummy From: th.he...@gmail.com [mailto:th.he...@gmail.com] On Behalf Of German Geek Sent: Friday, April 17, 2009 9:47 AM To: Ramesh Marimuthu (WT01 - Telecom Equipment) Cc: php-general@lists.php.net Subject: Re: [PHP] pup From What i learned, yes you can write pup here. Does anyone print this mailing list? wtf?? i keep overestimating people's intelligence, im sorry! Tim-Hinnerk Heuer http://www.ihostnz.com Charles de Gaulle http://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html - The better I get to know men, the more I find myself loving dogs. 2009/4/17 ramesh.marimu...@wipro.com Hi, I'm new to this list. Can I post PUP questions to this list? regards, -ramesh P Save a tree...please don't print this e-mail unless you really need to Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
RE: [PHP] pup
Thanks Jim. Is there a way to get the value of that unchecked box? -rummy -Original Message- From: Jim Lucas [mailto:li...@cmsws.com] Sent: Friday, April 17, 2009 10:35 AM To: Ramesh Marimuthu (WT01 - Telecom Equipment) Cc: geek...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] pup ramesh.marimu...@wipro.com wrote: Hi, I'm new to php. Say I have a check box which is checked already. Now I need to uncheck it and when I press the submit button, I should get the unchecked value. Can anyone help me on this. One.php if($qry[0]!=$login_type) { echo td class=tabhead align=center style=background-color:#CC66CCinput type=checkbox name=disable value=a.$count. checked DISABLED //br.$slot_value./td; } else { echo td class=tabhead align=center style=background-color:#00input type=checkbox name=enable[] value='--user .$slot_value. --ne .$nen. --timespec .$slt.' checked /br.$slot_value./td; } One.php calls Two.php Two.php $enable_slot= $_POST['enable']; $uncheck_slot= $_POST['uncheck']; if ($enable_slot){ echo $enable_slot; foreach($enable_slot as $a) { echo p.$a. --unreserve/p; } } I get only the results only if checked. I think I'm doing a mistake in the code in red font. regards, -rummy When you uncheck a checkbox in an HTML form, it will not be submitted. http://www.w3.org/TR/html401/interact/forms.html#checkbox The part on the above page talking about only on checkbox controls can become successful. is the key here. The successful part links here: http://www.w3.org/TR/html401/interact/forms.html#successful-controls This explains that the definition of a successful checkbox submission is one that is on. To have a checkbox in the on state means that it has to be checked. So, any checkbox that is /not/ checked is considered off or undefined will not be submitted because it is not valid. Or something like that... :) Jim Lucas Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] pup
Many Thanks Jim. Your idea worked. -rummy -Original Message- From: Jim Lucas [mailto:li...@cmsws.com] Sent: Friday, April 17, 2009 11:13 AM To: Ramesh Marimuthu (WT01 - Telecom Equipment); PHP General List; geek...@gmail.com Subject: Re: [PHP] pup ramesh.marimu...@wipro.com wrote: I'm developing a slot reservation page. It shows checked boxes for the currently logged user. If he likes to unreserve it, he should uncheck it. For other users it is disabled. Also a currently logged user can book another slot. Also when I use hidden types, only if all the checked boxes are unchecked, I could get the hidden values. -rummy You could use an array system in your checkbox form section.? Basically, take your check boxes. I am assuming that you have a defined list of what is expected? Correct? Have your elements setup like such: input type=checkbox name=reserve[rm1] value=yes / Room #1 input type=checkbox name=reserve[rm2] value=yes / Room #2 input type=checkbox name=reserve[rm3] value=yes / Room #3 input type=checkbox name=reserve[rm4] value=yes / Room #4 input type=checkbox name=reserve[rm5] value=yes / Room #5 Then on your processing page, you know that you have 5 rooms, 1 - 5. With this information you can check to make sure that something exists ?php $rooms = range(1,5); for ( $i = 1; $i = 5; $i++ ) { if ( isset( $_POST['reserve']['rm'.$i] ) { # Room was checked } else { # Room was NOT checked. } } ? Something like that should do the trick. Jim Lucas Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] pup
Thanks for your idea. -Original Message- From: Phpster [mailto:phps...@gmail.com] Sent: Friday, April 17, 2009 5:39 PM To: Ramesh Marimuthu (WT01 - Telecom Equipment) Cc: li...@cmsws.com; geek...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] pup On Apr 17, 2009, at 1:06, ramesh.marimu...@wipro.com wrote: Thanks Jim. Is there a way to get the value of that unchecked box? -rummy -Original Message- From: Jim Lucas [mailto:li...@cmsws.com] Sent: Friday, April 17, 2009 10:35 AM To: Ramesh Marimuthu (WT01 - Telecom Equipment) Cc: geek...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] pup ramesh.marimu...@wipro.com wrote: Hi, I'm new to php. Say I have a check box which is checked already. Now I need to uncheck it and when I press the submit button, I should get the unchecked value. Can anyone help me on this. One.php if($qry[0]!=$login_type) { echo td class=tabhead align=center style=background-color:#CC66CCinput type=checkbox name=disable value=a.$count. checked DISABLED //br.$slot_value./td; } else { echo td class=tabhead align=center style=background-color:#00input type=checkbox name=enable[] value='--user .$slot_value. --ne .$nen. --timespec .$slt.' checked /br.$slot_value./td; } One.php calls Two.php Two.php $enable_slot= $_POST['enable']; $uncheck_slot= $_POST['uncheck']; if ($enable_slot){ echo $enable_slot; foreach($enable_slot as $a) { echo p.$a. --unreserve/p; } } I get only the results only if checked. I think I'm doing a mistake in the code in red font. regards, -rummy When you uncheck a checkbox in an HTML form, it will not be submitted. http://www.w3.org/TR/html401/interact/forms.html#checkbox The part on the above page talking about only on checkbox controls can become successful. is the key here. The successful part links here: http://www.w3.org/TR/html401/interact/forms.html#successful-controls This explains that the definition of a successful checkbox submission is one that is on. To have a checkbox in the on state means that it has to be checked. So, any checkbox that is /not/ checked is considered off or undefined will not be submitted because it is not valid. Or something like that... :) Jim Lucas Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php What I do in this case is define it to unchecked in the php code and then use the ternary operator to test it $checkbox1 = 0; $checkbox1 = (isset($_POST['check1'])) ? 1: 0 ; Bastien Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MAIL Error
Hi All, While using $m=new MAIL; I get an error Fatal error: Class 'MAIL' not found in Can anyone help on this? regards, -ramesh P Save a tree...please don't print this e-mail unless you really need to Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
RE: [PHP] MAIL Error
Yeah its all garbage. But its from the company. I don't know how to trim it. Can anyone suggest? -Original Message- From: tedd [mailto:tedd.sperl...@gmail.com] Sent: Tuesday, April 21, 2009 7:29 PM To: Ramesh Marimuthu (WT01 - Telecom Equipment); php-general@lists.php.net Subject: Re: [PHP] MAIL Error At 12:58 PM +0530 4/21/09, ramesh.marimu...@wipro.com wrote: P Save a tree...please don't print this e-mail unless you really need to Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ramesh: Could you trim your signature a bit? What's this Save a tree nonsense??? The paper industry plants more trees than it uses but this is not a topic for the PHP list. How about saving bandwidth or saving us the time to review the same long-ass signature over and over that tells us nothing but what everyone already knows AND does absolutely nothing to protect the company you work for. It's just a excessive length of garbage and misinformation that tells everyone your company is totally clueless about list etiquette. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MAIL Error
Thanks kranthi -Original Message- From: kranthi [mailto:kranthi...@gmail.com] Sent: Wednesday, April 22, 2009 11:02 AM To: Ramesh Marimuthu (WT01 - Telecom Equipment) Cc: tedd.sperl...@gmail.com; php-general@lists.php.net Subject: Re: [PHP] MAIL Error seems u r company mail server is adding this to all outgoing mails. if that is the case only option is to change configuration settings in the mail server. you can ask the anchorites to do that (i m not optimistic bout that, though). dont use this mail server to send mails to mailing lists Kranthi. Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php