[PHP] Doubt on using header and setcookie functions
Hi How to set cookies using header() function and using setcookie function? Setcookie('testcookie','Balaji',time()+3600,'/','10.145.0.1',1); If I want to write same thing with header function how can I do that? Is it like header(Set-Cookie: name=testcookie,value=Balaji,domain=10.145.0.1,secure=1) or header(Set-Cookie: testcookie,Balaji,10.145.0.1,1) Thanks in Advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help required on cookies
Hi Friends, I would like to know where the cookies will be stored? I have enabled cookies using session.use_cookies = 1. I found cookies will be stored in the environmental variable HTPP_COOKIE_VARS. But I didn't find anywhere this variable in my php.ini file. If I want to print all cookies stored in my browser how can I print? I tried to print in this way ?php echo All cookies :.$HTTP_COOKIE_VARS; echo brprevious cookie :.$HTTP_COOKIE_VARS[$Tamilnadu]; echo brprevious cookie :.$Tamilnadu; ? Output: Allcookies: Previouscookie: Previouscookie:Chennai === Please tell me how to print all the stored cookies in my browser and where these cookies will be stored? Where Can I see all these cookies?? Any logs we have to check?? Where can I see the http response headers?? (like cookies and stuff )..Do I need to use any protocol analyzer? Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help required on cookies
Hi Chris, Thanks for the help. ? print_r($_COOKIE); ? It is giving error saying call to undefined function _r(); And Setcookie in php is not conforming to the RFC2109. Comment and version how do we set? Thanks in advance Balaji -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 2:21 PM To: Balaji Ankem Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Help required on cookies Balaji Ankem wrote: Hi Friends, I would like to know where the cookies will be stored? Cookies are stored on the client, either in memory or written to disk. If I want to print all cookies stored in my browser how can I print? I'm going to assume this isn't really what you mean, and you want to print all of the cookies made available to PHP. You see, as I said, the cookies are stored on the client. If PHP, running on a remote Web site, had access to all cookies stored in your browser, this would be a big security problem, wouldn't it? I think what you're looking for is this: pre ? print_r($_COOKIE); ? /pre Where can I see the http response headers?? (like cookies and stuff )..Do I need to use any protocol analyzer? I wrote a simple utility in PHP to help me view the HTTP communication regardless of what Web site I'm interacting with. It basically uses the PHP sockets extension to behave like an HTTP proxy, so that you just configure your browser to use it as a proxy while you browse. It then embeds the HTTP transactions into the replies (text replies only) for convenience, so that they're just displayed at the bottom of each Web page. You're welcome to have a look to see if it might be useful to you. See http://protoscope.org/ for more information or http://shiflett.org/projects/protoscope/sample.html for an example of what it looks like when you use it. Happy hacking. Chris **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help required on cookies
But in RFC2109 they mentioned Comment and version are also attributes of the setcookie header. How do you set these attributes using php?? How this print_r() function works?? Thanks in advance Balaji -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 2:52 PM To: Balaji Ankem Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Help required on cookies Balaji Ankem wrote: ? print_r($_COOKIE); ? It is giving error saying call to undefined function _r(); That's weird. Maybe you have a space between print and _r? The function is print_r() with no spaces. And Setcookie in php is not conforming to the RFC2109. In what way? Remember that the setcookie() function itself does not need to conform to any syntax guidelines. Only the resulting HTTP header must conform to specifications such as those described in RFC 2109. Chris **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re-directing
Use header() function.. Header('Location: script name'); Best Regards Balaji -Original Message- From: Roberts, Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 7:58 PM To: PHP Mailing list (E-mail) Subject: [PHP] Re-directing Is there a way to redirect to a different script in PHP? I call it redirecting, but can't find it in the documentation using that track. I have a script...that if a certain criteria is met, I want to load a different script. Haven't been able to figure that out yet. I have gotten about it by conditionally executing a location.href in javascript. It works, but would like to know how to do it in PHP. ~Thanks. Mark Roberts Sr. Systems Analyst LanApps/Web Development The Williams Information Services Corporation 918-573-1706 [EMAIL PROTECTED] **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why my php can not get values from Form?
Enable Rigister_globals to On in php.ini file and then try. Best Regards Balaji -Original Message- From: ram friend [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 11:12 AM To: [EMAIL PROTECTED] Subject: [PHP] why my php can not get values from Form? hello, I have just installed apache+php4, but my php can not get values from form? what's wrong? following is the code in php named file welcome.php ?php echo( Welcome to our Web site, $usernm $passwd! ); ? I called it with http://localhost/welcome?username=passwd=bbb i get nothing, what's wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with implode() function
Hi, I have an array of elements which are separated with the operator comma(,). == $array = implode(,, $checkb); echo $array.'\n'; $result = mysql_query(DELETE FROM temp WHERE inv_tag IN ($array)) or die('Error in query'.mysql_error()); PTX526_P_1,SIM_1 Error in query Unknown column 'PTX526_P_1' in 'where clause'. Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with implode() function
Hi Jason, How to make $array look like 'PTX526_P_1','SIM_1' or PTX526_P_1,SIM_1. Thanks and Regards Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 8:22 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Problem with implode() function On Tuesday 16 July 2002 22:40, Balaji Ankem wrote: Hi, I have an array of elements which are separated with the operator comma(,). == $array = implode(,, $checkb); echo $array.'\n'; $result = mysql_query(DELETE FROM temp WHERE inv_tag IN ($array)) or die('Error in query'.mysql_error()); PTX526_P_1,SIM_1 Error in query Unknown column 'PTX526_P_1' in 'where clause'. Well I can't see what this has to do with PHP let alone the implode() function. The error quite clearly says unknown column ... The proper use of IN requires that string values must be enclosed in either single-quotes or double-quotes. Thus you need to make $array look like: 'PTX526_P_1','SIM_1' or PTX526_P_1,SIM_1 -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* It is the wisdom of crocodiles, that shed tears when they would devour. -- Francis Bacon */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] For Unsubscribe send a blank mail to ( php-general-unsubscribe@lists.php.net)
Hi guys, To unsubscribe from the list send a mail to [EMAIL PROTECTED] Visit http://www.php.net/unsub.php . Pls. Donot send a mail tp [EMAIL PROTECTED] Best regards Balaji -Original Message- From: gys [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 5:03 PM To: [EMAIL PROTECTED] Subject: [PHP] unsuscribe **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTTP_USER_AGENT?
It is working fine for me!!! -Original Message- From: George Hester [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 8:03 AM To: [EMAIL PROTECTED] Subject: [PHP] HTTP_USER_AGENT? I have this in my web site not in an executable folder: HTML HEAD TITLEMy First PHP Program/TITLE /HEAD BODY ?php echo Hello World!; ? /BODY /HTML No problem. I then put this in the same folder: HTML HEAD TITLEMy Second PHP Program/TITLE /HEAD BODY ?php echo $HTTP_USER_AGENT; ? /BODY /HTML Nothing appears. What's wrong? -- George Hester _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTTP_USER_AGENT?
Yes..That is right!!! :-) -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 8:53 AM To: Balaji Ankem Cc: [EMAIL PROTECTED] Subject: Re: [PHP] HTTP_USER_AGENT? It works for you because you have register_globals set to on in php.ini. If you set it to off it won't work any longer. -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Thu, 11 Jul 2002 08:07:48 +0530 Balaji Ankem [EMAIL PROTECTED] wrote: It is working fine for me!!! -Original Message- From: George Hester [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 8:03 AM To: [EMAIL PROTECTED] Subject: [PHP] HTTP_USER_AGENT? I have this in my web site not in an executable folder: HTML HEAD TITLEMy First PHP Program/TITLE /HEAD BODY ?php echo Hello World!; ? /BODY /HTML No problem. I then put this in the same folder: HTML HEAD TITLEMy Second PHP Program/TITLE /HEAD BODY ?php echo $HTTP_USER_AGENT; ? /BODY /HTML Nothing appears. What's wrong? -- George Hester _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is their a jobs mailing list?
Will it be not possible to apply for other countries jobs? -Original Message- From: Dan Hardiker [mailto:[EMAIL PROTECTED]] Sent: Monday, July 08, 2002 2:12 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] is their a jobs mailing list? I have no idea if this of any use to you guys ... but www.jobserv.co.uk has a load of IT jobs - but AFAIK they are all for mainland UK. Will be helpful for brits in any case. You might find a link to their continental / american / australian counterparts. -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help help help!!!!!!pls........
Hi dear friend, I have multiple check boxes ...and I gave the single name to all check boxes. If I post to my php script I am not getting all the values as an array.I am getting only one value(last value). = html head script language=javascript function checkitall() { var n=0,i=document.form1.OptionList.length; while(ni) { if(document.form1.checkall.checked) { document.form1.OptionList[n].checked=true; n=n+1; } else { document.form1.OptionList[n].checked=false; n=n+1; } } } function approve() { document.form1.method=post; document.form1.action=./approve_f.php; document.form1.submit(); return true; } /script /head body bgcolor=#FF text=#00 form name=form1 method=post table tr tdinput type=checkbox name=OptionList value=something1Option 1/input/td tdHello/td /tr tr tdinput type=checkbox name=OptionList value=something2Option 2/input/td tdHi/td /tr tr tdinput type=checkbox name=OptionList value=something3Option 3/input/td td How r u/td /tr tr tdinput type=checkbox name=checkall OnClick=checkitall()Check All/input/td /tr tr tdinput type=submit name=approve OnClick=return approve();Check All/input/td /tr /table /form /body /html === If I give name as OptionList[] I am getting an error for selectAll option. Any help would be greatly appreciable. Thanks and regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML Java script doubt..
Hi friend, sorry for putting this question to php-list. Here I am getting the error as Object doesn't support this property or method in line number 22. html head script language=javascript function checkall() { var n=0,i=document.form1.OptionList.length; while(ni) { document.form1.OptionList[n].checked=true; n=n+1; } } /script /head body bgcolor=#FF text=#00 form name=form1 method=post input type=checkbox name=OptionList[] value=something1Option 1/inputbr input type=checkbox name=OptionList[] value=something2Option 2/inputbr input type=checkbox name=OptionList[] value=something3Option 3/inputbr input type=checkbox name=checkall OnClick=checkall() /This is error line /form /body /html == Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to trigger particular java script function?
Hi friend, I want to trigger one java script function ( time delay) every time. How can I achieve this? Here my questuion is: I want to play all song files from my database. Here what I do is initially I display one button PLAY and then call java script delay function and it has to come back to php script and play next one again trigger to timedelay function etc... Any inputs highly appreciable. Thanks in advance Balaji html head script language=javascript !-- function delay(timep) { setTimeout( ,timep); } // -- /script /head body ?php $i=0; while($i3) { //otherwise Just I want to print $i with some time delays //by calling javascript:delay(2000) } ? /body /html == Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Displaying the table records along with check boxes.
Hi friend, I would like to display the table records along with check boxes for the purpose of selecting particular records or select all and for deleteing them or for other purpose. Anybody have ready made code for this type... Any help would be greatly appreciated. Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Displaying the table records along with check boxes.
Hi John, Thanks for the reply. Here the thing is I already tried and I desparately need urgently, thatÂ’s why I mailed to the group. Anyway thanx for u'r suggestion. Rgds Balaji -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 5:56 PM To: Balaji Ankem; [EMAIL PROTECTED] Subject: Re: [PHP] Displaying the table records along with check boxes. The code to create a check box is: input type=checkbox name=whatever value=something HTH, ---John Holmes... PS: It might help if you actually try to do something yourself and then ask a question. We're not here to feed you code. Anyways, a way you might approach it is to name all of your checkboxes the same, something like input type=checkbox name=delete[] value=$id Where $id is a unique identifier for the row/field/etc... Then, you simply use some code like this to delete all of the rows where the box was checked. ? $delete_ids = implode(,,$_REQUEST['delete']); $result = mysql_query(DELETE FROM your_table WHERE id IN ($delete_ids)); ? HTHSM, ---John Holmes... - Original Message - From: Balaji Ankem [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 03, 2002 8:05 AM Subject: [PHP] Displaying the table records along with check boxes. Hi friend, I would like to display the table records along with check boxes for the purpose of selecting particular records or select all and for deleteing them or for other purpose. Anybody have ready made code for this type... Any help would be greatly appreciated. Thanks and Regards Balaji -- 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 **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php mail() function is not working for me
Hi friend, I am getting the following problem from last 6 months..still I couldn't solve this problem. Warning: Failed to Connect in c:\www\imac\email.php on line 18 Warning: Failed to Connect in c:\www\imac\email.php on line 22 Email.php ?php //BE SURE TO CHANGE THE 3 LINES BELOW TO USE YOUR OWN //ADDRESS, NAME and DATA FILENAME //THE DATA FILE MUST ALREADY EXIST AND BE WORLD WRITEABLE $webweaver = [EMAIL PROTECTED]; $wwname = Balaji Ankem; $filename = visitors.dat; if (file_exists ($filename)) { $user_name=Ramesh; $user_mail=[EMAIL PROTECTED]; mail($webweaver,Visitor to PHP Example Form page, $user_name $user_mail just visited your site and submitted the form at www.auburn.edu/helpdesk/php/form.html., From: $user_name $user_mail); mail($user_mail,Thanks for visiting,Dear $user_name,\n We appreciate your visit.\n\n$wwname\n$webweaver, From: $wwname $webweaver); echo pYour name: b$user_name/bbr and e-mail address: b$user_mail/bbr have been sent to the webweaver, b$wwname/b, and a response has been e-mailed to you.p Not only that, you've been added to our records!/p; // record the visitor info $user_info = $user_name . - . $user_mail . \n; // open the file in append mode $handle = fopen ($filename,'a+'); fputs($handle,$user_info); //close the file fclose($handle); } else { echo bThe file $filename does not exist and needs to be created for this to work./b; } ? == Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail() function problem
Hi friend, I am using the SMTP server which needs authentication. When I use mail([EMAIL PROTECTED],Thanks for visiting,From:[EMAIL PROTECTED]); I am getting server error on the line which is having this mail function. How can I resolve this problem? Php.ini settings === sendmail_from [EMAIL PROTECTED] [EMAIL PROTECTED] sendmail_pathno valueno value SMTP10.145.2.16 10.145.2.16 10.145.2.16 is my SMTP server Ip address. Any help would be greatly appreciated. Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Email error (Was: Hi Jason)
Hi jason, Thankyou for the prompt reply.:-) here is the code. Actually line number 18 and 22 are having mail functions..that why I didn't send source code. Here is the source code.. == ?php //BE SURE TO CHANGE THE 3 LINES BELOW TO USE YOUR OWN //ADDRESS, NAME and DATA FILENAME //THE DATA FILE MUST ALREADY EXIST AND BE WORLD WRITEABLE $webweaver = [EMAIL PROTECTED]; $wwname = Balaji Ankem; $filename = visitors.dat; if (file_exists ($filename)) { $user_name=Ramesh; $user_mail=[EMAIL PROTECTED]; mail($webweaver,Visitor to PHP Example Form page, $user_name $user_mail just visited your site and submitted the form at www.auburn.edu/helpdesk/php/form.html., From: $user_name $user_mail); mail($user_mail,Thanks for visiting,Dear $user_name,\n We appreciate your visit.\n\n$wwname\n$webweaver, From: $wwname $webweaver); echo pYour name: b$user_name/bbr and e-mail address: b$user_mail/bbr have been sent to the webweaver, b$wwname/b, and a response has been e-mailed to you.p Not only that, you've been added to our records!/p; // record the visitor info $user_info = $user_name . - . $user_mail . \n; // open the file in append mode $handle = fopen ($filename,'a+'); fputs($handle,$user_info); //close the file fclose($handle); } else { echo bThe file $filename does not exist and needs to be created for this to work./b; } ? = Thanks and Regards Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 10:30 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Email error (Was: Hi Jason) On Wednesday 03 July 2002 00:24, you wrote: Hi Jason, when I am trying to send email through email.php I have got following errors. = Warning: Server Error in c:\www\imac\email.php on line 18 Warning: Server Error in c:\www\imac\email.php on line 22 What will be the reason? Thanks and Regards Balaji Please do not write to me directly. If you need help privately then I would need to charge a consultation fee. I'm placing this back onto the list where it belongs. Unless, that is, you really do want to pay a consultation fee, in which case let me know and we'll take it back private :) BTW you need to provide more info than that before people can help. How about some code? Don't forget to indicate where line 18 22 are. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Rube Walker: Hey, Yogi, what time is it? Yogi Berra: You mean now? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Will mail() function work for SMTP servers which needs Authentication
Hi friend, Will mail()function work for SMTP servers which needs authentication? If so how can pass the username and password to my SMTP server. Any help would be greatly appreciated. Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Will mail() function work for SMTP servers which needs Authentication
Yes Jason, I have checked and still checking..but I couuldn't get proper information. Thanks and Regards Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 9:45 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Will mail() function work for SMTP servers which needs Authentication On Wednesday 03 July 2002 11:57, Balaji Ankem wrote: Hi friend, Will mail()function work for SMTP servers which needs authentication? If so how can pass the username and password to my SMTP server. Any help would be greatly appreciated. Did you check on google like I suggested in an earlier post? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* To spot the expert, pick the one who predicts the job will take the longest and cost the most. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uploading a file
Upload.html === !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en HTML TITLE FileUpload /TITLE head script language=Javascript function check() { document.upload.method = POST; document.upload.enctype='multipart/form-data' document.upload.action=upload.php; document.upload.submit(); return true; } /script /head BODY center form name=upload Onsubmit=return check() enctype='multipart/form-data' brbrbrbr table border=0 width=100% trtd width=30% align=rightbfont size=2 face=ArialFilenbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;/font/b/tdtd width=5%/tdtd width=50%input type='file' name='path' size=16 value= /td/tr tr td width=50% align=right p align=left /td td width=5% /td td width=50% p align=left input type=submit Value=UPLOAD /td /tr /table /form /center /BODY /HTML Upload.php ?php if(copy($path,$path_name)) { print brbrbrcenterfont face='verdana' size=+2 color=blueYour file $path_name has been uploaded!!!/font/center ; } else { print font face='verdana' size=+2 color=redA problem was encountered during your file upload./fontbr; } ? = -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 9:29 PM To: [EMAIL PROTECTED] Subject: [PHP] uploading a file anyone have some code they can send me that will successfully upload a file? I've got all the HTML correct, it's just that my PHP code ain't working. Thanks! Phil **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with postfield elements
Hi Jason, Thanks for the reply. Just I posted to input fields from a html form and I tried to print. Here I am not registering any global variables. I have tried echo emp_id: .$_POST['emp_id']; and able to print succesfully. Every time I have to refer like this $_POST['emp_id']. Can't I refer as $emp_id ? Thanks and Regards Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 12:15 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Problem with postfield elements On Thursday 13 June 2002 14:18, Balaji Ankem wrote: Hi friend, Just now I have installed php 4.2.1 on my windows NT machine. Did you read the release notes or the documentation which comes with it, or the manual even? Here I found I am not able to get the postfield values. What would be the reason? register_globals is disabled. Read the manual or search the archives for more info. echo emp_id: .$emp_id; echo emp_pass:.$emp_pass; Use : echo emp_id: .$_POST['emp_id']; -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The strong give up and move away, while the weak give up and stay. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with postfield elements
Hi Justin , Thankyou. They made this change in php 4.2.1 only?? But I never faced this problem previously with php3, php 4.0.1. Is it like that? Thanks and Regards Balaji -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 12:44 PM To: Balaji Ankem Subject: Re: [PHP] Problem with postfield elements on 13/06/02 4:50 PM, Balaji Ankem ([EMAIL PROTECTED]) wrote: Every time I have to refer like this $_POST['emp_id']. Can't I refer as $emp_id ? Yes, partly. 1. you can always turn register globals back ON, but there is a reason (security) why they are now off by default. In short, if you know WHERE the var is coming from (eg POST), things should be more secure. (eg, if I can do something like foo.php?is_user=yes on your URL, it might have bad consequences, but if you ONLY trust a $_COOKIE['is_user'], then the script is already more secure. 2. at the top of the script, you can put in $emp_id = $_POST['emp_id']; Regards, Justin French **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with postfield elements
Hi friend, Just now I have installed php 4.2.1 on my windows NT machine. Here I found I am not able to get the postfield values. What would be the reason? Thanks and Regards Balaji. Login.html = !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en html head SCRIPT language=Javascript function check() { document.login.method = POST; document.login.action=./auth.php; document.login.submit(); return true; } /script /head body form name=login onSubmit=return check() EmpName: input type=text size=10 name=emp_id maxlength=10 value= Password: input type=password size=10 name=emp_pass maxlength=10 value= input type=submit Value=LOGIN /form /body /html = Auth.php == ?php echo emp_id: .$emp_id; echo emp_pass:.$emp_pass; ? == I got blank values.. Any help would be appreciable. -Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is there any substitute for header function?
Hi Martin, I have tried with full URL. But no use. Again displayed the error alert. Thanks and Regards Balaji -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:37 AM To: 'Balaji Ankem'; [EMAIL PROTECTED] Subject: RE: [PHP] Is there any substitute for header function? try specifying the full url. see how that goes -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 4:06 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Is there any substitute for header function? Hi Jason and friends, I am very sorry for that. Pls. Pardon me. Yaa I am sure header is causing that trouble and that to it is happening on Windows only. In linux it is not a problem. If I remove the 3 lines code present in if loop and if I keep any echo statement it is working fine. And If I try to access now( after removing 3 lines code and trying once) then it is working fine. That problem is coming in fresh browser context. Space is there in my actual program. Thanks and Regards Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Is there any substitute for header function? On Wednesday 29 May 2002 13:49, Balaji Ankem wrote: First of all, please start a new post when you have a new question. Do not just reply to an existing post. It's bad manners. And quoting the irrelevant existing post is even worse manners. Hi, Is there any substitute for header function.. Because of this I am getting error saying..php.exe has generated some errors and will be closed by windows. if ($row-user_type=='A') { mysql_close($connection); header(Location:admin.php); exit; } The correct using is: header(Location: admin.php); note the space. And are you sure that it is the header() function that is causing the above error? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Out of cards on drive D: */ -- 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 **Disclaimer** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is there any substitute for header function?
Hi, Yes Problem is there with the ID: Bug #15090 header(Location: $url) causes php.exe to generate an error Submitted: 17 Jan 5:21pm Modified: 18 Jan 11:54pm From: [EMAIL PROTECTED] Status: Closed Category: Reproducible crash Version: 4.0.6 OS: Windows 2000 Cheers Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 12:32 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Is there any substitute for header function? On Wednesday 29 May 2002 14:14, Balaji Ankem wrote: Hi Martin, I have tried with full URL. But no use. Again displayed the error alert. Try searching on http://bugs.php.net to see whether there are any known problems with header() under Windows. Try re-installing php. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Flattery is like cologne -- to be smelled, but not swallowed. -- Josh Billings */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is there any substitute for header function?
Hi, Is there any substitute for header function.. Because of this I am getting error saying..php.exe has generated some errors and will be closed by windows. if ($row-user_type=='A') { mysql_close($connection); header(Location:admin.php); exit; } Thanks in advance Balaji -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:32 AM To: 'Ed Lazor' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] easy date question? If you want to make it a few line shorter, change if ($MonthStartDay $Day) { $C = $Day - $MonthStartDay; } else if ($MonthStartDay $Day) { $C = 7 - $MonthStartDay + $Day; } to $C = ($MonthStartDay $Day ? 7 : 0) + $Day - $MonthStartDay; or maybe $C = ($MonthStartDay $Day ? 0 : 7) + $Day - $MonthStartDay; I haven't tried either one, so it may break it... If one, or both, work, then you could combine this line with the return line -Original Message- From: Ed Lazor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 2:44 PM To: Rasmus Lerdorf Cc: [EMAIL PROTECTED] Subject: Re: [PHP] easy date question? I came up with a solution that I'd like to share. Could someone confirm whether it's the best approach? Thanks, -Ed - source code # ex.: GetDay (Third, Saturday, 5, 2002); function GetDay($Week, $Day, $Month, $Year) { $MonthStartDay = date(w, mktime(0,0,0,$Month,1,$Year) ) + 1; switch ($Week) { case First : $Week = 0; break; case Second : $Week = 7; break; case Third : $Week = 14; break; case Fourth : $Week = 21; break; } switch ($Day) { case Sunday : $Day = 1; break; case Monday : $Day = 2; break; case Tuesday : $Day = 3; break; case Wednesday : $Day = 4; break; case Thursday : $Day = 5; break; case Friday : $Day = 6; break; case Saturday : $Day = 7; break; } $C = 0; if ($MonthStartDay $Day) { $C = $Day - $MonthStartDay; } else if ($MonthStartDay $Day) { $C = 7 - $MonthStartDay + $Day; } return ($C + 1 + $Week); } At 05:55 PM 5/28/2002 -0700, Rasmus Lerdorf wrote: See the PEAR Date/Calc class. On Tue, 28 May 2002, Ed Lazor wrote: How can I find out the date of the 3rd Tuesday of any given month? Thanks, -Ed -- 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 **Disclaimer** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is there any substitute for header function?
Hi Jason and friends, I am very sorry for that. Pls. Pardon me. Yaa I am sure header is causing that trouble and that to it is happening on Windows only. In linux it is not a problem. If I remove the 3 lines code present in if loop and if I keep any echo statement it is working fine. And If I try to access now( after removing 3 lines code and trying once) then it is working fine. That problem is coming in fresh browser context. Space is there in my actual program. Thanks and Regards Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Is there any substitute for header function? On Wednesday 29 May 2002 13:49, Balaji Ankem wrote: First of all, please start a new post when you have a new question. Do not just reply to an existing post. It's bad manners. And quoting the irrelevant existing post is even worse manners. Hi, Is there any substitute for header function.. Because of this I am getting error saying..php.exe has generated some errors and will be closed by windows. if ($row-user_type=='A') { mysql_close($connection); header(Location:admin.php); exit; } The correct using is: header(Location: admin.php); note the space. And are you sure that it is the header() function that is causing the above error? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Out of cards on drive D: */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can someone check this mysql code
Try this.. ?php $answers=$band, $middlename, $pot; $date=date (l dS of F Y h:i:s A); $sql = INSERT INTO prizeline VALUES ('', 'email', 'name', 'address', 'answers', 'date');; -Balaji -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 11:12 AM To: PhilipNZ Staff Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Can someone check this mysql code On Mon, 20 May 2002, PhilipNZ Staff wrote: My code below don't want to insert the code into the database what am I doing wrong? ?php $answers=$band, $middlename, $pot; $date=date (l dS of F Y h:i:s A); $sql = INSERT INTO `prizeline` (`id`, `email`, `name`, `address`, `answers`, `date`) VALUES ('', 'email', 'name', 'address', 'answers', 'date');; What is the error message shown when you printed mysql_error() ? And you probably don't want the semicolon at the end of the query string (the one inside the double quotes). miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session.save_path in php.ini
Which php.ini file u r changing? Are u refering php.ini which is in C:\Windows directory? - Original Message - From: Tim Loram [EMAIL PROTECTED] Date: Thursday, April 25, 2002 4:56 pm Subject: [PHP] Session.save_path in php.ini Hi, Having some issues with the session.save_path value in php.ini Whatever I change this value to it always ends up trying to save the temporary session info in /tmp (the default setting in php.ini). I can overide the value by setting a new path in the actual php script using session_save_path(my/path/here) but if I don't specify a path like this it always attempts to save in /tmp (c:\tmp\) even though the value in the php.ini file says otherwise Why is this happening ? HELP! Cheers. Tim Loram LaTiS Centre University of Exeter Queens Building Queens Drive Exeter EX4 4QH Tel: (01392) 263721 http://latis.ex.ac.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to connect to mysql through JAVA?
Hi, What is the command to connect to mysql through java. Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading files problem
hi friend, do we have static variables in php? If we have can u give the syntax!!1 Thanks in advance Balaji Content-Type: multipart/alternative; boundary=_=_NextPart_001_01C1D70D.F3519000 --_=_NextPart_001_01C1D70D.F3519000 Content-Type: text/plain hi there, I'm trying to upload a file using php on an apache server running on linux. The code of the form I'm using is as follow: form enctype=\multipart/form-data\ method=POST action=$PHP_SELF?action=doupload pFile to upload:br input type=file name=file size=30 input type=text name=zio size=30 pbutton name=submit type=submit Upload /button /form when I press the submit button after selecting the file, nothing happens. I tried to print the filename passed by the form but it is empty. If I run the same page on my win2k server, everything works fine. It seems as that the form doesn't pass post variables. I also tried to delete the enctype parameter and in this case the variables are printed on screen. Is there any particular setting on linux for this page to work? thanks --_=_NextPart_001_01C1D70D.F3519000-- **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading files problem
specify the value attribute in input elements!!! - Original Message - From: Balaji Ankem [EMAIL PROTECTED] Date: Friday, March 29, 2002 4:27 pm Subject: Re: [PHP] uploading files problem hi friend, do we have static variables in php? If we have can u give the syntax!!1 Thanks in advance Balaji Content-Type: multiparboundary= _=_NextPart_001_01C1D70D.F3519000 --_=_NextPart_001_01C1D70D.F3519000 Content-Type: text/plain hi there, I'm trying to upload a file using php on an apache server running on linux. The code of the form I'm using is as follow: form enctype=\multipart/form-data\ method=POST action=$PHP_SELF?action=doupload pFile to upload:br input type=file name=file size=30 input type=text name=zio size=30 pbutton name=submit type=submit Upload /button /form when I press the submit button after selecting the file, nothing happens. I tried to print the filename passed by the form but it is empty. If I run the same page on my win2k server, everything works fine. It seems as that the form doesn't pass post variables. I also tried to delete the enctype parameter and in this case the variables are printedon screen. Is there any particular setting on linux for this page to work? thanks --_=_NextPart_001_01C1D70D.F3519000-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to remove ^M characters from a directory?
Hi, I have moved my php files to linux system. Now it z showing (control+M)(^M) characters in the file. How can I remove those characters? Any help would be appreciable. Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 100% repeatable problem with PHP 4.0.1 in WIN2k environment.
Hi, I am able to produce the following problem 100% in WINDOWS. Problem is u can not produce success message in new browser context .. Error: php.exe has generated some errors and will be closed by windows. I am facing this problem from last 1 year. Files Login.html == !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en html body ONLOAD=document.login.emp_id.focus() font face=arial brbrcenter h1 WELCOME TO LOGIN PAGE /h1/centerbrbr center form name=login method=post action=./authentication.php table border=0 width=100% center trtd width=50% align=rightbfont size=2 face=ArialEmployee Nonbsp;/font/b/tdtd width=5%/tdtd width=50%input type=text size=10 name=emp_id maxlength=10 value=/td/tr trtd width=50% align=rightbfont size=2 face=ArialPasswordnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/font/ b/tdtd width=5%/tdtd width=50% input type=password size=10 name=emp_pass maxlength=10 value=/td/tr tr td width=50% align=right p align=left /td td width=5% /td td width=50% p align=left input type=submit Value=LOGIN/td /tr /center /table /center /form /body /html === Authentication.php ?php // Connect to MySQL if (isset ($HTTP_POST_VARS{emp_id}) isset ($HTTP_POST_VARS{emp_pass})) { $connection=mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'amerm' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = PASSWORD('$emp_pass'); // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { $row = mysql_fetch_object($result); // A matching row was found - the user is authenticated. //start a new session by registering the employee number. session_start(); session_register(user,pw); $user=$emp_id; $pw =$emp_pass; //This is the value from employee table ..just simplified for simulating this problem $n=2; if ($n==2) { //close mysql connection mysql_close($connection); header(Location: success.php); exit; } } else { //close mysql connection mysql_close($connection); //User does not exist or not authenticated. header(Location:not_authorized.html); exit; } } else { //User does not exist or not authenticated. header(Location:wrongusage.html); exit; } ? = Success.php ?php echo you have logged in successfully!br; echo Session variablesbr; echo $HTTP_SESSION_VARS[user].$HTTP_SESSION_VARS[pw]; ? === Can anybody tell me what is causing the problem. Any help would be very appreciable. Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 100% repeatable problem with PHP 4.0.1 in WIN2k environment.
Hi! Karthik, Thankyou for reply!!! You too will get if u try to execute the following files.. This is not the problem with php.exe. Every one will get if anybody try to execute the following logic. You asked me how u r managing the problem.. I am managing like following: 1. Remove the if condition (if $n==2) from authentication.php and execute .. 2. Now replace that if condition and now try to execute then problem will be solved. Best Regards Balaji -Original Message- From: TV Karthick Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 5:06 PM To: Balaji Ankem Subject: Re: [PHP] 100% repeatable problem with PHP 4.0.1 in WIN2k environment. Hi, From the surface leve, it looks like your php.exe corrupted and probably crashed ?. Or doesn't works properly with your webserver, PWS, Apache or whatever you have ?. But I don't know how did you manage to work with such a *thing* for the past 1 year ?. Karthick Hi, I am able to produce the following problem 100% in WINDOWS. Problem is u can not produce success message in new browser context .. Error: php.exe has generated some errors and will be closed by windows. I am facing this problem from last 1 year. Files Login.html == !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en html body ONLOAD=document.login.emp_id.focus() font face=arial brbrcenter h1 WELCOME TO LOGIN PAGE /h1/centerbrbr center form name=login method=post action=./authentication.php table border=0 width=100% center trtd width=50% align=rightbfont size=2 face=ArialEmployee Nonbsp;/font/b/tdtd width=5%/tdtd width=50%input type=text size=10 name=emp_id maxlength=10 value=/td/tr trtd width=50% align=rightbfont size=2 face=ArialPasswordnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;/font/ b/tdtd width=5%/tdtd width=50% input type=password size=10 name=emp_pass maxlength=10 value=/td/tr tr td width=50% align=right p align=left /td td width=5% /td td width=50% p align=left input type=submit Value=LOGIN/td /tr /center /table /center /form /body /html === Authentication.php ?php // Connect to MySQL if (isset ($HTTP_POST_VARS{emp_id}) isset ($HTTP_POST_VARS{emp_pass})) { $connection=mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'amerm' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = PASSWORD('$emp_pass'); // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { $row = mysql_fetch_object($result); // A matching row was found - the user is authenticated. //start a new session by registering the employee number. session_start(); session_register(user,pw); $user=$emp_id; $pw =$emp_pass; //This is the value from employee table ..just simplified for simulating this problem $n=2; if ($n==2) { //close mysql connection mysql_close($connection); header(Location: success.php); exit; } } else { //close mysql connection mysql_close($connection); //User does not exist or not authenticated. header(Location:not_authorized.html); exit; } } else { //User does not exist or not authenticated. header(Location:wrongusage.html); exit; } ? = Success.php ?php echo you have logged in successfully!br; echo Session variablesbr; echo $HTTP_SESSION_VARS[user].$HTTP_SESSION_VARS[pw]; ? === Can anybody tell me what is causing the problem. Any help would be very appreciable. Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http
RE: [PHP] 100% repeatable problem with PHP 4.0.1 in WIN2k environment.
Hi scott, Yes I examined.. It z dying in if loop (if $n==2) at the statement header(Location: success.php); It will be helpful to me if u try to execute those files as I told. Thanks in advance Balaji -Original Message- From: scott furt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 5:26 PM To: php Subject: Re: [PHP] 100% repeatable problem with PHP 4.0.1 in WIN2k environment. Have you examined the PHP error logs? Have you turned up error reporting to the max (E_ALL) and examined what it returned? Have you examined $php_errmsg (if configured in php.ini)? Have you tried putting echo statements every few lines to see exactly where and why the script dies? Balaji Ankem wrote: Hi, I am able to produce the following problem 100% in WINDOWS. Problem is u can not produce success message in new browser context .. Error: php.exe has generated some errors and will be closed by windows. I am facing this problem from last 1 year. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi! Is there any equivalent function with header?
Hi friend, Is there any equivalent statement to header (Location: user.php); Because I am getting problem with that line in fresh browser context. How to see the php error log? And how to display an error messages in php? Thanks and Regards -Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi! Is there any equivalent function with header?
Thanks for the reply!!! I want equivalent statement to header (Location: http://www.domain.com/user.php;); Because I am getting the problem saying php.exe has generated errors and will be closed by windows. You need to restart the program. An error log is being created And no error is logged in error log. Thanks in advance Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 7:57 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Hi! Is there any equivalent function with header? On Tuesday 19 March 2002 22:20, Balaji Ankem wrote: Hi friend, Is there any equivalent statement to header (Location: user.php); Because I am getting problem with that line in fresh browser context. The correct usage is: header (Location: http://www.domain.com/user.php;); ie you need the full URL. How to see the php error log? And how to display an error messages in php? Read the chapter on Error Handling -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* A man without a woman is like a statue without pigeons. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Store data in array
Hi Uma, you can use as in C language with index. $a[i]= $val; i is index starts from zero. For example u want to extract specific field from mysql database and store it in array.. Let us assume num is a attribute name of the table heap. = $sql=select num from heap; $result=mysql_query($sql1) or die(Error in query sql.mysql_error()); $n=mysql_numrows($result); If( $n0) { $i=0; While(($row=mysql_fetch_object($result))) { $a[$i]=$row-num; $i=$i+1; } } = Hope this helps. Best Regards Balaji -Original Message- From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 4:55 PM To: Andrey Hristov Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Store data in array On Mon, 18 Mar 2002, Andrey Hristov wrote: AHIf it is possible do the sorting in the SQL statement by using ORDER AHBY. SQL sorting is much faster than in PHP. However I have gone through that manual alreadybut i need to sort by php sorting. AHwhile ($row= mysql_fetch_assoc($res)){ $rows[] = $row; } AH I have tried this but while sorting using php sort it is displaying array only.If the elements are stored in the array properly i can perform sorting. please tell me how to extract a specific field from mysql database and store it in array... AHThen you have many ways to sort. Look at : sort(), asort(), arsort(), AHusort(), uasort() etc. AH AHBest regards, AHAndrey Hristov AH AH- Original Message - AHFrom: Uma Shankari T. [EMAIL PROTECTED] AHTo: [EMAIL PROTECTED] AHSent: Monday, March 18, 2002 12:25 PM AHSubject: [PHP] Store data in array AH AH AH AH AH Hello, AH AH Anyone can please tell me how to store the row details fetched from AH database to array so that to sort the same array after storing AH AH AH -Uma AH AH AH -- AH PHP General Mailing List (http://www.php.net/) AH To unsubscribe, visit: http://www.php.net/unsub.php AH AH AH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi what is the prob with this small file?
Hi friend, I am getting null values (0) for the following program. what will be the problem? Any help greatly appreciable!! example.php === ?php // Connect to MySQL $connection = mysql_connect( 'localhost', 'balaji', 'pingpong' ); // Select database on MySQL server mysql_select_db( 'amerm' ) or die ( 'Unable to select database.'.mysql_error()); // Formulate the queries $sql1=select UNIX_TIMESTAMP('start_date') startdate,UNIX_TIMESTAMP('end_date') enddate from request where req_status='Approved'; $result1=mysql_query($sql1) or die ('Error in sql1'.mysql_error()); $n=mysql_numrows($result1); echo 'number of rows:'.$n; while($row=mysql_fetch_object($result1)) { echo 'starttime'.$row-startdate.'endtime'.$row-enddate; } mysql_close($connection); ? = I am getting values printed is 0. Actually UNIX_TIMESTAMP(2001:03:21 10:45:00) means what? What it returns? Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi what is diff. Between mktime() and UNIX_TIMESTAMP()
Hi, UNIX_TIMESTAMP(2002-03-21 08:30:00) and mktime(2002,03,21,08,30,00) equal or not? But both are same timestamp..but returning values are different.y? Unixtimestamp from Mysql :1016679600 Unixtimestamp from PHP :953699601 y this much difference? Any help would be appreciable. Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi some logical help is required!!!
**Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi some logic help is required!!!!!
Hi friend, I need some help on this logic... 1. I have some range (A to B) which is fixed and A,B are very large numbers.(AB) 2. I have X to Y and I want to check this range should not match with A to B. How can I check this? Ex: 1) A=4 B=8 Totally 4 cases will come!! X=2 Y=5 X=5 Y=6 X=2 Y=9 X=6 Y=9 In all the above cases that logic should return false. How can I solve this?? Don't use for loop!(Because those are very large numbers (chrores)) And logic should be simple and cute! Cheers Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can anybody tell what is wrong with this file?
Title: Message Hi friend, I am using the browser Netscape 4.7. It z not displaying the select box..blindly displaying in text format.. (If u want to see open example.jpg)Example.html=!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en"htmlbodytable tr td width="19%" bgcolor="#DBF3DE"1/td td width="15%" bgcolor="#DBF3DE"1/td td width="14%" bgcolor="#DBF3DE"Raghu/td td width="19%" bgcolor="#DBF3DE"Modem/td td width="18%" bgcolor="#DBF3DE"8L_LT/td td width="14%" bgcolor="#DBF3DE"W_SW150_1/td td width="14%" bgcolor="#DBF3DE"NULL/td td width="14%" bgcolor="#DBF3DE"NULL/td td width="14%" bgcolor="#DBF3DE"Pending/td td select name="change1" option value=""SELECT/option option value="Approved"Approved/option option value="Rejected"Rejected/option /select /td td width="14%" bgcolor="#DBF3DE" form name="name_1" method="post" action="modify_status.php" input type="submit" name="modify" value="SUBMIT" input type="hidden" name="req_id" value="1" input type="hidden" name="dev_tag" value="W_SW150_1" /formbr /td /tr/table/body/html= Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
Thankyou for reply!! I want to do it in PHP. Thanks in advance Balaji -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:04 PM To: Php-General Subject: RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Do you want to do this in mySQL or PHP? Niklas -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 12. maaliskuuta 2002 12:30 To: 'Php-General' Subject: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to convert the mysql(DATETIME) time to the format DD/MM/YYYY HH:MM AM or PM using PHP?
Hi friend, I never ued strftime function. I am confusing with the syntax. My problem is like this: I have the DATETIME in the variable $row-fromdate as -MM-DD HH:MM:SS. Is it possible to convert it to DD/MM/ HH:MM AM or PM using strftime() function? //Is below code is correct $time=strftime([%a%b%C%d%I%p],$row-fromdate); echo '$time'; Thanks in advance. Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? When you select the 'datetime' field from mysql use UNIX_TIMESTAMP(). Then in PHP use strftime() to format the 'datetime' field to your liking. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Happiness isn't something you experience; it's something you remember. -- Oscar Levant */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi How to compare two dates using PHP which are from mysql database?
Hi, I would like to compare the two dates (including time stamp) using php. Is it possible? Any help would be apprciable. Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to compare two dates using PHP which are from mysql database?
Hi Jan, I want to compare the DTAETIME1,DATETIME2 which are from mysql table and want to compare in PHP. But strtotime takes only one argument and it checks whether it is valid or not. Balaji -Original Message- From: Jan Rademaker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 6:40 PM To: Balaji Ankem Cc: Php-General Subject: Re: [PHP] Hi How to compare two dates using PHP which are from mysql database? On Tue, 12 Mar 2002, Balaji Ankem wrote: http://www.php.net/manual/en/function.strtotime.php you can compare the results with =, etc... Hi, I would like to compare the two dates (including time stamp) using php. Is it possible? Any help would be apprciable. Thanks in advance Balaji -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
Hi, I already have the date in mysql (DATETIME)format in variable called $start_date. I would like to convert that in to the form DD/MM/ HH:MM AM or PM. Thanks in advance. -Balaji -Original Message- From: Faisal Abdullah [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 7:04 AM To: Balaji Ankem; 'Php-General' Subject: Re: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Try date(d/m/Y h:m A); On Tuesday 12 March 2002 18:29, Balaji Ankem wrote: Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Random number Question
Try Now: form action=number.php method=post The computer has picked a number between 1 and 10. Guess the number and you win!BR Enter your guess: input type=text name=guess value= size=3 INPUT TYPE=submit VALUE=Submit my number NAME=submit /form -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 13, 2010 9:25 AM To: [EMAIL PROTECTED] Subject: [PHP] Random number Question Hi all, I having a hard time understanding why this won't work. I have a form which is suppose to pass the guess to the script. Here it is: the form is guess.php: form action=number.php method=post The computer has picked a number between 1 and 10. Guess the number and you win!BR Enter your guess: input type=text size=3 INPUT TYPE=submit VALUE=Submit my number NAME=guess /form The script is number.php: ?php echoThe number is:; srand((double)microtime()*100); $number = rand(1,10); echo $number; if($guess = = $number) { echoBRYou have won!; }else{ print(BRSorry that wasn't the answer); } ? Any help would be appreciated. Thanks in advance Jennifer Downey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi problem with selected value!!
Title: Message Hi friend, could u plz. Tell me how to display the slected option value in alert box?Code I wrote is like this.. But I am getting NULL.. Any help would be appreciable..=html head script language="Javascript"function check(){ var a; alert(document.babai.bongu.value); // Is it correct?? return true;}/script /head bodyform name="babai"select name="bongu" option value="11"11/optiuon option value="12"12/optiuon option value="13"13/optiuon/selectinput type="submit" value="check" /form/body/htmlThanks in advanceBalaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi can we write a form inside td element of a table?
Hi, can we give a form element as td inside table element? Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can anybody help me?
Hi friend, from morning onwards I am facing the problem with following php script. This script functionality as follows: Getting the date from user and validating it. I couldn't trace where the error is. Can anybody help me? Any help greatly appreciable. Devicetag.php - ?php //checking whether user had logged in or not. require(./secure_connection.php); $flag=session_authentication(); if(!$flag) { header(Location:wrongusage.html); exit; } // Connect to MySQL $connection = mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'amerm' ) or die ( 'Unable to select database.' ); $emp_id=$HTTP_SESSION_VARS[user]; $query1=select emp_name from employee where emp_id='$emp_id'; $result=mysql_query($query1) or die(unable to execute query); // Get the employee name who logged in $line=mysql_fetch_array($result); $emp_name=$line[emp_name]; // Get current time and date $today = date(Y:m:d H:i:s); ? !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en HTML head script type=JavaScript function changepage() { if(document.makereq.dev_name.selectedIndex!=0) { document.makereq.method=POST; document.makereq.action=./makerequest.php; document.makereq.submit(); return true; } return false; } function save() { if (document.makereq.dev_name.options[0].selected) { alert('Please choose the device name'); document.makereq.dev_name.focus(); return false; } else if(document.makereq.dev_type.options[0].selected) { alert(Please choose the device type); document.makereq.dev_type.focus(); return false; } else if(document.makereq.dev_tag.options[0].selected) { alert(Please choose the device tag); document.makereq.dev_tag.focus(); return false; } else { var flag; alert(Debug point #1); flag=checkDate(); if(flag==0) { return false; } else { flag=window.confirm('Are you sure details are correct?'); if(flag) { document.makereq.method = POST; document.makereq.action=save_request.php; document.makereq.submit(); return true; } else return false; } } } function checkDate() { var myDayStr1 = document.makereq.date1.value; var myMonthStr1 = document.makereq.month1.value; var myYearStr1= document.makereq.year1.value; var myDateStr1 = myDayStr + ' ' + myMonthStr + ' ' + myYearStr; /* Using form values, create a new date object which looks like Wed Jan 1 00:00:00 EST 1975. */ var myDate1 = new Date( myDateStr1 ); // Convert the date to a string so we can parse it. var myDate_string1 = myDate1.toGMTString(); /* Split the string at every space and put the values into an array so, using the previous example, the first element in the array is Wed, the second element is Jan, the third element is 1, etc. */ var myDate_array1 = myDate_string1.split( ' ' ); /* If we entered Feb 31, 1975 in the form, the new Date() function converts the value to Mar 3, 1975. Therefore, we compare the month in the array with the month we entered into the form. If they match, then the date is valid, otherwise, the date is NOT valid. */ if ( myDate_array1[2] != myMonthStr1 ) { alert( 'I\'m sorry, but ' + myDateStr1 + ' is NOT a valid date.' ); return 0; } myDayStr2 = document.makereq.date2.value; myMonthStr2 = document.makereq.month2.value; myYearStr2 = document.makereq.year2.value; myDateStr2 = myDayStr2 + ' ' + myMonthStr2 + ' ' + myYearStr2; var myDate2 = new Date( myDateStr2 ); var myDate_string2 = myDate2.toGMTString(); var myDate_array2= myDate_string2.split( ' ' ); if ( myDate_array2[2] != myMonthStr2 ) { alert( 'I\'m sorry, but ' + myDateStr2 + ' is NOT a valid date.' ); return 0; } return 1; } function check() { document.makereq.method = POST;
[PHP] Anybody have the script for getting date from the user and validating it?
Hi, If any body have the script for getting the date including the time from the user and validating it. If anybody have can u please forward it to me. Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can anybody help me?
Dear Tyler Thankyou for reply. I got java script error message! Line: 478 Char :1 Error:Object expected Code :0 Otherwise if u have the script (html and java) for getting the date and time and validating it... could u plz. Forward it to me. Thanks in advance Balaji -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 07, 2002 7:08 PM To: Balaji Ankem; Php-General Subject: Re: [PHP] Can anybody help me? Did you recieve an error? If so, what was it? Tyler - Original Message - From: Balaji Ankem [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 7:23 AM Subject: [PHP] Can anybody help me? Hi friend, from morning onwards I am facing the problem with following php script. This script functionality as follows: Getting the date from user and validating it. I couldn't trace where the error is. Can anybody help me? Any help greatly appreciable. Devicetag.php - ?php //checking whether user had logged in or not. require(./secure_connection.php); $flag=session_authentication(); if(!$flag) { header(Location:wrongusage.html); exit; } // Connect to MySQL $connection = mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'amerm' ) or die ( 'Unable to select database.' ); $emp_id=$HTTP_SESSION_VARS[user]; $query1=select emp_name from employee where emp_id='$emp_id'; $result=mysql_query($query1) or die(unable to execute query); // Get the employee name who logged in $line=mysql_fetch_array($result); $emp_name=$line[emp_name]; // Get current time and date $today = date(Y:m:d H:i:s); ? !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en HTML head script type=JavaScript function changepage() { if(document.makereq.dev_name.selectedIndex!=0) { document.makereq.method=POST; document.makereq.action=./makerequest.php; document.makereq.submit(); return true; } return false; } function save() { if (document.makereq.dev_name.options[0].selected) { alert('Please choose the device name'); document.makereq.dev_name.focus(); return false; } else if(document.makereq.dev_type.options[0].selected) { alert(Please choose the device type); document.makereq.dev_type.focus(); return false; } else if(document.makereq.dev_tag.options[0].selected) { alert(Please choose the device tag); document.makereq.dev_tag.focus(); return false; } else { var flag; alert(Debug point #1); flag=checkDate(); if(flag==0) { return false; } else { flag=window.confirm('Are you sure details are correct?'); if(flag) { document.makereq.method = POST; document.makereq.action=save_request.php; document.makereq.submit(); return true; } else return false; } } } function checkDate() { var myDayStr1 = document.makereq.date1.value; var myMonthStr1 = document.makereq.month1.value; var myYearStr1= document.makereq.year1.value; var myDateStr1 = myDayStr + ' ' + myMonthStr + ' ' + myYearStr; /* Using form values, create a new date object which looks like Wed Jan 1 00:00:00 EST 1975. */ var myDate1 = new Date( myDateStr1 ); // Convert the date to a string so we can parse it. var myDate_string1 = myDate1.toGMTString(); /* Split the string at every space and put the values into an array so, using the previous example, the first element in the array is Wed, the second element is Jan, the third element is 1, etc. */ var myDate_array1 = myDate_string1.split( ' ' ); /* If we entered Feb 31, 1975 in the form, the new Date() function converts the value to Mar 3, 1975. Therefore, we compare the month in the array with the month we entered into the form. If they match, then the date is valid, otherwise, the date is NOT valid. */ if ( myDate_array1[2] != myMonthStr1 ) { alert( 'I\'m sorry, but ' + myDateStr1 + ' is NOT a valid date.' ); return 0; } myDayStr2 = document.makereq.date2.value; myMonthStr2 = document.makereq.month2.value; myYearStr2 = document.makereq.year2.value; myDateStr2 = myDayStr2 + ' ' + myMonthStr2 + ' ' + myYearStr2; var myDate2 = new Date( myDateStr2 ); var myDate_string2 = myDate2.toGMTString(); var myDate_array2= myDate_string2.split( ' ' ); if ( myDate_array2[2] != myMonthStr2 ) { alert( 'I\'m sorry, but ' + myDateStr2 + ' is NOT a valid date.' ); return 0; } return 1; } function check() { document.makereq.method = POST; document.makereq.action=createrequest_f.php; document.makereq.submit(); return true; } /script /head BODY background=imacbg1.gif ONLOAD=document.makereq.dev_tag.focus() form name=makereq div align=center center h2CREATE REQUEST/h2 table border=0 width=100% tr td width=50% align=right p align=rightbfont size=2 face=ArialDevice Name/font/b /td td width=5%/td td
[PHP] Is it correct having number of forms in the same html page?
**Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
[PHP] Abnormal behaviour with php
Hi , It z amazing behaviour...I am wondering how it is coming only for first time execution. If I remove the two If conditions in authentication.php and if I execute then it is displaying the blank screen. And again if we replace those two if conditions and if you execute again then it works fine. Details are below: I have a login page where we enter login details..And I post these details to authentication.php After system rebooting if I execute first time it is giving alert with message Program Error "php.exe has generated errors and will be closed by windows. You will need to restart the program. An error log is being created. OK "Login.html== post emp_id and password to authentication.phpAuthentication.php==?php // Connect to MySQL $connection=mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'amerm' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = "SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = PASSWORD('$emp_pass')"; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { $row = mysql_fetch_object($result); // A matching row was found - the user is authenticated. //start a new session by registering the employee number. session_start(); session_register("user","pw","usertype"); $user=$emp_id; $pw =$emp_pass; $usertype=$row-user_type; //This is the precious code. If we remove these two conditions and if you run once. Then it shows blank. //And if you run second time withese two conditions it works fine. if ($row-user_type=='S') { //close mysql connection mysql_close($connection); header("Location: admin.php"); exit; } else if ($row-user_type=='U') { //close mysql connection mysql_close($connection); header ("Location: user.php"); exit; } } else { //close mysql connection mysql_close($connection); //User does not exist or not authenticated. header("Location:not_authorized.html"); exit; }? How can I overcome this problem. Thanks in advance. Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
[PHP] how to get the calender
Hi, I want to get the calender displayed beside the input box. If user select a particular date from the calender after selection it should display the date in the input box along with the time stamp. Any help will be appreciated. Thanks in advance. -Balaji- **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HAPPY VALENTINES DAY
Hi friends, Wish you all A very Happy Valentines Day!!! May this Day bring in lots of Joy, Happiness, Success, Love May all your dreams come true Warm Regards , Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to get IP address?
Hi friends, I would like to get or extract the IP address from the URL in to a variable. How can I do that? Any help very appreciable. Thanks in advance -Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to pass URL??
How to pass the current URL to this function? parse_url (string url) This function call is in calling file ... say some http://10.145.2.68/auto/test.php test.php contains the parse_url funcction. I want to pass the same URL to this function. Because IP address changes every time. Please help out me. Thanks in advance -Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IP - URL
No Renze, what I really want is in the calling php file itself I want to get the IP address. Say some test.php..I call this file like http://10.145.2.23/test.php I want to get 10.145.2.23 in test.php file itself. I think parse_url will help me. But I don't know how to pass the current URL itself to test.php file. Thanks in advance -Balaji -Original Message- From: * RzE: [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:13 PM To: Balaji Ankem Subject: IP - URL Hi there, I just found out I probably sent you the wrong answer to your question. What I sent you was how to get the IP-address of the user of your website. But you want to get the IP-address of some URL? So you want the IP of a website? I think it should be something like: ---[php-code]--- if (preg_match (#^([^:]*://){0,1}[^/]+#, $the_url, $matches)) { $base_url = $matches[1]; $the_ip = gethostbyname($base_url); } else { // Oops... no base URL! } ---[end of php-code]--- I must tell you, though, that I just typed this in this email. I have never use this, and I haven't tested this. So it might need some finetuning and stuff. But I guess it's a good start for solving your problem. Let me know... -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php.exe has generated some errors and will be closed by windows
Hi friends, I am getting the problem everytime "php.exe has generated some errors and will be closed by windows". I kept header function after completion of authentication to navigate to the corresponding page. I am facing this problem every time. If I remove that header function once and by running it one time and again by keeping the same header function again then it z working properly. How can I overcome this problem?? Any help greatly appreciable. Thanks in advance. -Balaji --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] can u find error in php file?
?php include_once('Mail/smtp.php');include_once('Net/SMTP.php'); # Replace 127.0.0.1 with another SMTP host if needed$smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', ''));$headers['Subject'] = 'Sample subject';$headers['Reply-To'] = '[EMAIL PROTECTED]';$headers['From'] = '[EMAIL PROTECTED]';$headers['User']='bankem';$headers['Password']='narayana';$recipients = array('[EMAIL PROTECTED]'); $body = EOF This is a sample body. EOF; $return = $smtp_session-send($recipients, $headers, $body); if ($return) echo "Mail was successfully sent to [EMAIL PROTECTED]";else echo "FAIL"; ? for above program I am getting Mail was successfully sent to [EMAIL PROTECTED]. But actually no mail was received by me. -Balaji --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] no one can find solution to my problem??
?php /* recipients */$to = "Mary [EMAIL PROTECTED]" ; /* subject */$subject = "Birthday Reminder"; /* message */$message = 'htmlheadtitleBirthday Reminders for August/title/headbodypHere are the birthdays upcoming in August!/ptabletr thPerson/ththDay/ththMonth/ththYear/th/trtr tdJoe/tdtd3rd/tdtdAugust/tdtd1970/td tdSally/tdtd17th/tdtdAugust/tdtd1973/td/tr/table/body/html'; /* To send HTML mail, you can set the Content-type header. */$headers = "MIME-Version: 1.0\r\n";$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; /* additional headers */$headers .= "From: Balaji Ankem [EMAIL PROTECTED]\r\n"; $headers .= "Cc: [EMAIL PROTECTED]\r\n";$headers .= "Bcc: [EMAIL PROTECTED]\r\n";$headers['User']='bankem';$headers['Password']='narayana'; /* and now mail it */mail($to, $subject, $message, $headers); ? Warning: Server Error in c:\www/email1.php on line 45 --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] no one can find solution to my problem??
Hi Jon, I am not running sendmail on my localhost. I am sending stuff to my company mail server. yaa I tried with SMTP also..But no use.. if u don't mind...please check the following code.. ?php include_once('Mail/smtp.php'); include_once('Net/SMTP.php'); # Replace 127.0.0.1 with another SMTP host if needed $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', '')); $headers['Subject'] = 'Sample subject'; $headers['Reply-To'] = '[EMAIL PROTECTED]'; $headers['From'] = '[EMAIL PROTECTED]'; $headers['User']='bankem'; $headers['Password']='narayana'; $recipients = array('[EMAIL PROTECTED]'); $body = EOF This is a sample body. EOF; $return = $smtp_session-send($recipients, $headers, $body); if ($return) echo Mail was successfully sent to [EMAIL PROTECTED]; else echo FAIL; ? - And the result was Mail was successfully sent to mailto:[EMAIL PROTECTED]. I don't know what z happening.. Thanks in advance. -Balaji - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'Balaji Ankem' [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 3:35 PM Subject: RE: [PHP] no one can find solution to my problem?? How have you got it all set up? Are you running sendmail on localhost, or are you sending stuff to your ISPs mail server? If it's the latter you mail be better off opening an SMTP session and talking directly to the server, rather than using mail(). Cheers Jon -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 08 January 2002 10:04 To: Jon Haworth Subject: Re: [PHP] no one can find solution to my problem?? Hi, Jon Thankyou for u'r reply. But our mail server needs authentication.(username and password).. I am trying this from last 6 months..but still I couldn't find any solution. -Balaji - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'Balaji Ankem' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 3:09 PM Subject: RE: [PHP] no one can find solution to my problem?? $headers .= Cc: mailto:[EMAIL PROTECTED]\r\n; $headers .= Bcc: mailto:[EMAIL PROTECTED]\r\n; $headers['User']='bankem'; $headers['Password']='narayana'; /* and now mail it */ mail($to, $subject, $message, $headers); ? Warning: Server Error in c:\www/email1.php on line 45 You do not need to send your username and password with the headers - those are the MAIL headers (From, Reply-To, Errors-To, etc) Cheers Jon --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] no one can find solution to my problem??
Do I get to see the class then? Thankyou. :-) It's hard to see what this line is doing: $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', '')); This line creates SMTP session (parameters are mail server, SMTP port, authentication required or not) Without seeing what these lines are including: include_once('Mail/smtp.php'); include_once('Net/SMTP.php'); These two lines include the smtp.php and SMTP.php from php/pear/Mail/smtp.php - php/pear/Net/SMTP.php for required functions send and Mail_smtp. cheers -Balaji - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'Balaji Ankem' [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 4:17 PM Subject: RE: [PHP] no one can find solution to my problem?? Do I get to see the class then? It's hard to see what this line is doing: $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', '')); Without seeing what these lines are including: include_once('Mail/smtp.php'); include_once('Net/SMTP.php'); Cheers Jon -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 08 January 2002 10:53 To: Jon Haworth Subject: Re: [PHP] no one can find solution to my problem?? Thanks for u'r reply. :) cheers -Balaji - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'Balaji Ankem' [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 4:08 PM Subject: RE: [PHP] no one can find solution to my problem?? Would be handy to see the class as well :-) Cheers Jon -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 08 January 2002 10:24 To: Jon Haworth Cc: [EMAIL PROTECTED] Subject: Re: [PHP] no one can find solution to my problem?? Hi Jon, I am not running sendmail on my localhost. I am sending stuff to my company mail server. yaa I tried with SMTP also..But no use.. if u don't mind...please check the following code.. ?php include_once('Mail/smtp.php'); include_once('Net/SMTP.php'); # Replace 127.0.0.1 with another SMTP host if needed $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', '')); $headers['Subject'] = 'Sample subject'; $headers['Reply-To'] = '[EMAIL PROTECTED]'; $headers['From'] = '[EMAIL PROTECTED]'; $headers['User']='bankem'; $headers['Password']='narayana'; $recipients = array('[EMAIL PROTECTED]'); $body = EOF This is a sample body. EOF; $return = $smtp_session-send($recipients, $headers, $body); if ($return) echo Mail was successfully sent to [EMAIL PROTECTED]; else echo FAIL; ? --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Regarding mail function
Hi , My file name: bala.php --- ?phpmail("[EMAIL PROTECTED]", "hi friend", "Hi, how are you? Expecting reply from you. -Bala"); ? for the above program I am getting the following warning.. - Warning: Server Error in c:\www/bala.php on line 3- I have changed in php.ini with my SMTP server (arabhi.wipro.com or 10.145.2.18) In outlook settings we give the username and password for our mail server. Is it required here also? could you please tell available headers for e-mail function? Is ther any headers like user name and password?? Any help greatly appreciable... Thanks in advance. -Balaji --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help me to win the battle with browser's cache
Hi, me also faced many probs last 3 months back and i overcome that. solution - use session variables.. register login info as session vars and during logout unregister... This is the solution to u'r problem.. - All the best -Balaji - Original Message - From: Olexandr Vynnychenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 12, 2001 7:02 PM Subject: [PHP] Help me to win the battle with browser's cache Hello php-general, I have index.php, which has a href=index.php?logoutLog out/a. When I click it, I am logged out the site. But I type index.php in browser's address bar, press Enter and ... it shows non-logouted page. What should I write in php code to tell browser something like forget about old page, don't display it, get the newest version? Some time ago I tried to do that in several ways and nothing gived 100% result. And other thing I saw was that Netscape and Explorer behave in different ways in such cases. Could someone help me? Maybe this topic was discussed before, but still... I appreciate greatly any suggestion. -- Olexandr Vynnychenko mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to find the browser type in HTML or PERL??
Hi, Anybody know how to code in HTML or perl to find the browser say if Iexplore { do this } else if Netscape { do this } Thanks and regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] interesting warning!!!
Hi,friend, i registered login info while login using session_register session_register(user,pw); --- and during logout i have unregistered like following.. session_unregister(user,pw); This is the warning i got after logout.. Warning: Wrong parameter count for session_unregister() in /www/imac/logout.php on line 4 Thanks and Regards -Balaji Ankem -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] prob with include file
Hi! same is working on windows but on Lynux giving the following problem.. Warning: Failed opening 'admin.php' for inclusion (include_path='/www/inc') in /www/imac/authentication.php on line 46 -- if ($row-user_type=='A') { file://close mysql connection mysql_close($connection); include('admin.php'); exit; } else if ($row-user_type=='S') { file://close mysql connection mysql_close($connection); include('super.php'); exit; } else if ($row-user_type=='O') { file://close mysql connection mysql_close($connection); include('ordinary.php'); exit; } - And i tried this also include('./admin.php'); -- Thanks in advance Regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to set the time for session??
Hi, i want to expire the session if user sits 15 minutes idle without doing anything. Then how can i set the time for session?? Thanks in advance Regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem regarding select boxes
Hi! friend, I had one html form . In that i had 5 inputs. First option is a select box. If the selected item is Mobile then only i want to display second and third input boxes. Otherwise i want to hide those two options. How can i endure that? Please give the solution to this problem. Thanks and regards -Balaji Here i am sending the file.. !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en html head META HTTP-EQUIV=Refresh content=120;URL=http://localhost/imac/addinventory.php; script language=Javascript function check(){ if(document.addinv.inv_name.options[0].selected) { alert('Please select the item name'); document.addinv.inv_name.focus(); return false; } else if(document.addinv.inv_type.options[0].selected) { alert('Please select the item type'); document.addinv.inv_type.focus(); return false; } else if (document.addinv.inv_tag.value=='' || document.addinv.inv_tag.value=='0') { alert('Inventory tag is required and it must start with alphabet.Please try again'); document.addinv.inv_tag.focus(); return false; } else { document.addinv.method = POST; document.addinv.action=add_inv.php; document.addinv.submit(); return true; } } /script /head body background=imacbg1.gif ONLOAD=document.addinv.inv_name.focus() center h1 ADD INVENTORY ITEM /h1/center ! Get current time and date ?php$today = date(Y:m:d h:i:s); ? center h3 TIME STAMP: ?php echo $today; ? /h3 form name=addinv Item Name : select name=inv_name STYLE=width : 120px option value=0 SELECTEDSELECT/option option value=MobileMobile/option option value=SIMSIM/option option value=Data CableData Cable/option option value=ChargerCharger/option option value=Power SupplyPower Supply/option /select Item Type: select name=inv_type STYLE=width : 120px option value=0 SELECTEDSELECT/option option value=PTX520PTX520/option option value=PTX438PTX438/option option value=J5J5/option option value=J6J6/option option value=Z5Z5/option /select IMEI Numberinput type=text name=inv_imei size=15 value= Item Tag input type=text name=inv_tag size=15 value= Status select name=inv_status STYLE=width : 120px option value=0 SELECTEDSELECT/option option value=stockSTOCK/option option value=inuseIN USE/option /select input type=button Value=ADD OnClick=check();/td /form /center /body/html If Item name is Mobile then only we can enter type and IMEI...otherwise i want to hide and i will insert blank values in to the database. Thanks in advance. Regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem regarding select boxes
Hi! friend, I had one html form . In that i had 5 inputs. First input is a select box. If the selected item in first input is Mobile then only i want to display second andthird input boxes. Otherwise i want to hide those two options.How can i endure that?Please give the solution to this problem.Here i am sending the file..!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en"htmlheadMETA HTTP-EQUIV="Refresh"content="120;URL=http://localhost/imac/addinventory.php"script language="Javascript"function check(){ if(document.addinv.inv_name.options[0].selected) { alert('Please select the item name'); document.addinv.inv_name.focus(); return false; } else if(document.addinv.inv_type.options[0].selected) { alert('Please select the item type'); document.addinv.inv_type.focus(); return false; } else if (document.addinv.inv_tag.value=='' ||document.addinv.inv_tag.value=='0') { alert('Inventory tag is required and it must start withalphabet.Please try again'); document.addinv.inv_tag.focus(); return false; } else { document.addinv.method = "POST"; document.addinv.action="add_inv.php"; document.addinv.submit(); return true; } }/script/headbody background="imacbg1.gif" center h1 ADD INVENTORY ITEM /h1/center ! Get current time and date ?php $today = date("Y:m:d h:i:s"); ?center h3 TIME STAMP: ?php echo $today; ? /h3form name="addinv" Item Name : select name="inv_name" STYLE="width : 120px" option value="0" SELECTEDSELECT/option option value="Mobile"Mobile/option option value="SIM"SIM/option option value="Data Cable"Data Cable/option option value="Charger"Charger/option option value="Power Supply"Power Supply/option/selectItem Type: select name="inv_type" STYLE="width : 120px" option value="0" SELECTEDSELECT/option option value="PTX520"PTX520/option option value="PTX438"PTX438/option option value="J5"J5/option option value="J6"J6/option option value="Z5"Z5/option /selectIMEI Numberinput type="text" name="inv_imei" size="15" value=""Item Tag input type="text" name="inv_tag" size="15" value=""Status select name="inv_status" STYLE="width : 120px" option value="0" SELECTEDSELECT/option option value="stock"STOCK/option option value="inuse"IN USE/option /select input type="button" Value="ADD" /td/form/center/body/htmlIf Item name is Mobile then only we can enter type and IMEI...otherwise iwant to hide and i will insert blank values in to the database.please help out me. Thanks in advance.Regards-Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] problem in the small code
What is the problem with following code.. if ( $row!=0 ) { $res=mysql_fetch_object($result); if( $res-inv_status==ASSIGNED) { echo h2It is in assigned state. Please first return it and then change the status/h2; exit; } elseif( $res-inv_status==AVAILABLE) { // Delete the item from tinventory Transaction table $sql1=DELETE from tinventory where inv_tag='$inv_tag'; $result1 = mysql_query( $sql1 ) or die('Unable to execute query1'); } -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] hi
Hi, what z wrong in this code?? ?php echo a href=\?php show_source('source.php')?\view source/abr/br/; ? I am getting the following error Forbidden You don't have permission to access / on this server. --- - Apache/1.3.20 Server at ankem.wipro.com Port 80 How to rectify this thing?? Thanks in advance Regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to connect Excel as a database from mysql
Hi, I am generating a report in exel sheet. For this i am planing to use exel as a data base. can you send the statements to connect exel sheet as a database and relate queries. Thanks in advance. Regards Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] warning on Installation of PHP on windows 98
Hi, while installing php on my windows 98 machine i got the following warning this came when i execute this C:\phpphp.exe -i Unable to load dynamic library 'c:\php/mysql.dll'-one of the library files needed to run this application can not be found (that error is java script dialog warning). Please tell me how to correct this. Thanks and regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to pass authentication info to SMTP server
Hi friends, I would like to implement sending an e-mail through SMTP server. Here my SMTP server needs authentication. How to pass the username and password to SMTP server?? Thanks and regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to pass authentication info to SMTP server
Hi Ramsus and Renze, I would like to implement sending an e-mail through SMTP server. Here my SMTP server needs authentication. How to pass the username and password to SMTP server?? Thanks in advance. Regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to implement e-mail facility?
Hi friend, I want to mail a user if he forget password . How to implement that. What are all the requirements. please see the following code. ?php $user_name=Balaji Ankem; $user_mail=[EMAIL PROTECTED]; mail($user_mail,Thanks for visiting,Dear $user_name,\n We appreciate your visit.); ? Thanks and regards -Balaji Ankem -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: How to implement e-mail facility?
hi! , mine is windows 98 machine. Not linux. anyway i am using my company mail server. I am finding php.ini in c:\pear\tests directory instaed of c:\windows and it does not contain anything. It has following stuff only. ; php.ini for PEAR tests include_path=.. [java] extension=php_java.dll java.library.path=c:\php\extensions\ java.class.path=c:\php\extensions\jdk1.3.1\php_java.jar;c:\myclasses (this one i added just some time back for implementing e-mail) [mail function] ; For Win32 only. SMTP = 10.145.0.18 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] And i want to change environment variables like HTTP_REFERER and SMTP and all.. I am in a position unable to change those vars. thanks in advance. Regards -Balaji - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Balaji Ankem [EMAIL PROTECTED] Sent: Friday, September 07, 2001 7:43 AM Subject: Re: How to implement e-mail facility? Where is sendmail on your system? Make php.ini have this: sendmail_path = /usr/bin/sendmail -t -i Only use whatever your sendmail path is. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Balaji Ankem [EMAIL PROTECTED] To: Kraa de Simon [EMAIL PROTECTED] Cc: Richard Lynch [EMAIL PROTECTED] Sent: Thursday, September 06, 2001 5:49 PM Subject: How to implement e-mail facility? Hi , it is giving the following errors... plz check.. email2.php ?php $user_name=Balaji Ankem; $user_mail=[EMAIL PROTECTED]; mail($user_mail,Thanks for visiting,Dear $user_name,\n We appreciate your visit.); ? errors: Warning: Unknown error in c:\www\email2.php on line 7 php.ini ; php.ini for PEAR tests include_path=.. [java] extension=php_java.dll java.library.path=c:\php\extensions\ java.class.path=c:\php\extensions\jdk1.3.1\php_java.jar;c:\myclasses [mail function] ; For Win32 only. SMTP = 10.145.0.18 ; For Win32 only. sendmail_from = [EMAIL PROTECTED] Thanks and regards -Balaji - Original Message - From: Kraa de Simon [EMAIL PROTECTED] To: 'Balaji Ankem' [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Renze Munnik [EMAIL PROTECTED] Sent: Thursday, September 06, 2001 2:34 PM Subject: RE: [PHP] How to implement e-mail facility? Edit the [mail function] section in php.ini: [mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. sendmail_from = [EMAIL PROTECTED] ; For Unix only. You may supply arguments as well (default: 'sendmail -t -i'). ;sendmail_path = HTH, Simon. -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: donderdag 6 september 2001 23:00 To: [EMAIL PROTECTED] Cc: Renze Munnik Subject: [PHP] How to implement e-mail facility? Hi friend, I want to mail a user if he forget password . How to implement that. What are all the requirements. please see the following code. ?php $user_name=Balaji Ankem; $user_mail=[EMAIL PROTECTED]; mail($user_mail,Thanks for visiting,Dear $user_name,\n We appreciate your visit.); ? Thanks and regards -Balaji Ankem -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] what will be the output for this pgm?
Hi friend, what will be the output for the following program? ?php $foo=$HTTP_SERVER_VARS[HTTP_REFERER]; echo $foo; ? For me it is printing the blank value. Thanks in advance Regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 2what will be the output for this pgm?
Hi friend, what will be the output for the following program? ?php $foo=$HTTP_SERVER_VARS[HTTP_REFERER]; echo $foo; ? For me it is printing the blank value. Thanks in advance Regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to replicate a table in Mysql?
Hi friend, I want to replicate the table which is existed in database of Mysql. Thanks in advance. Regards -Balaji - Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to get the referer value?
Hi! friend, How to get the referer value in the PHP.(getHeader(Referer)) Thanks in advance. -Balaji - Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] hi
Hi, Renze, I have one doubt in HTML. I should not ask this in this group. I don't have any alternative. Please consider this. How to increase the length of the select box. It is comming width as very less. I would like to increase that width. see the following code.. BODY background=imacbg1.gif ONLOAD=document.issue.inv_name.focus() form name=issue div align=center center h2ISSUE/h2 input type=hidden name=issued_by value=?php echo $emp_name; ?/ h2Issuing by ?php echo $emp_name; ? /h2 table border=0 width=100% tr th width=50% align=right p align=rightbfont size=2 face=ArialEquipment Namenbsp;/font/b/th td width=5%/td td width=50% align=left select name=inv_name script language=php $query = SELECT distinct inv_name FROM inventory ORDER BY inv_name ; $result = mysql_query($query); if(mysql_num_rows($result)) { // we have at least one equipment, so show all equipments as options in select form print(option value=\\select/option); while($row = mysql_fetch_row($result)) { print(option value=\$row[0]\$row[0]/option); } } else { print(option value=\\No equipment added yet/option); } /script /select /td /tr tr th width=50% align=right p align=rightbfont size=2 face=ArialEquipment Typenbsp;/font/b/th td width=5%/td td width=50% select name=inv_type script language=php $query = SELECT distinct inv_type FROM inventory ORDER BY inv_type; $result = mysql_query($query); if(mysql_num_rows($result)) { // we have at least one equipment, so show all equipments as options in select form print(option value=\\select/option); while($row = mysql_fetch_row($result)) { print(option value=\$row[0]\$row[0]/option); } } else { print(option value=\\No equipment added yet/option); } file://closing the mysql connection mysql_close($connection); // Get current time and date $today = date(Y:m:d H:i:s); /script /select /td /tr trtd width=50% align=rightbfont size=2 face=ArialEquipment Tagnbsp;/font/b/tdtd width=5%/tdtd width=40% input type=text name=inv_tag size=20 value=/td/tr trtd width=50% align=rightbfont size=2 face=ArialIssued Tonbsp;/font/b/tdtd width=5%/tdtd width=40% input type=text name=issued_to size=20 value=/td/tr trtd width=50% align=rightbfont size=2 face=ArialIssue Datenbsp;/font/b/tdtd width=5%/tdtd width=40% input type=text name=issue_date size=20 value=?php echo $today;?/td/tr tr td width=50% align=right p align=left /td td width=5% /td td width=50% p align=left input type=button Value=SUBMIT OnClick=check();/td /tr /table /center /div /form /BODY Thanks and regards -Balaji - Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fw: [PHP] Help.
first let me know about that exe file. can u call that exe file in browser??? If yes can we give like http://path to exe//??input co-ords... -Balaji - Original Message - From: rajarajeswari balasubramanian To: [EMAIL PROTECTED] Sent: Friday, August 17, 2001 12:09 PM Subject: [PHP] Help. Hi,I have created a database with the backend of Mysqland i am accesing the database using PHP scripts.In the database there is one field, which has theinformation of the structure of a molecule as aCoordinate data.when i am using the mysql_fetch_array() command toretrive the data, it's just taking the text part ofthe file, which is simply a ASCII characters anddisplaying that on the browser screen.I have a program whihc will take that coordinate fileas the input and it will convert that file into a 3Dstructure, i have the exe file of that program.Now my query is how do i access this exe file in the php script???,Is that Possible in some way??? so the data is retrived it has to automatically invokethe ./xxx file and it will give the 3D rendering ofthat data which is in the form of coordinate file.Please give me some suggestiosn about this.Thanks in advance.Raji__Do You Yahoo!?Make international calls for as low as $.04/minute with Yahoo! Messengerhttp://phonecard.yahoo.com/-- PHP General Mailing List (http://www.php.net/)To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: prob with session start
Hi! Renze, good afternoon. oh i forgot attachments are not allowed to this group...so i am pasting here... login.html !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"htmlheadHEADTITLEIMAC/TITLE meta http-equiv="Expires" CONTENT="0" meta http-equiv="Cache-Control" CONTENT="no-cache" meta http-equiv="Pragma" CONTENT="no-cache"/HEADSCRIPT language="Javascript" function check(){ if (document.login.emp_id.value=='') { alert('Please enter your employee number'); document.issue.emp_id.focus(); return false; } else if(document.login.emp_pass.value=='') { alert("Please enter the password"); document.issue.emp_pass.focus(); return false; } else {document.login.method = "POST";document.login.action="http://10.145.2.23/authentication.php";document.login.submit(); return true; } }/script/head body text="arial" background="imacbg1.gif" font face="arial" center h1 WELCOME TO IMAC TOOL /h1/centercenterimg SRC="logo.gif" height=100 width=100/imgpreform name="login" bEmployee No:/b input type="text" size="10" name="emp_id" maxlength="10" value=""brbPassword :/b input type="password" size="10" name="emp_pass" maxlength="10" value=""br input type="button" Value="LOGIN" /form/pre/center/font/body/html authentication.php ?phpheader ("Cache-Control: no-cache, must-revalidate");header ("Pragma: no-cache"); // Connect to MySQL mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'imac' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = "SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = '$emp_pass'"; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { // A matching row was found - the user is authenticated. session_start(); session_register('$emp_id'); error_log ("emp_id: $emp_id", 0); error_log ("Lastname: $emp_pass", 0); $row = mysql_fetch_object($result); if ($row-user_type=='S'){ include('super.php'); }else if ($row-user_type=='O'){include('ordinary.php'); } } else { file://User does not exist or not authenticated.echo 'centerh1Authorization Required./h1/center';file://header( 'WWW-Authenticate: Basic realm="Private"' );file://header( 'HTTP/1.0 401 Unauthorized' );exit; } ? logout.php ?phpsession_start();session_unregister($emp_id);session_destroy();?!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"HTMLHEADTITLEThankyou /TITLE meta http-equiv="Expires" CONTENT="0" meta http-equiv="Cache-Control" CONTENT="no-cache" meta http-equiv="Pragma" CONTENT="no-cache" /HEAD BODY background="nightsky.gif" text="white" p centerh1THANKYOU FOR USING IMAC TOOL/h1/centerbrbr center h3Do you want to login again?/h3a href="login.html"clickhere/a /center /p/BODY/HTML Thanks in advance Regards -Balaji Original Message - From: Renze Munnik To: Balaji Ankem Sent: Monday, August 13, 2001 5:46 PM Subject: Re: [PHP] Re: prob with session start On Mon, Aug 13, 2001 at 05:45:27PM +0530, Balaji Ankem wrote: Hi,these are the pages... see u tomorrow.. thankyou.. -BalajiEh... I get the impression you forgot to attach something. Youannounce the files, but they didn't follow... :)-- * RzE:-- -- Renze Munnik-- DataLink BV E: [EMAIL PROTECTED]-- W: +31 23 5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 5516190 Stationsplein 82-- 2011 LM HAARLEM http://www.datalink.nl-- --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fw: [PHP] Re: prob with session start
Hi,Renze i tried u'r last solution first.But it is acting as same .no change. After that i tried u'r first solution i.e removing include and adding header("Location"); It is giving the following error message. Warning: Cannot add header information - headers already sent in c:\www\authentication.php on line 40 Thanks and regards -Balaji - Original Message - From: Renze Munnik To: Balaji Ankem Cc: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 2:26 PM Subject: Re: [PHP] Re: prob with session start I think I know what it is. The construction I mentioned to avoid thereloading used three pages to login: the login-page, the validationpage and then some page that produces output to the user.What you do, is include that output page in the validation page(authentication.php). You shouldn't do that. Instead of theinclude('super.php') you should use header("Location: super.php")and instead of include('ordinary.php') you should useheader("Location: ordinary.php"). If you includesuper.php/ordinary.php you still don't leave authentication.php.That means that one can still reload authentication.php. Then thebrowser asks for resubmitting the form. If you use header() insteadof include() you actually leave authentication.php and go to adifferent page. The user can ofcourse reload that page, but thatpage wasn't actually the result of a form-submital so the page willthen just be reloaded and no information will be resubmitted. Evenif one pushes Back from that page, he/she will not go back toauthentication.php but to login.html. And gone is your problem.I think this should be your solution...Oh... btw:in authentication.php: session_register('$emp_id');should be: session_register("emp_id");and in logout.php: session_unregister($emp_id);should be session_unregister("emp_id");-- * RzE:-- -- Renze Munnik-- DataLink BV E: [EMAIL PROTECTED]-- W: +31 23 5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 5516190 Stationsplein 82-- 2011 LM HAARLEM http://www.datalink.nl-- -- PHP General Mailing List (http://www.php.net/)To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] plz check the warning message
Hi! Renze, Thanks a lot for u'r help. I am in vacation up to now. Now i am trying with u'r solution. I am getting the following error. I am sending the file also. Warning: Cannot send session cache limiter - headers already sent in c:\www\authentication.php on line 34 File:authentication.php ?phpheader ("Cache-Control: no-cache, must-revalidate");header ("Pragma: no-cache"); error_log ("emp_id: $emp_id", 0); error_log ("Lastname: $emp_pass", 0); // Connect to MySQL mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'imac' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = "SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = '$emp_pass'"; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { // A matching row was found - the user is authenticated. session_start(); session_register('$emp_id'); $row = mysql_fetch_object($result); if ($row-user_type=='S'){ include('super.php'); }else if ($row-user_type=='O'){include('ordinary.php'); } } else { file://User does not exist or not authenticated.echo 'centerh1Authorization Required./h1/center';file://header( 'WWW-Authenticate: Basic realm="Private"' );file://header( 'HTTP/1.0 401 Unauthorized' );exit; } ? Thanks and regards -Balaji - Original Message - From: Renze Munnik To: Balaji Ankem Cc: [EMAIL PROTECTED] Sent: Friday, August 10, 2001 5:41 PM Subject: Re: [PHP] plz check the warning message On Fri, Aug 10, 2001 at 04:42:48PM +0530, Balaji Ankem wrote: Is there anyway to restrict the reposting?? Means after pressing logout button we shouldn't allow the user to go back or reposting the data again and getting session again.Okay... I've figured out two 'solutions'. But... I must say: They'renot pretty. Actually you can't prevent it. But:Option 1You can set a cookie after logging in. The authorization page shouldcheck for that cookie. It should not exist in order to login. Thelogin page (where one gives his username/password) should removethat cookie if it exists.This is, though, a _very_ ugly solution and using cookies forsecurity isn't realy the best thing to do. So actually I wouldn'tencourage you to use this.Option 2Another solution is to redirect to a different page. I created thefollowing example:=[ PHP code ]=// File: login.phpHTMLHEAD TITLELogin Test/TITLE/HEAD BODY FORM method="post" action="submit-login.php" INPUT type="text" name="firstname" INPUT type="text" name="lastname" BR INPUT type="submit" /FORM/BODY/HTML// File: submit-login.php? /* Here you should do things with the provided data... For the example I only write it to the log. */ error_log ("Firstname: $firstname", 0); error_log ("Lastname: $lastname", 0); /* Here's where you redirect */ header ("Location: logged-in.php");?// File: logged-in.php/* Whatever you want! */=[ end of code ]=After pushing the submit-button, the data will be submitted tosubmit-login.php. There you handle the login-procedure. After that,you automatically redirect to a different page (logged-in.php in myexample). That's you you show eg 'You are logged in now'. If youreload that page, nothing realy happens. If you push 'Back', you endup on login.php again.Uptil now this is the best option I've come up with.Hope it works for what you had in mind.-- * RzE:-- -- Renze Munnik-- DataLink BV E: [EMAIL PROTECTED]-- W: +31 23 5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 5516190 Stationsplein 82-- 2011 LM HAARLEM http://www.datalink.nl-- -- PHP General Mailing List (http://www.php.net/)To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this
[PHP] prob with session start
Hi! friend, I want to start session if authentication is succesfull means if he is a valid user. Then what i have to do Renze?? Thanks in advance. With warm regards -Balaji - Original Message - From: Renze Munnik To: Balaji Ankem Cc: [EMAIL PROTECTED] Sent: Monday, August 13, 2001 2:04 PM Subject: Re: [PHP] plz check the warning message On Mon, Aug 13, 2001 at 02:01:59PM +0530, Balaji Ankem wrote: Hi! Renze, Thanks a lot for u'r help. I am in vacation up to now. Now i am trying with u'r solution. I am getting the following error. I am sending the file also. Warning: Cannot send session cache limiter - headers already sent in c:\www\authentication.php on line 34 File:authentication.php ?php header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); error_log ("emp_id: $emp_id", 0); error_log ("Lastname: $emp_pass", 0); // Connect to MySQL mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'imac' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = "SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = '$emp_pass'"; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { // A matching row was found - the user is authenticated. session_start(); session_register('$emp_id'); $row = mysql_fetch_object($result); if ($row-user_type=='S') { include('super.php'); } else if ($row-user_type=='O') { include('ordinary.php'); } } else { file://User does not exist or not authenticated. echo 'centerh1Authorization Required./h1/center'; file://header( 'WWW-Authenticate: Basic realm="Private"' ); file://header( 'HTTP/1.0 401 Unauthorized' ); exit; } ?Well... You can't sent any headers after some output has alreadybeen sent. I didn't take a very good look at your code, but lookingat the warning you get and the position of session_start() in yourcode, I'd say you have to move the session_start() up. You can beststart your code with session_start() and then the rest of yourscript.-- * RzE:-- -- Renze Munnik-- DataLink BV E: [EMAIL PROTECTED]-- W: +31 23 5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 5516190 Stationsplein 82-- 2011 LM HAARLEM http://www.datalink.nl-- -- PHP General Mailing List (http://www.php.net/)To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]To contact the list administrators, e-mail: [EMAIL PROTECTED] --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] problem with session start
Hi! friend, i got the following error when i am goint to start a session. This is the file. and i got the following errors. Warning: open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in c:\www\login.php on line 2Warning: open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 login.php ?phpsession_start();session_register(emp_id);? htmlheadSCRIPT language="Javascript" function check(){ if (document.login.emp_id.value=='') { alert('Please enter your employee number'); document.issue.emp_id.focus(); return false; } else if(document.login.emp_pass.value=='') { alert("Please enter the password"); document.issue.emp_pass.focus(); return false; } else {document.login.method = "POST";document.login.action="http://10.145.2.23/authentication.php";document.login.submit(); return true; } }/script/head body text="arial" background="imacbg1.gif" font face="arial" center h1 WELCOME TO IMAC TOOL /h1/centercenterimg SRC="logo.gif" height=100 width=100/imgpreform name="login" bEmployee No:/b input type="text" size="10" name="emp_id" maxlength="10" value=""brbPassword :/b input type="password" size="10" name="emp_pass" maxlength="10" value=""br input type="button" Value="LOGIN" /form/pre/center/font/body/html --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] problem with session start
Hi Andrew, Thankyou now it is working well. I would like to close the session after clicking logout button. How to do? Thanks inadvance. Regards -Balaji - Original Message - From: Andrew Braund To: Balaji Ankem Sent: Friday, August 10, 2001 1:45 PM Subject: RE: [PHP] problem with session start You need tocreate a c:\tmp directory. --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] again session doubt
Hello! boss, It started session. But i didn't close the session. I tried to login again. But it is giving authorization required. It is not allowing for loggin in again because of session. What i have to do. Thanks and regards -Balu - Original Message - From: Yamin Prabudy To: Balaji Ankem Sent: Friday, August 10, 2001 12:38 PM Subject: Re: Help required on creating session say you have a form that input the username in the top of the file before the html just put the ? session_start(); session_register(username); ? that's goes the first page... in the next page you can do this ? session_start(); echo $username; ? you must have you username display there - Original Message - From: Balaji Ankem To: Yamin Prabudy Cc: [EMAIL PROTECTED] Sent: Friday, August 10, 2001 1:16 PM Subject: Help required on creating session Hi! friends, i also want this feature. Can u tell me how to start a session whenever the user logged in and how to end session after logout. where i have to give these function names... session_start();session_register(username); Thanks in advance. Regards -Balaji - Original Message - From: Yamin Prabudy To: [EMAIL PROTECTED] Sent: Friday, August 10, 2001 10:02 AM Subject: [PHP] HELP...session Hi there I need help about sessionsee i have a page (index.php) that used thissession_start();session_register(username);and i got input username after the submit button is click i move into a frame pages..then in the frame i define again session_start(); for each frame...i got two frame..i intended to parse the username into my frame...but got nothingi intended to parse the username all over the pages (in frame) until he/she log outcan anyone help me with itThanks in AdvanceYamin Prabudy --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]