[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]
Re: [PHP] Call to undefined function problem
if (!define(__FUNCTIONS__) ) must be: if (!defined(__FUNCTIONS__) ) Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Doug Farmer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 6:50 AM Subject: [PHP] Call to undefined function problem I'm doing the following: test.php - ?php require(functions.php); require(); // several other requires here setNoCacheHeaders(); // this is line 16 // other stuff here ? -- functions.php - ?php if (!define(__FUNCTIONS__) ) { define( __FUNCTIONS__, 1, 1 ); // a bunch of other defines here echo here 1br; function setNoCacheHeaders( ) { static $headersNotSet = TRUE; if ( $headersNotSet ) { header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);// Date in the past header(Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); // always modified header(Cache-Control: no-cache, must-revalidate); // HTTP/1.1 header(Pragma: no-cache); // HTTP/1.0 $headersNotSet = FALSE; } } echo here 2br; // a few more functions here } My output is here 1 here 2 Fatal error: Call to undefined function: setnocacheheaders() in $DOCUMENT_ROOT/test.php on line 16 Can someone explain? I found something similar in the archives but no answer was given. This exact code worked under php3. The only changes in the files were files ending in php3 were changed to end php. I also had 2 classes that I was using that had initializers in the variable declaration. I moved the initialization to constructors. Note that on some clients the request goes through w/o errors. This is intermittent but consistent on a per client basis. - doug -- 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 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] JavaScript MD5()
Hellorgh, all !!! Does anyone knows if there is a way to MD5-encode strings with JavaScript ? I use MD5() to encode passwords then insert them in my account database, and when a user logs in, i do MD5($password_provided_by_form) to compare it with the one stored in the DB. Ok, fine, I cannot see the users's passwords but when they log in, everyone can sniff it !!! That's why i'd like to encode passwords at client-side a Javascript MD5() function should be fine, but i think it doesn't exists and I can't use (and i don't know how to ;~p ) SSL, https: Someone's got any solution Thanx, (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr -- 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] IE and '404 not found' custom script
I use an HTML file like this : html head - title ... body img src=my_picture_of_a_404_peugeot.jpg !-- then, here comes the way i found to grow the file's size : 512+ bytes of invisible text... / / -- /body /html I think headers are not counted by the browser in the total size (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Enrique Vadillo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 2:56 AM Subject: [PHP] IE and '404 not found' custom script Hi, I'd like to execute a php script which does *not always* display HTML everytime a file is not found. IE requires that a custom errmsg be over 512 bytes in order to display it instead of the internal one, my ErrorDocument script will look for any 'not found' file somewhere else (in blob records in some database in this case), do other stuff and eventually display the file requested, never modifying the URL typed by the user. GIF Woes: The problem i have encountered is that sometimes the requested file is just a very small GIF 512 bytes and my script is anyhow discarded by IE while with Netscape it ALL works fine. I tried adding more than 512 bytes sending many long headers thru the PHP Header() function but it does not seem to work, i can't add different headers since my script displays sometimes GIFs and other binary data, not text. Question: how can i force IE display my ErrorDocument 404 php script in this case? has anyone encountered this problem before? thanks. Enrique- _ Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp -- 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 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] locking a mysQL row
Try to insert in your 'locked' field an Unix date instead of 'locked' . One field, two effects (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Justin French [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 3:48 AM Subject: [PHP] locking a mysQL row Hi all, I'm currrently developing a dynamic, user-added content site. The thing is, content can be added and edited my TWO people.. the original writer, and the editor. So, my problem is, if the editor/user makes an edit to content whilst the other is also attempting to do so, one of them will get overwritten. This isn't the end of the world, but it's a bit of a problem i'd like to clear up. So, my initial thought was to add a new column to the code locked with a time that the code can be re edited. 1. when the user requests to edit the content, the program first makes sure any locked time has expired. 2. he/she is given a time limit (say 10 minutes) to edit and re-submit, during which time the annother user cannot edit or change the content. 3. when the user submits the edited content, the locked timestamp is deleted, so that the content can be re-edited earlier than the 10 minutes. 4. if the user submits after the 10 minutes, they are rejected, since the content may have been edited by annother user. Does this seem like a good move? Can any one offer any firther tips or a smarter way to do this? Thanks Justin French -- 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 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] Weird PHP problem...Example code...
Ok, this code is used on the index page of on of my sites. It prints out a list of links from a database. I am using PHP sessions. When I open a new browser and go the site for the first time the HTML that is output by my code is not correct. This is only on SOME of the lines, but it is always on the SAME lines. After a reload or even going to another web site and back it works fine every time. I noticed that PHP is automatically adding a PHPSESSID to the links. I think this is causing the problem. PHP seems to be adding more than just that. Anyone seen this before? Anyone know how I can fix it? Thanks in advance for any help! WEIRD HTML START (first view of page in new browser window) a href='/viewstory.php?story=20PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 1.../abr a href='/viewstory.php?story=28PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 2.../abr a href='/viewstory.php?story=21PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 3.../abr a href='/viewstory.php?story=27PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 4.../abr WEIRD HTML END CORRECT HTML START (after the first page view I get this) a href='/viewstory.php?story=20' target='_self'Test 1.../abr a href='/viewstory.php?story=28' target='_self'Test 2.../abr a href='/viewstory.php?story=21' target='_self'Test 3.../abr a href='/viewstory.php?story=27' target='_self'Test 4.../abr CORRECT HTML END PHP CODE START while($row = mysql_fetch_assoc($result)) { echo a href='/viewstory.php?story=; echo $row[RECORD_ID]; echo ' target='_self'; if (strlen($row[HEADLINE]) 20) { echo substr($row[HEADLINE], 0, 20); echo '...'; } else { echo $row[HEADLINE]; } } echo '/a'; echo 'br'; } PHP CODE END -- Dana Holt / [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]
Re: [PHP] Problem regarding select boxes
Try something like script language=JavaScript if (inv_name.value=='mobile') { inv_imei.style.visibility=visible; . based on CSS and JS !!! but this is VERY fast written and may only work on IE, not NS . (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Balaji Ankem [EMAIL PROTECTED] To: Renze Munnik [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 9:05 AM Subject: [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 -- 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 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: JavaScript MD5()
Nicolas Costes wrote in 00fd01c13a94$e3329b80$0100a8c0@p2333:">news:00fd01c13a94$e3329b80$0100a8c0@p2333: Hellorgh, all !!! Does anyone knows if there is a way to MD5-encode strings with JavaScript ? The algorithm is described in RFC 1321. URL:http://www.ietf.org/rfc/rfc1321.txt I use MD5() to encode passwords then insert them in my account database, and when a user logs in, i do MD5($password_provided_by_form) to compare it with the one stored in the DB. Ok, fine, I cannot see the users's passwords but when they log in, everyone can sniff it !!! MD5 is a one way algorithm, which means that you won't be doing MD5 on the server. That's why i'd like to encode passwords at client-side a Javascript MD5() function should be fine, but i think it doesn't exists and I can't use (and i don't know how to ;~p ) SSL, https: Which won't help you in any way, in effect you'll just be sending a plaintext password that's a lot longer. Someone's got any solution A secure connection is your only real solution here. -- Arve «The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.» - Winston Churchill http://www.bersvendsen.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]
[PHP] Re: Problem regarding select boxes
IT's something like that friend, html head title New Document /title /head body onload=hidelb(); script language=JavaScript !-- function hidelb() { o = document.all[lb1]; if (test.phone.selectedIndex==1) o.style.display = none; else o.style.display = ; } //-- /script form name=test select name=phone id=phone onchange=hidelb()optionMobile/optionoptionTest/option/select select name=lb1 id=lb1option1/optionoption2/option/select /form /body /html Balaji Ankem [EMAIL PROTECTED] wrote in message 006d01c13a90$193219e0$[EMAIL PROTECTED]">news:006d01c13a90$193219e0$[EMAIL PROTECTED]... 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 -- 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: NT?
it works fine under 2000 Pro +IIS5 Jeremy Morano [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Sorry to bother everyone. I was just wondering if php runs on NT? -- 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: JavaScript MD5()
thanx... yeah, I forgot that the problem is not what the sniffer sees, the problem is : how can i do to prevent him from seeing anything Is SSL difficult to use in PHP ??? Can someone shortly explain it to me ??? (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Arve Bersvendsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 9:54 AM Subject: [PHP] Re: JavaScript MD5() Nicolas Costes wrote in 00fd01c13a94$e3329b80$0100a8c0@p2333:">news:00fd01c13a94$e3329b80$0100a8c0@p2333: Hellorgh, all !!! Does anyone knows if there is a way to MD5-encode strings with JavaScript ? The algorithm is described in RFC 1321. URL:http://www.ietf.org/rfc/rfc1321.txt I use MD5() to encode passwords then insert them in my account database, and when a user logs in, i do MD5($password_provided_by_form) to compare it with the one stored in the DB. Ok, fine, I cannot see the users's passwords but when they log in, everyone can sniff it !!! MD5 is a one way algorithm, which means that you won't be doing MD5 on the server. That's why i'd like to encode passwords at client-side a Javascript MD5() function should be fine, but i think it doesn't exists and I can't use (and i don't know how to ;~p ) SSL, https: Which won't help you in any way, in effect you'll just be sending a plaintext password that's a lot longer. Someone's got any solution A secure connection is your only real solution here. -- Arve «The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.» - Winston Churchill http://www.bersvendsen.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] -- 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]
Re: [PHP] Problem regarding select boxes
On Tue, 11 Sep 2001 17:35, Balaji Ankem wrote: 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 and third input boxes. Otherwise i want to hide those two options. SNIP script and 97 footers I think you only just posted this an hour ago - and there has been at least one answer since. How about waiting a little while for a response. Not everybody is just sitting there ready and waiting to solve your problem. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Mary had a little RAM -- only about a MEG or so. -- 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: Weird PHP problem...Example code...
Yes, I see this problem before, There was a setting that you turn on/off in the php.ini file..forgot which one.. maybe these: ; use transient sid support if enabled by compiling with --enable-trans-sid. session.use_trans_sid = 1 url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry anyway, as a work around, you can have a redirector to this page, or this page can redirect to itself (to simulate reload) ? // very start of page if (!isset($reload)) { Header(Location: $PHP_SELF?reload=y); exit(); } // continue script here... ? Dana Holt [EMAIL PROTECTED] wrote in message 01c13a93$edf933e0$6400a8c0@MORPHEUS">news:01c13a93$edf933e0$6400a8c0@MORPHEUS... Ok, this code is used on the index page of on of my sites. It prints out a list of links from a database. I am using PHP sessions. When I open a new browser and go the site for the first time the HTML that is output by my code is not correct. This is only on SOME of the lines, but it is always on the SAME lines. After a reload or even going to another web site and back it works fine every time. I noticed that PHP is automatically adding a PHPSESSID to the links. I think this is causing the problem. PHP seems to be adding more than just that. Anyone seen this before? Anyone know how I can fix it? Thanks in advance for any help! WEIRD HTML START (first view of page in new browser window) a href='/viewstory.php?story=20PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 1.../abr a href='/viewstory.php?story=28PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 2.../abr a href='/viewstory.php?story=21PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 3.../abr a href='/viewstory.php?story=27PHPSESSID=61bf547309e9bce7c1e333fb1958cd89' target='_self'tr Test 4.../abr WEIRD HTML END CORRECT HTML START (after the first page view I get this) a href='/viewstory.php?story=20' target='_self'Test 1.../abr a href='/viewstory.php?story=28' target='_self'Test 2.../abr a href='/viewstory.php?story=21' target='_self'Test 3.../abr a href='/viewstory.php?story=27' target='_self'Test 4.../abr CORRECT HTML END PHP CODE START while($row = mysql_fetch_assoc($result)) { echo a href='/viewstory.php?story=; echo $row[RECORD_ID]; echo ' target='_self'; if (strlen($row[HEADLINE]) 20) { echo substr($row[HEADLINE], 0, 20); echo '...'; } else { echo $row[HEADLINE]; } } echo '/a'; echo 'br'; } PHP CODE END -- Dana Holt / [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]
[PHP] Re: JavaScript MD5()
Arve Bersvendsen wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: The algorithm is described in RFC 1321. URL:http://www.ietf.org/rfc/rfc1321.txt BTW: I found a Javascript-implementation of MD5. URL:http://pajhome.org.uk/crypt/md5/md5src.html -- Arve «The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.» - Winston Churchill http://www.bersvendsen.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]
[PHP] Executing graphical application (linux)
Is it possible to execute a graphical application using exec() or one of the related commands? I have tried running it directly and from an external script but neither work. Thanks, -- Chris Lambert [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]
Re: [PHP] Executing graphical application (linux)
have you tried with specifiing th e display to use something like EXEC (my_app --display 0:0) well this may be possible, everything is possible with a keyboard and many imagination ;~p (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Chris Lambert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 10:33 AM Subject: [PHP] Executing graphical application (linux) Is it possible to execute a graphical application using exec() or one of the related commands? I have tried running it directly and from an external script but neither work. Thanks, -- Chris Lambert [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] -- 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] Wheres my cookie?
Hi All, I have a web application that uses .php and .jsp files, I use php sessions and normal cookies and I can get to these cookies from php no problem. The trouble starts when I try to get the cookie values from the .jsp files. The only cookie that is saved in the browser is the normal cookie, but this is also the only cookie that the .jsp (and javascript) files cannot see. I can get the PHPSESSID and various other cookies that are not saved in browser, but not the one that I want. Any idea what i'm missing? TIA, Randal. -- Randal Pitt Web/Remedy Developer Activis Ltd [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]
Re: [PHP] Executing graphical application (linux)
[EMAIL PROTECTED] (Nayco) wrote in 017601c13a9d$f3614840$0100a8c0@p2333:">news:017601c13a9d$f3614840$0100a8c0@p2333: have you tried with specifiing th e display to use something like EXEC (my_app --display 0:0) well this may be possible, everything is possible with a keyboard and many imagination ;~p Yes, I have set the display (although from a shell script rather than using parameters. Thanks, -- Chrisa Lambert [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]
[PHP] stripslashes strips too much
hi all, i am experiencing a bit of a problem with stripslashes stripping too much data. For example: it will strip abc's - abc has anyone else experienced this? is there a solution? many thanks in advance, christian -- 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] php apache server problem
Hello php-general, Ive got a virtual hosted site at this site Ive got some php files which are taking images from database but tey stopped operating since a overloading of the server the code of the taking pictores are here. Is there anyone who has an idea. codes are like that ? $DB = @MYSQL_CONNECT( $dbserver, $user, $pass) or die(dbserver not ready); @mysql_select_db( $dbname) or die(Veri tabany seçilemedi); $Query=mysql_query(select logo from logotable where id='$id') or die (theres no such a thing); while ($Result = mysql_fetch_array ($Query)) { $logo=$Result[logo]; header(Content-type: image/gif); echo $logo; } -- Best regards, itü 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]
Re: [PHP] Executing graphical application (linux)
well, I don't know if that's possible . you're writting a local admin application with PHP (I mean, this script is used on the local machine, not through the network ???) I think there should have a way to get this to work (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Chris Lambert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 10:50 AM Subject: Re: [PHP] Executing graphical application (linux) [EMAIL PROTECTED] (Nayco) wrote in 017601c13a9d$f3614840$0100a8c0@p2333:">news:017601c13a9d$f3614840$0100a8c0@p2333: have you tried with specifiing th e display to use something like EXEC (my_app --display 0:0) well this may be possible, everything is possible with a keyboard and many imagination ;~p Yes, I have set the display (although from a shell script rather than using parameters. Thanks, -- Chrisa Lambert [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] -- 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] stripslashes strips too much
I 've got the same problem on many scripts using mysql and forms ... it's hard to handle the ' character.. i'd like some advices too !!! (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Christian Haines [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 9:53 AM Subject: [PHP] stripslashes strips too much hi all, i am experiencing a bit of a problem with stripslashes stripping too much data. For example: it will strip abc's - abc has anyone else experienced this? is there a solution? many thanks in advance, christian -- 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 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: JavaScript MD5()
Yes, there is Md5() for javascript ;) http://pajhome.org.uk/crypt/md5/ I tried it and it works just fine! :) Nicolas Costes [EMAIL PROTECTED] wrote in message 00fd01c13a94$e3329b80$0100a8c0@p2333">news:00fd01c13a94$e3329b80$0100a8c0@p2333... Hellorgh, all !!! Does anyone knows if there is a way to MD5-encode strings with JavaScript ? I use MD5() to encode passwords then insert them in my account database, and when a user logs in, i do MD5($password_provided_by_form) to compare it with the one stored in the DB. Ok, fine, I cannot see the users's passwords but when they log in, everyone can sniff it !!! That's why i'd like to encode passwords at client-side a Javascript MD5() function should be fine, but i think it doesn't exists and I can't use (and i don't know how to ;~p ) SSL, https: Someone's got any solution Thanx, (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr -- 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] variables
Hello, Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) I need it for Usernames and passwords and when the pages get cached the usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze. Thanks, Bart -- 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: Sessions Getting Broken
Maybe it's getting timed out? Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a database update system and I regonize users with sessions. Sometimes sessions just broke with no sane (for me at least) reason. Any ideas what may cause this, it's pretty anoying if you have updated 20 fields, try to submit the form and then you get kicked out of the system!?! Otherwise my sessions work great. :) Niklas -- 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] variables
Maybe using cookies ??? (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 11:10 AM Subject: [PHP] variables Hello, Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) I need it for Usernames and passwords and when the pages get cached the usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze. Thanks, Bart -- 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 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: More thoughts about PHP: Taglibs
Yep this is not bad! html Hello, showusername/. Your last login was showlastlogin/.p /html and now using PHP's short tags, you can make it even prettier: html Hello, ?=showusername()?. Your last login was ?=showlastlogin()?.p /html Right? Dr. Evil [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It seems to me that one of the problems with PHP is that you have to include code in your HTML pages. Even with the cleanest design, you end up with HTML that looks like this: html Hello, ?php showusername(); ?. Your last login was ?php showlastlogin(); ?.p /html This is ok, but it seems to me that java taglibs provide a more elegant way to do the same things: html Hello, showusername/. Your last login was showlastlogin/.p /html This lets the backend stuff be completely separated from the html design part of things. What do people think of this? I'm just now learning JSP so I'm thinking about the differences between PHP and JSP. In general, both are powerful ways of creating dynamic websites, but they have different characteristics and are better for different things. I'm learning java but I will continue to use both, depending on the task. -- 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: More thoughts about PHP: Taglibs
maybe one day, PHP will implement user defined tags this could be an idea, if this is prooved to be useful. (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr ORIGINAL MESSAGE- Yep this is not bad! html Hello, showusername/. Your last login was showlastlogin/.p /html and now using PHP's short tags, you can make it even prettier: html Hello, ?=showusername()?. Your last login was ?=showlastlogin()?.p /html Right? Dr. Evil [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It seems to me that one of the problems with PHP is that you have to include code in your HTML pages. Even with the cleanest design, you end up with HTML that looks like this: html Hello, ?php showusername(); ?. Your last login was ?php showlastlogin(); ?.p /html This is ok, but it seems to me that java taglibs provide a more elegant way to do the same things: html Hello, showusername/. Your last login was showlastlogin/.p /html This lets the backend stuff be completely separated from the html design part of things. What do people think of this? I'm just now learning JSP so I'm thinking about the differences between PHP and JSP. In general, both are powerful ways of creating dynamic websites, but they have different characteristics and are better for different things. I'm learning java but I will continue to use both, depending on the task. -- 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: variables
Sure you can! consider this simple example: html body a href=javascript:setvars('var1value', 'var2value')click here to go to next page/a script language=JavaScript !-- function setvars(var1, var2) { df = document.dataform; df.var1.value = var1; df.var2.value = var2; df.submit(); } //-- /script form name=dataform action=page2.php method=post input type='hidden' name='var1' input type='hidden' name='var2' /form /body /html it's using hidden forms... you can also use sessions... [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) I need it for Usernames and passwords and when the pages get cached the usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze. Thanks, Bart -- 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: regexp (?:
Andrew Perevodchik [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why doesn't this simple example work? ereg (aaa(?:bbb|ccc)aaa, $string); It causes an error. However ?: command is documented in a manual of my version of PHP4. It would probably be useful if you would also tell us WHAT you want to accomplish, so we won't have to guess about your intentions... / Franklin -- 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] suming up in MySQL
On Tue, 11 Sep 2001 11:51:05 +0200, you wrote: How to sum up all the values from a MySQL row ex. id - price 1 1000 2 300 3 200 How to sum up price row ? SELECT SUM(price) unsurprisingly enough... djo -- 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] suming up in MySQL
TM id - price TM 1 1000 TM 2 300 TM 3 200 TM How to sum up price row ? This can be done by MySQL rather than PHP. mysql_query ("SELECT SUM (price) FROM table"); -- Andrew Perevodchik [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]
Re: [PHP] variables
On Tue, 11 Sep 2001 11:10:20 +0200, you wrote: Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) method=post forms cookies I need it for Usernames and passwords and when the pages get cached the usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze. You shouldn't be sending passwords back out as plaintext. If you need to store that kind of state information at the client end (I doubt you do) you should hash it first. Also, you should read : http://www.php.net/manual/en/ref.session.php djo -- 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: variables
Thanks for the fast answer1 Yes I thought of that, but I also got the problem using the $vars in frames: I'm using a authenticationform for users to get to a frameset. Now I'm transfering the usernames/pwds in the uri-string to all the framepages. In all framepages I check for $PHP_AUTH_USER to be set and when so I query the db again and. It seems that the vars aren't global. How can I globalize the vars so they are usable in other files. Are sessions teh only option? Thanks in advance, Bart -Oorspronkelijk bericht- Van: _lallous [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 11 september 2001 12:23 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Re: variables Sure you can! consider this simple example: html body a href=javascript:setvars('var1value', 'var2value')click here to go to next page/a script language=JavaScript !-- function setvars(var1, var2) { df = document.dataform; df.var1.value = var1; df.var2.value = var2; df.submit(); } //-- /script form name=dataform action=page2.php method=post input type='hidden' name='var1' input type='hidden' name='var2' /form /body /html it's using hidden forms... you can also use sessions... [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) I need it for Usernames and passwords and when the pages get cached the usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze. Thanks, Bart -- 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 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: Sessions Getting Broken
Hmm.. How do I know how fast they timeout? And it seems that all of my users drop at the same time, not sure about it thou. session.cache_expire is set to 180. session.cookie_lifetime is 0. Maybe those do tell you something and you tell me more! :) Niklas -Original Message- From: _lallous [mailto:[EMAIL PROTECTED]] Sent: 11. syyskuuta 2001 13:09 To: [EMAIL PROTECTED] Subject: [PHP] Re: Sessions Getting Broken Maybe it's getting timed out? Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a database update system and I regonize users with sessions. Sometimes sessions just broke with no sane (for me at least) reason. Any ideas what may cause this, it's pretty anoying if you have updated 20 fields, try to submit the form and then you get kicked out of the system!?! Otherwise my sessions work great. :) Niklas -- 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 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: variables
In that case you'll have to use session_variables or cookies. mostly session_variables are better especially for authentication and login/logout systems... [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks for the fast answer1 Yes I thought of that, but I also got the problem using the $vars in frames: I'm using a authenticationform for users to get to a frameset. Now I'm transfering the usernames/pwds in the uri-string to all the framepages. In all framepages I check for $PHP_AUTH_USER to be set and when so I query the db again and. It seems that the vars aren't global. How can I globalize the vars so they are usable in other files. Are sessions teh only option? Thanks in advance, Bart -Oorspronkelijk bericht- Van: _lallous [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 11 september 2001 12:23 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Re: variables Sure you can! consider this simple example: html body a href=javascript:setvars('var1value', 'var2value')click here to go to next page/a script language=JavaScript !-- function setvars(var1, var2) { df = document.dataform; df.var1.value = var1; df.var2.value = var2; df.submit(); } //-- /script form name=dataform action=page2.php method=post input type='hidden' name='var1' input type='hidden' name='var2' /form /body /html it's using hidden forms... you can also use sessions... [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) I need it for Usernames and passwords and when the pages get cached the usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze. Thanks, Bart -- 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 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: Sessions Getting Broken
Can't tell like that No more ideasmaybe somecode would help?! Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hmm.. How do I know how fast they timeout? And it seems that all of my users drop at the same time, not sure about it thou. session.cache_expire is set to 180. session.cookie_lifetime is 0. Maybe those do tell you something and you tell me more! :) Niklas -Original Message- From: _lallous [mailto:[EMAIL PROTECTED]] Sent: 11. syyskuuta 2001 13:09 To: [EMAIL PROTECTED] Subject: [PHP] Re: Sessions Getting Broken Maybe it's getting timed out? Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a database update system and I regonize users with sessions. Sometimes sessions just broke with no sane (for me at least) reason. Any ideas what may cause this, it's pretty anoying if you have updated 20 fields, try to submit the form and then you get kicked out of the system!?! Otherwise my sessions work great. :) Niklas -- 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 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: variables
Thanks, I'll implement sessions... :) regards Bart -Oorspronkelijk bericht- Van: _lallous [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 11 september 2001 13:30 Aan: [EMAIL PROTECTED] Onderwerp: Re: [PHP] Re: variables In that case you'll have to use session_variables or cookies. mostly session_variables are better especially for authentication and login/logout systems... [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks for the fast answer1 Yes I thought of that, but I also got the problem using the $vars in frames: I'm using a authenticationform for users to get to a frameset. Now I'm transfering the usernames/pwds in the uri-string to all the framepages. In all framepages I check for $PHP_AUTH_USER to be set and when so I query the db again and. It seems that the vars aren't global. How can I globalize the vars so they are usable in other files. Are sessions teh only option? Thanks in advance, Bart -Oorspronkelijk bericht- Van: _lallous [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 11 september 2001 12:23 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Re: variables Sure you can! consider this simple example: html body a href=javascript:setvars('var1value', 'var2value')click here to go to next page/a script language=JavaScript !-- function setvars(var1, var2) { df = document.dataform; df.var1.value = var1; df.var2.value = var2; df.submit(); } //-- /script form name=dataform action=page2.php method=post input type='hidden' name='var1' input type='hidden' name='var2' /form /body /html it's using hidden forms... you can also use sessions... [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) I need it for Usernames and passwords and when the pages get cached the usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze. Thanks, Bart -- 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 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 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: Sessions Getting Broken
session_start(); if (!session_is_registered(Session)) { toStart(2); exit; }; $Session = $GLOBALS[Session]; This is what I do on every page. I don't think it's timeout, since the session might get broken just after 5 minutes. function toStart() is used to move user to the login page with an error code. Niklas -Original Message- From: _lallous [mailto:[EMAIL PROTECTED]] Sent: 11. syyskuuta 2001 14:35 To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Sessions Getting Broken Can't tell like that No more ideasmaybe somecode would help?! Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hmm.. How do I know how fast they timeout? And it seems that all of my users drop at the same time, not sure about it thou. session.cache_expire is set to 180. session.cookie_lifetime is 0. Maybe those do tell you something and you tell me more! :) Niklas -Original Message- From: _lallous [mailto:[EMAIL PROTECTED]] Sent: 11. syyskuuta 2001 13:09 To: [EMAIL PROTECTED] Subject: [PHP] Re: Sessions Getting Broken Maybe it's getting timed out? Niklas lampén [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a database update system and I regonize users with sessions. Sometimes sessions just broke with no sane (for me at least) reason. Any ideas what may cause this, it's pretty anoying if you have updated 20 fields, try to submit the form and then you get kicked out of the system!?! Otherwise my sessions work great. :) Niklas -- 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 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 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: regexp (?:
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Andrew Perevodchik) wrote: ereg (aaa(?:bbb|ccc)aaa, $string); It causes an error. However ?: command is documented in a manual of my version of PHP4. AFAIK, that is only documented in the preg_* chapter, and only applies to the preg_* functions. (The ereg_* functions use POSIX syntax, not PCRE). -- CC -- 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] Apache redirection by PHP
Look in the Apache manual at the section on mod_rewrite. - Tim On Tue, 2001-09-11 at 05:58, Andrew Perevodchik wrote: I have the DNS alias on my server for * (which means any name). So that any requests for http://anyname.my.host are recieved by one virtual server. I need to make apache return /anyname/files/example.txt rather than /files/example.txt (which is actually requested). anyname depends on the user's request. I have tried to catch the requested name of server, and add it to $DOCUMENT_ROOT variable. It changed as I expected it to, but still /files/example.txt is returned. I've also tried to use setenv() -- the same result. Is there any way to do this kind of trick? -- Andrew Perevodchik [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] -- 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] More thoughts about PHP: Taglibs
A good template library (and there's quite a few out there) will take care of this issue. You can have nearly pure HTML files and pure PHP files and maintenance and readability of your projects is much improved. - Tim http://www.phptemplates.org On Tue, 2001-09-11 at 01:04, Dr. Evil wrote: It seems to me that one of the problems with PHP is that you have to include code in your HTML pages. Even with the cleanest design, you end up with HTML that looks like this: ... -- 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] preg_replace is modifying the type of replacement parameter !!
Hi guys, When I use preg_replace with an array of integer as the replacement parameter, this function modifies the type of each array element to string. I don't understand why it alters the content of the array while this variable is not pass by reference (True or not ??). I have just upgraded to PHP 4.0.6 and it I don't think it was the case in PHP 4.0.4 (the version I was using before, without this problem). Here is a short example that demonstrate my problem. ?php $ary_pattern = array(@One@); $ary_replace = array(1); $string_before = One example; echo gettype($ary_replace[0]); // This line outputs 'integer' $string_after = preg_replace($ary_pattern, $ary_replace, $string_before); echo br$string_afterbr; echo gettype($ary_replace[0]); // This line outputs 'string' ? Is this a bug from preg_replace or am I doing wrong somewhere? Any help would be appreciated. Regards. Nicolas Guilhot -- 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] MySQL query help
On Mon, Sep 10, 2001 at 03:59:36PM -0500, Sheridan Saint-Michel wrote: Well, I played with this a little more and it seems to be acting oddly when you first call this select unless you set the variable first. So if the below doesn't work try actually doing this $query=set @count=NULL; select tableName.*,if(@count,@count:=@count+1,@count:=1) as inc, from tableName; (I also realized that simply having @count as the test value should work as it should default to NULL) If I don't set it, it just returns 1 on every row. Anyone know why it is doing this? (I am Running MySQL 3.23.36) Thank you very much for your help. I tried this (well, from the command line, but I'm sure from within PHP it'll work just fine, too) and it does just what I want! I looked in my MySQL book and I found the information on the if() operator/function. However, there was no mention in the text about using variables with the @ prefix... Oops, here it is in the online manual that installed with mysql 3.23.36... I should have looked there first. Thanks for your help! -Michael -- No, my friend, the way to have good and safe government, is not to trust it all to one, but to divide it among the many, distributing to every one exactly the functions he is competent to. It is by dividing and subdividing these republics from the national one down through all its subordinations, until it ends in the administration of every man's farm by himself; by placing under every one what his own eye may superintend, that all will be done for the best. -- Thomas Jefferson, to Joseph Cabell, 1816 -- 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] SSL and PHP = problems?
I have a webpage that uses php4 and a SSL connection for some sensitive information like credit card number and such, it's a registration process. When MacOS users access the page it all goes well and no problems at all. But... when PC/Windows users access the page they get some problems and it shows every now and then so it's hard to know what causes it. I have a screenshot of the error that accure that causes them to do the registrationprocess again and it's a bit annoying: http://www.programmering.nu/felmeddelande.gif Do you think this is because of bad PHP-programming or is it because of the SSL, or do you have any other sugestions? I find it hard to beleve that it is because of the programming because before the SSL-connection when I only have a regular HTTP-connection there were never any problems, and it works fine with MacOS users. Please help! ;) Thanks. /Magnus Hammar -- -- 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] Anagram Solution in PHP
On Mon, 10 Sep 2001 01:25:36 -0700, you wrote: So let's say the word 'acronym' A + C + R + 0 + N + Y + M 26 + 24 + 9 + 12 + 13 + 2 + 14 = 100 My thoughts were to download a list of words in the dictionary, then read the file and somehow replace each letter by its number, then add each letter for each word and see which words would equal to 100. So I am emailing this list for any suggestions or examples of code that I can use to accomplish this. Any help? function total ($word) { $total = 0; $word = strtoupper($word); for ($i=0; $istrlen($word); $i++) { $total+=26-(ord($word[$i])-65); } return($total); } echo total('acronym'); djo -- 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] preg_replace is modifying the type of replacement parameter !!
Hmmm, RegEx work on strings, so the engine needs strings. Because of that your integers are converted to strings, if you want to give their life back make foreach ($arr as $k=$v){ $arr[$k]+=0; } Now all are integers. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Nicolas Guilhot [EMAIL PROTECTED] To: Php General MailingList [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 3:24 PM Subject: [PHP] preg_replace is modifying the type of replacement parameter !! Hi guys, When I use preg_replace with an array of integer as the replacement parameter, this function modifies the type of each array element to string. I don't understand why it alters the content of the array while this variable is not pass by reference (True or not ??). I have just upgraded to PHP 4.0.6 and it I don't think it was the case in PHP 4.0.4 (the version I was using before, without this problem). Here is a short example that demonstrate my problem. ?php $ary_pattern = array(@One@); $ary_replace = array(1); $string_before = One example; echo gettype($ary_replace[0]); // This line outputs 'integer' $string_after = preg_replace($ary_pattern, $ary_replace, $string_before); echo br$string_afterbr; echo gettype($ary_replace[0]); // This line outputs 'string' ? Is this a bug from preg_replace or am I doing wrong somewhere? Any help would be appreciated. Regards. Nicolas Guilhot -- 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 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 ?
is there a way to tell if an insert failed while a in a loop. I tried this: $query = my query; if (!$query) { logic here } but this is not working... is this even possible? thanks! Clint -- 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] a bug???
hi, i'm recently observing a strange behaviour of php when using a combination of ob_start() and ignore_user_abort() in the same page, php hangs (after the script is executed) and is unable to create/write to /destroy sessions!! i'm observing this on my win98 machine with apache 1.20 and php 4.06 as .exe; if i remove one of the above functions everything returns to normal... everything works fine on my linux machine; has anybody experienced something similar? regards; Hassan El Forkani http://www.warmafrica.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]
Re: [PHP] how to ?
Look for mysql_affected_rows() docs. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Clint Tredway [EMAIL PROTECTED] To: Php General MailingList [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 3:40 PM Subject: [PHP] how to ? is there a way to tell if an insert failed while a in a loop. I tried this: $query = my query; if (!$query) { logic here } but this is not working... is this even possible? thanks! Clint -- 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 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] how to ?
On Tue, 11 Sep 2001 08:40:05 -0400, you wrote: is there a way to tell if an insert failed while a in a loop. I tried this: $query = my query; if (!$query) { logic here } but this is not working... is this even possible? By query, are you talking about SQL? I'm assuming you're trying to do run a MySQL INSERT statement. if (mysql_query(INSERT INTO [...], $connection)==0) { /* failure */ } Works for me, but is equivalent to what you appear to be doing. Can you post a small piece of code showing what isn't working? djo -- 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 ?
$ok = mysql_query(INSERT INTO table(field) VALUE('asdf')); if (!$ok) { echo error!; } else { echo good!; } Clint Tredway [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... is there a way to tell if an insert failed while a in a loop. I tried this: $query = my query; if (!$query) { logic here } but this is not working... is this even possible? thanks! Clint -- 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] Anagram Solution in PHP
maybe you forgot something like: . $letter=26-(ord($word[$i])-65);// excellent !!! if (($letter1)||($letter26)) $letter=0; $total+=$letter; (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: David Otton [EMAIL PROTECTED] To: Ralph Guzman [EMAIL PROTECTED] Cc: PHP General Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 2:32 PM Subject: Re: [PHP] Anagram Solution in PHP On Mon, 10 Sep 2001 01:25:36 -0700, you wrote: So let's say the word 'acronym' A + C + R + 0 + N + Y + M 26 + 24 + 9 + 12 + 13 + 2 + 14 = 100 My thoughts were to download a list of words in the dictionary, then read the file and somehow replace each letter by its number, then add each letter for each word and see which words would equal to 100. So I am emailing this list for any suggestions or examples of code that I can use to accomplish this. Any help? function total ($word) { $total = 0; $word = strtoupper($word); for ($i=0; $istrlen($word); $i++) { $total+=26-(ord($word[$i])-65); } return($total); } echo total('acronym'); djo -- 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 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] how to ?
thanks for the help! I am using MySQL. -- Original Message -- From: Andrey Hristov [EMAIL PROTECTED] Date: Tue, 11 Sep 2001 15:44:08 +0300 Look for mysql_affected_rows() docs. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Clint Tredway [EMAIL PROTECTED] To: Php General MailingList [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 3:40 PM Subject: [PHP] how to ? is there a way to tell if an insert failed while a in a loop. I tried this: $query = my query; if (!$query) { logic here } but this is not working... is this even possible? thanks! Clint -- 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 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 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] preg_replace is modifying the type of replacement parameter !!
I understand that RegEx works on strings, but I don't understand why this function modifies the replacement parameter as it is not pass by-reference. Nicolas -Message d'origine- De : Andrey Hristov [mailto:[EMAIL PROTECTED]] Envoyé : mardi 11 septembre 2001 14:34 À : [EMAIL PROTECTED] Objet : Re: [PHP] preg_replace is modifying the type of replacement parameter !! Hmmm, RegEx work on strings, so the engine needs strings. Because of that your integers are converted to strings, if you want to give their life back make foreach ($arr as $k=$v){ $arr[$k]+=0; } Now all are integers. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Nicolas Guilhot [EMAIL PROTECTED] To: Php General MailingList [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 3:24 PM Subject: [PHP] preg_replace is modifying the type of replacement parameter !! Hi guys, When I use preg_replace with an array of integer as the replacement parameter, this function modifies the type of each array element to string. I don't understand why it alters the content of the array while this variable is not pass by reference (True or not ??). I have just upgraded to PHP 4.0.6 and it I don't think it was the case in PHP 4.0.4 (the version I was using before, without this problem). Here is a short example that demonstrate my problem. ?php $ary_pattern = array(@One@); $ary_replace = array(1); $string_before = One example; echo gettype($ary_replace[0]); // This line outputs 'integer' $string_after = preg_replace($ary_pattern, $ary_replace, $string_before); echo br$string_afterbr; echo gettype($ary_replace[0]); // This line outputs 'string' ? Is this a bug from preg_replace or am I doing wrong somewhere? Any help would be appreciated. Regards. Nicolas Guilhot -- 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 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 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] World Trade Centre Hit By terrorists, also pentagon
[PHP] Re: World Trade Centre Hit By terrorists, also pentagon
what is it for a f.. day america? from germany realex Lewi Hirvela [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[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]
Re: [PHP] World Trade Centre Hit By terrorists, also pentagon
Yeah not really a PHP topic but a very serious one! I can't believe this! Two planes with the WTC, one into each tower. One of the towers have now collapsed as well. A helicopter crashed into the Pentagon with unconfirmed reports of a third hijacked plane also crashing into the Pentagon. A plane circled over the white house then flew away, the white house has been evacuated. All domestic flights are on hold with military aircraft only allowed in the aircurrent flights will receive a military escort... Sad news indeed. -- 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_destroy
I have the code: ?include(con.php); session_start(); require_once(func1.php); if (lExistUser($cusr, $cpass)==false) { if (session_id() ) {session_destroy();} } When the page loads the first time I receive error: Warning: Session object destruction failed in main.php on line 9 but when I make Refresh of page, there is no error !! Can someone any ideas ? Thanks Rosen -- 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]
Re: [PHP] World Trade Centre Hit By terrorists, also pentagon
? This is not PHP, yeah, but important enough ... Don't you fear a GLOBAL $war; ??? It smells bad . the ones who did that are ugly Mo**rs, but very strong how could they do that ??? ?back to php (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 4:08 PM Subject: Re: [PHP] World Trade Centre Hit By terrorists, also pentagon Yeah not really a PHP topic but a very serious one! I can't believe this! Two planes with the WTC, one into each tower. One of the towers have now collapsed as well. A helicopter crashed into the Pentagon with unconfirmed reports of a third hijacked plane also crashing into the Pentagon. A plane circled over the white house then flew away, the white house has been evacuated. All domestic flights are on hold with military aircraft only allowed in the aircurrent flights will receive a military escort... Sad news indeed. -- 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 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] World Trade Centre Hit By terrorists, also pentagon
We need the receive the help from Got, I believe He is the only one who can help us on this situation Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 nayco nayco@netcouTo: Jeff Lewis [EMAIL PROTECTED], [EMAIL PROTECTED] rrier.com cc: Subject: Re: [PHP] World Trade Centre Hit By terrorists, also pentagon 11/09/2001 08:54 ? This is not PHP, yeah, but important enough ... Don't you fear a GLOBAL $war; ??? It smells bad . the ones who did that are ugly Mo**rs, but very strong how could they do that ??? ?back to php (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 4:08 PM Subject: Re: [PHP] World Trade Centre Hit By terrorists, also pentagon Yeah not really a PHP topic but a very serious one! I can't believe this! Two planes with the WTC, one into each tower. One of the towers have now collapsed as well. A helicopter crashed into the Pentagon with unconfirmed reports of a third hijacked plane also crashing into the Pentagon. A plane circled over the white house then flew away, the white house has been evacuated. All domestic flights are on hold with military aircraft only allowed in the aircurrent flights will receive a military escort... Sad news indeed. -- 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 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 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: More thoughts about PHP: Taglibs
Perhaps you should just use cold fusion then, if you're that hot and heavy into tag-based languages. tagservlet.com has a Java/CF hybrid which may hold some interest. PHP's strength, IMO, is that it's NOT a tag-based language. You can create any functions you want and call them already from a ? ? combination ?=myFunction($params);? Separating code/content is a much stronger idea, with just variable replacements in the 'template'. In the examples below, how do you gracefully handle errors? You don't - not without addding more code to the file. Or look more into XML/XSLT stuff. nicolas costes wrote: maybe one day, PHP will implement user defined tags this could be an idea, if this is prooved to be useful. (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr ORIGINAL MESSAGE- Yep this is not bad! html Hello, showusername/. Your last login was showlastlogin/.p /html and now using PHP's short tags, you can make it even prettier: html Hello, ?=showusername()?. Your last login was ?=showlastlogin()?.p /html Right? Dr. Evil [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It seems to me that one of the problems with PHP is that you have to include code in your HTML pages. Even with the cleanest design, you end up with HTML that looks like this: html Hello, ?php showusername(); ?. Your last login was ?php showlastlogin(); ?.p /html This is ok, but it seems to me that java taglibs provide a more elegant way to do the same things: html Hello, showusername/. Your last login was showlastlogin/.p /html This lets the backend stuff be completely separated from the html design part of things. What do people think of this? I'm just now learning JSP so I'm thinking about the differences between PHP and JSP. In general, both are powerful ways of creating dynamic websites, but they have different characteristics and are better for different things. I'm learning java but I will continue to use both, depending on the task. -- 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: problem in the small code
[EMAIL PROTECTED] (Balaji Ankem) writes: What is the problem with following code.. $sql1=DELETE from tinventory where inv_tag='$inv_tag'; no closing doublequote. -- 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] Once more, with feeling
Dear All: Due to popular demand I've put the newest version of the Code Red detector on one of my servers in public, anonymous FTP. The URL is ftp://ftp.compuphrase.net/pub/codered ftp://ftp.compuphrase.net/pub/codered . After some research (annotated in the propaganda), I added the last 10 or so lines of code late yesterday to do the following: 1. Ascertain if this is a browser poking around or is it a true attack? Apparently the worm doesn't send a User-Agent header. 2. If there's no user agent, it's most likely that the attack is coming from IIS directly. If this is the case, cause a browser to pop up on the infected machine's console advising the admin that the attack has been detected and reported. 3. If User-Agent has a value in it, then the supposed attack is coming from a browser. Redirect that browser to the anticodered.html page. There are two items in the codered FTP folder: codered.php which must be put in your default web server's top directory. Remember, the worm isn't sending Host headers, either, so if you're using virtual name hosting on Apache, ONLY the default server will be hit. You must also rename this file to default.ida and do remember to make the AddType directive change in Apache. This is also annotated at the top of codered.php. The second item is the body of the anti-Code Red html page. There's no head or body section in that HTML codelet, which will allow you to cut-and-paste it directly into your template to keep your site's look and feel. Name it what you will, but make sure that the configuration at the top of default.ida matches. Any improvements or suggestions will be welcome. I'm still logging over 100 attempts per day and it doesn't seem to be slowing down any at all. I'd love to hear about your results and possibly some better techniques for the free-text parsing bit in the middle that finds the ISP from one of the major authorities. I realise that this appears kinda hasty. I didn't expect such a heavy or fast response. I really appreciate all of your help in getting me on my feet in PHP. The transition from ASP to PHP was much easier due to the warm support and education from all of you on the list. Enjoy! Bill Farrell Web Implementer http://www.compuphrase.com http://www.compuphrase.com
Fwd: Re: [PHP] Just had a cool idea!
This reply was send to my private mailbox.. how may i go around doing this though... and sorry for yelling Think logical. Visitor is 499, the next comes along, one visitor is added so your current visitor is 500 and BINGO he just won the jackpot.. your link.. whatever. Before asking any further questions read: http://www.tuxedo.org/~esr/faqs/smart-questions.html Bye, B. Think I would do it with an if.. then loop. Just after the counter is raised one you check if it equals your BINGO value. And you shouldn't yell at people trying to help you. Bye, B. -- 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] Is it possible to detect the Browser type/version in PHP?
Hi, I once had the Javascript codes to detect the browser type/version (but unfortunately, I lost the codes), does anyone have the Javascipt code? or can PHP do the same job (how?) Thank you very much in advance. -- 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] Is it possible to detect the Browser type/version in PHP?
with some environnement variable er, i'm going to take a look, wait. (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Zhu George-CZZ010 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 5:35 PM Subject: [PHP] Is it possible to detect the Browser type/version in PHP? Hi, I once had the Javascript codes to detect the browser type/version (but unfortunately, I lost the codes), does anyone have the Javascipt code? or can PHP do the same job (how?) Thank you very much in advance. -- 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 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] mysql_db_query create table error
All, I am trying to create a table in a mySQL database, seems like it would be easy enough, but for some reason it is not working, below is the code: // Query to create table and columns $sql = CREATE TABLE 'products' ( id INTEGER UNSIGNED NOT NULL AUTOINCREMENT PRIMARY KEY, description TEXT, jewelery-type VARCHAR(255), catalog-number VARCHAR(255), price VARCHAR(255), stone-type VARCHAR(255), stone-color VARCHAR(255), stone-cut VARCHAR(255), stone-clarity VARCHAR(255), stone-carat VARCHAR(255), supplierVARCHAR(255), metal-type VARCHAR(255), width VARCHAR(255), length VARCHAR(255), setting VARCHAR(255) ); // create connection // substitute hostname, username and password $connection = mysql_connect(mkrisher, mkrisher, ) or die (Couldn't connect to server.); // select database // substitute database name $db = mysql_select_db(richmondjewelers) or die (Couldn't open database.); // execute SQL query and get result $sql_result = mysql_db_query($db, $sql) or die (Couldn't execute query!); I always get the Couldn't execute query error, is there something else that I should be doing, watching for permission issues or something? Thanks in advance, __ Michael Krisher __ http://www.sectiongroup.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]
Re: [PHP] Is it possible to detect the Browser type/version in PHP?
Yes. STFW -- www.php.net type detect browser in the searchbox -- click pulldownbox -- select online documentation and click on the little arrow.. http://www.php.net/manual/en/function.get-browser.php http://www.php.net/manual/en/language.variables.predefined.php Next time you can search the online manual on your own :-) Bye, B. Hi, I once had the Javascript codes to detect the browser type/version (but unfortunately, I lost the codes), does anyone have the Javascipt code? or can PHP do the same job (how?) -- 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] Php
Has anyone had luck with apache 2.0 beta, jakarta, and php 4.06 on solaris 8 on netra t-1.? If so email me: how go about it, I get tons of compiling errors. But on my linux box, it works , no problems. Is incompatable with certain glibc librarys? I have glibc 2.01. Help me community! Nael Mohammad 180 Montgomery St. Suite 2000 San Francisco CA, 94104 Phone: 415-403-7300 x314 Fax: 415-403-7373 Mobile: 415-793-0609 www.neomar.com -- Neomar - When Wireless Means Business -- 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] Translation table not working
I cannot manage correct HTML encoding, here is the example from the manual: --- $trans = get_html_translation_table(HTML_ENTITIES); $str = Hallo Frau Krämer; $encoded = strtr($str, $trans); The $encoded variable will now contain: Hallo amp; lt;Fraugt; amp; Krauml;mer. --- If I do exactly the same, I get: Hallo amp; lt;Fraugt; amp; Krämer Ampersand and brackets are encoded, not the german umlaut. I tried some other chars too. Got nothing useable, some chars translated wrong. In fact just few special characters are encoded. Tested on MacOSX and Linux. Got different displays in the browser, but generally the same behavior - the translation does not work properly. If I list the translation table HTML_ENTITIES in the browser, source code shows me the correct encoding... Any tips? TIA, Peter -- 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] World Trade Centre Hit By terrorists, also pentagon
So sprach »[EMAIL PROTECTED]« am 2001-09-11 um 08:55:49 -0600 : We need the receive the help from Got, I believe He is the only one who can help us on this situation Well, you know: *EXACTLY* this is the problem! Your so called god. If it weren't for this superstition, the world would be a *MUCH* safer place. I'm sure of that. But if it makes you feel better: Go on, believe in that. -- 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] World Trade Centre Hit By terrorists, also pentagon
I am sorry, but the problem is the exact opposite. If people would turn back to God and seek his face and live according to His will, the World would benefit greatly. My 2 cents. -- Original Message -- From: Alexander Skwar [EMAIL PROTECTED] Date: Tue, 11 Sep 2001 18:26:46 +0200 So sprach »[EMAIL PROTECTED]« am 2001-09-11 um 08:55:49 -0600 : We need the receive the help from Got, I believe He is the only one who can help us on this situation Well, you know: *EXACTLY* this is the problem! Your so called god. If it weren't for this superstition, the world would be a *MUCH* safer place. I'm sure of that. But if it makes you feel better: Go on, believe in that. -- 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 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] World Trade Centre Hit By terrorists, also pentagon
I'm sure your is the view shared by the VAST, VAST majority on both sides. Michael Quoting Clint Tredway [EMAIL PROTECTED]: I am sorry, but the problem is the exact opposite. If people would turn back to God and seek his face and live according to His will, the World would benefit greatly. My 2 cents. -- Original Message -- From: Alexander Skwar [EMAIL PROTECTED] Date: Tue, 11 Sep 2001 18:26:46 +0200 So sprach »[EMAIL PROTECTED]« am 2001-09-11 um 08:55:49 -0600 : We need the receive the help from Got, I believe He is the only one who can help us on this situation Well, you know: *EXACTLY* this is the problem! Your so called god. If it weren't for this superstition, the world would be a *MUCH* safer place. I'm sure of that. But if it makes you feel better: Go on, believe in that. -- 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 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] --- This mail sent through the IMP demo site: demo.uk.horde.org Find out more at http://www.horde.org/imp/ -- 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] Is it possible to detect the Browser type/version in PHP?
Here is something that I use and works good ? $Browser_Type = strtok($HTTP_USER_AGENT, /); if(ereg( MSIE, $HTTP_USER_AGENT)) { } elseif(ereg( Mozilla, $HTTP_USER_AGENT)) { } else // I use this to catch Search Robots { } ? Thank You Brian Paulson Sr. Web Developer The Pueblo Chieftain Online [EMAIL PROTECTED] http://www.chieftain.com -Original Message- From: nayco [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 9:48 AM To: Zhu George-CZZ010; [EMAIL PROTECTED] Subject: Re: [PHP] Is it possible to detect the Browser type/version in PHP? with some environnement variable er, i'm going to take a look, wait. (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr - Original Message - From: Zhu George-CZZ010 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 11, 2001 5:35 PM Subject: [PHP] Is it possible to detect the Browser type/version in PHP? Hi, I once had the Javascript codes to detect the browser type/version (but unfortunately, I lost the codes), does anyone have the Javascipt code? or can PHP do the same job (how?) Thank you very much in advance. -- 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 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 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] World Trade Centre Hit By terrorists, also pentagon
Dear All, Please I beg you not to start a discussion over this. It is a very sad moment, and I think everybody agrees with me. I send my condolences to all the people who has family in these tragic terrorism acts. Sean C. McCarthy Clint Tredway wrote: I am sorry, but the problem is the exact opposite. If people would turn back to God and seek his face and live according to His will, the World would benefit greatly. My 2 cents. -- Original Message -- From: Alexander Skwar [EMAIL PROTECTED] Date: Tue, 11 Sep 2001 18:26:46 +0200 So sprach »[EMAIL PROTECTED]« am 2001-09-11 um 08:55:49 -0600 : We need the receive the help from Got, I believe He is the only one who can help us on this situation Well, you know: *EXACTLY* this is the problem! Your so called god. If it weren't for this superstition, the world would be a *MUCH* safer place. I'm sure of that. But if it makes you feel better: Go on, believe in that. -- 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 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 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 list 2-6 in while script?
Hi! I have this script and wonder how to change it to get it list only number 2 to number 6 and not each? while (list ($key,$val) = each ($headers)) { print pb.$val./b/p; } Thanks in advance. Regards Jan -- 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] World Trade Centre Hit By terrorists, also pentagon
Sean C. McCarthy [EMAIL PROTECTED] said: Dear All, Please I beg you not to start a discussion over this. It is a very sad moment, and I think everybody agrees with me. I send my condolences to all the people who has family in these tragic terrorism acts. Sean C. McCarthy I couldn't agree more. If anybody wants to start a blame game flame war, please take it off list, eh? -- - Erik Mathy Applications Developer @butlerandco.com, inc. -- 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] Unable to find stream pointer
Hi PHP-Users, I am having problems with php and imap now for several days on several servers. I just get the following Error: Warning: Unable to find stream pointer in file on line line This error does not occur in every execution, but only sometimes. I read a lot about this error on the internet, but i still don't know what is the reason for this error and how to work around it. Does anybody of you know where this error originates? thanx andreas -- 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] single quote replace
Does anyone have a function that will replace single quotes inside a string? Thanks! -- 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] How to list 2-6 in while script?
So sprach »Jan Grafström« am 2001-09-11 um 16:48:59 + : Hi! I have this script and wonder how to change it to get it list only number 2 to number 6 and not each? while (list ($key,$val) = each ($headers)) { print pb.$val./b/p; } Hmm $i = 1; while (list ($key,$val) = each ($headers)){ if (2 == $i || 6 == $i){ continue; } print $val; $i++; } Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 day 12 hours 20 minutes -- 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] single quote replace
php does;-) $text = str_replace(',replace_text,$text); -Original Message- From: Clint Tredway [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 1:33 PM To: [EMAIL PROTECTED] Subject: [PHP] single quote replace Does anyone have a function that will replace single quotes inside a string? Thanks! -- 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 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] MySql Help
Hello, I have a database with 4 Columns |ID|First|Second|Third| I am tring to run a query On the First Column and place the data into an array. The problem that I am running into Is that there are doubles, triples, and sometimes more of the same name in that column. Each name represents something differnet in the Second and Third and when I run a simple query (select first from table) I get (expectedly) all of the names in the Column doubles and all. My question is , is there a way to select from a database and only select one of each name from the column? Example. Data Data Data Data Data Data1Data1 Data1 Data2Data2 Data2 Data2 Data2 Thanks for any advice. Jared -- 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] MySql Help
At 12:31 PM -0600 9/11/01, Jared Mashburn wrote: I am tring to run a query On the First Column and place the data into an array. The problem that I am running into Is that there are doubles, triples, and sometimes more of the same name in that column. Each name represents something differnet in the Second and Third and when I run a simple query (select first from table) I get (expectedly) all of the names in the Column doubles and all. My question is , is there a way to select from a database and only select one of each name from the column? SELECT DISTINCT field1 FROM table1 ORDER BY field1 Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- 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] Uploading Photos to MySQL
Hello, Has anyone developed another class for uploading images to a MySQL database? I downlaoded upload_db.zip from: http://circle.ch/scripts/ as it was a phplib based and it looks like it should do what is required. However it doesn't seem to be working. Does anyone else have any good pointers to scripts to store jpg/png files in MySQL using PHP? Thanks. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ In all things it is better to hope than to despair.Wolfgang von Goethe -- 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 do I get the resolution of my screen?
Hi, I have a link that opens a small window. I'd like to center it in the screen regardless of the resolution in use. Does PHP have a way of returning the width/height of the current screen in pixels? Thanks, Don
Re: [PHP] How do I get the resolution of my screen?
nope, it don't... but you could easily do this in JavaScript: function OpenCenter() { // we're going to center the popup screen nLeft = ( screen.width - 350 ) / 2 ; nTop = ( screen.height - 300 ) / 2; // open the window var newWind = window.open( someurl.html, shipit, width=450,height=300,titlebar=no,addressbar=0,resizable=yes,scrollbars=yes,screenX= + nLeft + ,screenY= + nTop + ,left= + nLeft + ,top= + nTop ); if( newWind.opener == null ) { newWind.opener = window; } } At 03:46 PM 9/11/2001 -0400, Don wrote: Hi, I have a link that opens a small window. I'd like to center it in the screen regardless of the resolution in use. Does PHP have a way of returning the width/height of the current screen in pixels? Thanks, Don -- 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] PHP and SecurID
Has anyone used PHP with SecurID and Netscape Enterprise server? Can this be done? Jeb Scarbrough [EMAIL PROTECTED] Internet Security Systems, Inc. 6303 Barfield Road Atlanta, Georgia 30328 Phone: 404-236-3292 Fax: 404-236-2626 _ -- 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 SOLVED - was [PHP] Rasmus HELP ! Fwd: [PHP] mail() ERROR - WHY, WHY, WHY]
This is a forwarded message From: Badger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Monday, September 10, 2001, 11:04:54 PM Subject: [PHP] Rasmus HELP ! Fwd: [PHP] mail() ERROR - WHY, WHY, WHY ===8==Original message text=== This is a forwarded message From: Badger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Monday, September 10, 2001, 11:34:45 AM Subject: [PHP] Ramesus HELP ! Fwd: [PHP] mail() ERROR - WHY, WHY, WHY ===8==Original message text=== This is a forwarded message From: Badger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Monday, September 10, 2001, 12:23:54 AM Subject: [PHP] mail() ERROR - WHY, WHY, WHY ===8==Original message text=== Hello , I drowing here and need a life-ring! I have a site relying heavily on e-mail registration, forums, etc. and mail() is broken in my php install. I've been using an smtp server other than sendmail, but based on recommendations I have removed that smtp server, removed php, installed sendmail, reinstalled php, and php still complains that Warning: mail() is not supported in this PHP build and sendmail is clearly in my /var/lib/php.ini sendmail_path and the location is correct. I can send mail from the command line, but not via php's mail() Need Heelp! real bad. (beg, beg) -- Best regards, Badger 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] ===8===End of original message text=== I am desperate to get this working. If anyone can tell me a way to troubleshoot this problem, I'll be happy to pursue it myself. I am running the RedHat 7.1 distribution of Linux, Apache 1.3.20, php 4.0.6, and sendmail-8.10.11. The Apache and php are src builds using tarballs and the sendmail is an rpm - I am only using sendmail to troubleshoot the problem, but I will eventually use dmail as my smtp server. All the above servers are on the sam machine. I have turned logging on in my php.ini, but the mail() error does not get written to the log file I specified, only to the Apache error log - but the error is the same as that displayed in my browser when php tries to call mail() Warning: mail() is not supported in this PHP build I've tried everything I can think of and recommendations from this list... I have removed php, removed sendmail, reinstalled sendmail, reinstalled php: here is my php build: - CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure --prefix=/usr/local \ --with-apache=/usr/local/src/Apachetoolbox-1.5.38/apache_1.3.20 \ --enable-exif \ --enable-track-vars \ --with-calendar=shared \ --enable-safe-mode \ --enable-magic-quotes \ --enable-trans-sid \ --enable-wddx \ --enable-ftp \ --with-gd=/usr/local \ --with-zlib \ --enable-gd-native-tt \ --with-t1lib=/usr/local/lib/php/t1libs \ --with-jpeg-dir=/usr/local \ --with-png-dir=/usr/local \ --with-zlib-dir=/usr/local \ --with-ttf \ --with-freetype-dir=/usr/local \ --with-imap=/usr/local \ --with-mhash=/usr/local \ --with-mcrypt=/usr/local \ --with-unixODBC=/usr/local/unixODBC \ --with-mysql \ -- My php.ini is i the proper location and chnges get reloaded after reloading Apache - verified by phpinfo(). Here is the pertinent area of my php.ini file: --- sendmail_path = /usr/sbin/sendmail -t -i - Here are others that I've tried in my php.ini file: sendmail_path = /usr/sbin/sendmail --- sendmail_path = /usr/sbin -- sendmail_path = .:/usr/sbin/sendmail -t -i -- sendmail_path = .:/usr/sbin/sendmail sendmail_path = .:/usr/sbin -- ;sendmail_path = (default) -- I still get the mail() error Please help me figure this one out. -- Best regards, Badgermailto:[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] ===8===End of original message text=== Sorry about the name misspell -- Best regards, Badgermailto:[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] ===8===End of original message text=== Hello all, I finally solved this bugger of a
[PHP] Other lists
I've found this list so helpful - can anyone recommend a similar thing for javascript/html/etc? cheers, - seb --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.277 / Virus Database: 146 - Release Date: 05/09/2001 -- 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] date/time of current page
I want to put, into a footer include file, the last modified date of the current file being viewed. I have the following code that works when I hard code the file name - ? $dt=date(D, F d, Y g:i:s A, filemtime(index.php)); echo $dt; ? But of course that won't work as a footer for a site with over two hundred pages. What is the parameter for the current page? I tried php_self but that didn't work properly (it returned Dec 31 1969). -- Chip Wiegand Simrad, Inc [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]
RE: [PHP] date/time of current page
have you tried parsing out the name from $PHP_SELF? I would think that php wouldn't care if it gets 'index.php' or (some processing) index.php, know what i mean? jack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] date/time of current page I want to put, into a footer include file, the last modified date of the current file being viewed. I have the following code that works when I hard code the file name - ? $dt=date(D, F d, Y g:i:s A, filemtime(index.php)); echo $dt; ? But of course that won't work as a footer for a site with over two hundred pages. What is the parameter for the current page? I tried php_self but that didn't work properly (it returned Dec 31 1969). -- Chip Wiegand Simrad, Inc [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] -- 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] date/time of current page
script language=javascript document.write('some text ' + document.lastmodified + ' some other text.'); /script -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 4:42 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] date/time of current page have you tried parsing out the name from $PHP_SELF? I would think that php wouldn't care if it gets 'index.php' or (some processing) index.php, know what i mean? jack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] date/time of current page I want to put, into a footer include file, the last modified date of the current file being viewed. I have the following code that works when I hard code the file name - ? $dt=date(D, F d, Y g:i:s A, filemtime(index.php)); echo $dt; ? But of course that won't work as a footer for a site with over two hundred pages. What is the parameter for the current page? I tried php_self but that didn't work properly (it returned Dec 31 1969). -- Chip Wiegand Simrad, Inc [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] -- 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 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] date/time of current page
Jack Dempsey [EMAIL PROTECTED] on 09/11/2001 11:42:07 PM Internet mail from: To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject: RE: [PHP] date/time of current page have you tried parsing out the name from $PHP_SELF? I would think that php wouldn't care if it gets 'index.php' or (some processing) index.php, know what i mean? jack I'm not sure what you mean, but here is what I have tried - ? $dt=date(m/d/y g:i:s A, filemtime($PHP_SELF)); echo $dt; ? I also quoted the string $PHP_SELF with the same results, which look like this - 12/31/69 4:00:00 PM So, just what am I doing wrong? -- Chip -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] date/time of current page I want to put, into a footer include file, the last modified date of the current file being viewed. I have the following code that works when I hard code the file name - ? $dt=date(D, F d, Y g:i:s A, filemtime(index.php)); echo $dt; ? But of course that won't work as a footer for a site with over two hundred pages. What is the parameter for the current page? I tried php_self but that didn't work properly (it returned Dec 31 1969). -- Chip Wiegand Simrad, Inc [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] -- 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] date/time of current page
Michael Geier, CDM Systems Admin [EMAIL PROTECTED] on 09/11/2001 11:46:50 PM Internet mail from: To: Jack Dempsey [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject: RE: [PHP] date/time of current page script language=javascript document.write('some text ' + document.lastmodified + ' some other text.'); /script Surely it can be done in PHP, which doesn't, of course, depend on whether or not the visitor has some options disabled or enabled in their browser. -- Chip -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 4:42 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] date/time of current page have you tried parsing out the name from $PHP_SELF? I would think that php wouldn't care if it gets 'index.php' or (some processing) index.php, know what i mean? jack -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] date/time of current page I want to put, into a footer include file, the last modified date of the current file being viewed. I have the following code that works when I hard code the file name - ? $dt=date(D, F d, Y g:i:s A, filemtime(index.php)); echo $dt; ? But of course that won't work as a footer for a site with over two hundred pages. What is the parameter for the current page? I tried php_self but that didn't work properly (it returned Dec 31 1969). -- Chip Wiegand Simrad, Inc [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] -- 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 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] date/time of current page
I'm not sure what you mean, but here is what I have tried - try this: ? echo date(m/d/y g:i:s A, filemtime(substr($PHP_SELF,strrpos($PHP_SELF,'/')+1))) ? jack -- 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] date/time of current page
Thankyou, that works fine. -- Chip Jack Dempsey [EMAIL PROTECTED] on 09/12/2001 12:03:20 AM Internet mail from: To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject: RE: [PHP] date/time of current page I'm not sure what you mean, but here is what I have tried - try this: ? echo date(m/d/y g:i:s A, filemtime(substr($PHP_SELF,strrpos($PHP_SELF,'/')+1))) ? jack -- 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] More thoughts about PHP: Taglibs
Dr. Evil wrote: It seems to me that one of the problems with PHP is that you have to include code in your HTML pages. Even with the cleanest design, you end up with HTML that looks like this: html Hello, ?php showusername(); ?. Your last login was ?php showlastlogin(); ?.p /html No, you don't. Have a script file that processes your information, then include() a template file that would have drop in replacements file1.php ? $name = showusername(); $login = showlastlogin(); include(template.html); ? template.html html Hello ?=$name;? your last login was ?=$login;?. /html Your PHP file can get fancy. file1.php ? $template=foo.html; $name = showusername(); $login = showlastlogin(); if ($login60 days) { $template=foolate.html; } include($template); ? You can check conditionals, handle errors, etc., in your PHP file, without putting any function calls in your HTML template. We try to avoid putting function calls in the templates at all costs. variables - yes. logic (if/else/etc) - yes (on occasion). function calls? No. This is ok, but it seems to me that java taglibs provide a more elegant way to do the same things: html Hello, showusername/. Your last login was showlastlogin/.p /html Again - what if showlastlogin returned an error for some reason? How would you handle that there? If the 'elegance' is simply saving a few keystrokes, that's not really doing much. :( This lets the backend stuff be completely separated from the html design part of things. What do people think of this? I'm just now learning JSP so I'm thinking about the differences between PHP and JSP. It's not separated enough if you're possibly pulling back stuff from functions which you haven't error checked. You would do that error checking in the template then, which doesn't strike me as very efficient in most cases. In general, both are powerful ways of creating dynamic websites, but they have different characteristics and are better for different things. I'm learning java but I will continue to use both, depending on the task. -- 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]