[PHP] variable passing using URL
hello list, I have a problem in passing variables using URLs. I have a link from a PHP 'Page One' and passing some variables thru URL. This link should now open another page (main frame) which will have two frames in it (left frame and Right frame). But I want the variables to be passed on to the left frame(one of the two frames in main frame). Can this be done some how? I apologize if this does not sound like a PHP question. Many thanks in advance. -- Ra. Gowthaman, Graduate Student, Bioinformatics Lab, Malaria Research Group, ICGEB , New Delhi. INDIA Phone: 91-9811261804 91-11-26173184; 91-11-26189360 #extn 314 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Passing Command in URL
--- Dragon [EMAIL PROTECTED] wrote: If I/You try to open the Admin-Sektion ?open=admin Nothing happens, you will only reload the main view. Use $_GET['open']. It will work. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tracking ip and its location
Hello PHP, Is there any function/class to search the location based on ip address ? For example, I got ip 144.xxx.xxx.xxx and it can displaying that IP comes from X country. thxs -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variable passing using URL
Capture the variables you've sent to the main frame page and send them via the url of the frames. FRAME SRC=buttons.htm?pass=yourvariables Hope that helps. - Original Message - From: gowthaman ramasamy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 14, 2004 2:24 AM Subject: [PHP] variable passing using URL hello list, I have a problem in passing variables using URLs. I have a link from a PHP 'Page One' and passing some variables thru URL. This link should now open another page (main frame) which will have two frames in it (left frame and Right frame). But I want the variables to be passed on to the left frame(one of the two frames in main frame). Can this be done some how? I apologize if this does not sound like a PHP question. Many thanks in advance. -- Ra. Gowthaman, Graduate Student, Bioinformatics Lab, Malaria Research Group, ICGEB , New Delhi. INDIA Phone: 91-9811261804 91-11-26173184; 91-11-26189360 #extn 314 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] export mysql to excel
You could get yourself the mySQL ODBC driver and 'Get External Data' in Excel ... Richard -Original Message- From: CurlyBraces Technologies ( Pvt ) Ltd Sent: Friday, May 14, 2004, 7:18:17 AM hi , i want to export data in mysql to excel . but problem is mysql runs in the linux machine , How can i get that data from mysql-Linux machine to windows-Excel machine , plz help asap thanx in advance curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best way to creat multilingual sites. With gettxt ?
Hi, I have been trying all sorts of techniques on our multilingual website. First I had include files german.inc.php with was just a huge list of varibales: $trans['thankyou']=Danke; //etc After that I put all into a database. Now someone told be about gettxt in some forum. He said that this was the standard way, also for application software. I would like to try out gettxt but application software doesn't have long text passages like web pages do. How is that dealt with? Anybody does a multilingual site with gettxt ? Thank you very much. http://learn.to/quote -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tracking users
Hi all, I am currently running a web application which has an increasing number of users. The application uses PHP sessions. As administrator, I would like to know which users are currently logged in. Any brief suggestion or link to some good tutorial/paper would be very much appreciated. A. /*** * Alessandro Vitale * Software Engineer * Tiscali International Network * [EMAIL PROTECTED] / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] export mysql to excel
CurlyBraces Technologies ( Pvt ) Ltd wrote: hi , i want to export data in mysql to excel . but problem is mysql runs in the linux machine , How can i get that data from mysql-Linux machine to windows-Excel machine , plz help asap thanx in advance curlys There are few classes that can create native excel files, google is your friend. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] R: [PHP] variable passing using URL
in the html link you should set correctly the target window. Try using something like this: A HREF=www.mysite.com TARGET=main_windowgo to my site/A main_window is the name of the window as assigned in the frameset declaration. cheers, A. -Messaggio originale- Da: gowthaman ramasamy [mailto:[EMAIL PROTECTED] Inviato: venerdì 14 maggio 2004 8.24 A: [EMAIL PROTECTED] Oggetto: [PHP] variable passing using URL hello list, I have a problem in passing variables using URLs. I have a link from a PHP 'Page One' and passing some variables thru URL. This link should now open another page (main frame) which will have two frames in it (left frame and Right frame). But I want the variables to be passed on to the left frame(one of the two frames in main frame). Can this be done some how? I apologize if this does not sound like a PHP question. Many thanks in advance. -- Ra. Gowthaman, Graduate Student, Bioinformatics Lab, Malaria Research Group, ICGEB , New Delhi. INDIA Phone: 91-9811261804 91-11-26173184; 91-11-26189360 #extn 314 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL backup
Try http://freshmeat.net/projects/phpmysqlbackupro/ Regards, Hatem - Original Message - From: Matthew Oatham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 13, 2004 7:30 PM Subject: [PHP] MySQL backup Hi, I am using MySQL database accessed via myphp admin - there is an export option which allows me to export the structure and data to an sql file but this is a manual procedure is there anyway to automate this via myphp admin i.e. using a cron job? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: export mysql to excel
Curlybraces Technologies Ltd [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi , i want to export data in mysql to excel .. but problem is mysql runs in the linux machine , How can i get that data from mysql-Linux machine to windows-Excel machine , plz help asap thanx in advance curlys Usually it's just selecting all records and writing them in a plain text file spererating the values with commas (Comma Seperated Values), each record in a seperate line. The file extension should be .csv. Then Excel will open it as a spreadsheet. But I think it's worth a try to follow the advice of Marek to try out an existing class for this task. Take a look here: http://www.phpclasses.org/search.html?words=excelgo_search=1x=0y=0 Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tracking users
Alessandro Vitale [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I am currently running a web application which has an increasing number of users. The application uses PHP sessions. As administrator, I would like to know which users are currently logged in. Any brief suggestion or link to some good tutorial/paper would be very much appreciated. A. If your session container is a database (instead of the standard using local files) you can easily do a SELECT count(*) to get the number of running sessions. Otherwise it's a bit more complicated, I guess. This topic was discussed some days ago on the list. Please search the list archives: http://www.phparch.com/mailinglists/ Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Not sure
Hi all I have the following php code: echotdnbsp;/tdtdinput type=\checkbox\ name=\frow\ value=\$var\/td\n; I now have the following javascript code: !-- From webmin-- a href='' onClick='document.frm.frow.checked = true; for(i=0; idocument.frm.frow.length; i++) { document.frm.frow[i].checked = true; } return false'Select all/anbsp; a href='' onClick='document.frm.frow.checked = !document.frm.frow.checked; for(i=0; idocument.frm.frow.length; i++) { document.frm.frow[i].checked = !document.frm.frow[i].checked; } return false'Invert selection/abr the problem I have is that if I change the echotdnbsp;/tdtdinput type=\checkbox\ name=\frow\ value=\$var\/td\n; to echotdnbsp;/tdtdinput type=\checkbox\ name=\frow[]\ value=\$var\/td\n; Then my php task is fine, but if I make it a normal variable, like name=frow But then my PHP does not work, and the Javascript does work (Selects all the checkboxes with a tick) I can determine if this is a javascript fault or a php fault. Im stumped If know of a solution, it would be most appreciated Kind Regards Brent Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] tracking ip and its location
Try: http://www.1phpstreet.com/vb/scripts/ShowCode.asp?txtCodeId=318lngWId=8 Regards, Tom -Original Message- From: adwinwijaya [mailto:[EMAIL PROTECTED] Sent: 14 May 2004 07:39 To: PHP Subject: [PHP] tracking ip and its location Hello PHP, Is there any function/class to search the location based on ip address ? For example, I got ip 144.xxx.xxx.xxx and it can displaying that IP comes from X country. thxs -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newbie Guide] For the benefit of new members
Ma Siva Kumar a écrit : For example: One of the repeatedly discussed question in the list is Best PHP editor. (...) try this link : http://phpeditors.linuxbackup.co.uk/ (contributed by Christophe Chisogne). The link has now moved (http redirect) http://www.thelinuxconsultancy.co.uk/phpeditors/ Could you update the url in newbie guide? ps 111 editors are listed there. Christophe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Reversing a string?
?php $str = Hello World; echo strrev($str); ? http://ie2.php.net/strrev Regards Kristian Rasmussen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, I need a script for reversing a string (hello world becomes dlrow olleh). I have tried the following: --- $length = strlen($i); $g = ; while ($length 0) { $g = $i[$length] . $g; $length--; } echo $g; --- With, obviously, no success. Is this the way or could array_reverse() somehow be used? Kristian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Not sure
On 14 May 2004 09:59, Brent Clark wrote: Hi all I have the following php code: echotdnbsp;/tdtdinput type=\checkbox\ name=\frow\ value=\$var\/td\n; I now have the following javascript code: !-- From webmin-- a href='' onClick='document.frm.frow.checked = true; for(i=0; idocument.frm.frow.length; i++) { document.frm.frow[i].checked = true; } return false'Select all/anbsp; a href='' onClick='document.frm.frow.checked = !document.frm.frow.checked; for(i=0; idocument.frm.frow.length; i++) { document.frm.frow[i].checked = !document.frm.frow[i].checked; } return false'Invert selection/abr the problem I have is that if I change the echotdnbsp;/tdtdinput type=\checkbox\ name=\frow\ value=\$var\/td\n; to echotdnbsp;/tdtdinput type=\checkbox\ name=\frow[]\ value=\$var\/td\n; Then my php task is fine, but if I make it a normal variable, like name=frow But then my PHP does not work, and the Javascript does work (Selects all the checkboxes with a tick) I can determine if this is a javascript fault or a php fault. Neither -- a programmer fault! ;) Name the field with name=frow[], and refer to it in JavaScript like this: document.frm['frow[]'] Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Not sure
Brent Clark wrote: Hi all I have the following php code: echotdnbsp;/tdtdinput type=\checkbox\ name=\frow\ value=\$var\/td\n; I now have the following javascript code: !-- From webmin-- a href='' onClick='document.frm.frow.checked = true; for(i=0; idocument.frm.frow.length; i++) { document.frm.frow[i].checked = true; } return false'Select all/anbsp; a href='' onClick='document.frm.frow.checked = !document.frm.frow.checked; for(i=0; idocument.frm.frow.length; i++) { document.frm.frow[i].checked = !document.frm.frow[i].checked; } return false'Invert selection/abr use input type=checkbox name=frow[] ... and document.frm.elements['frow[]'][i].checked. And you will get javascript error if you refer to document.frm.frow as both array and object, use typeof operator to find out the type. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Sockets
This may sound a bit cheeky, but I've spent most of today looking for some examples of sockets. I've managed to create a socket and it's connecting ok, but next I need to find a way of sending an ASCII string to the remote computer and echo-ing the results back to my screen. (Using a text box to submit the ascii string) This is for simulating comms between a UNIX server and a piece of electrical equipment (for which I'm using my laptop). Does anyone know of similar examples. Thanks in advance, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] breaking the string
hello list, can we split a string into substrings of particular size. for example .. i have as sting of 1000 characters. can i split it into stings of 150 and feed them into an array. sorry i am bothering you guys again and again today sincerely gowtham -- Ra. Gowthaman, Graduate Student, Bioinformatics Lab, Malaria Research Group, ICGEB , New Delhi. INDIA Phone: 91-9811261804 91-11-26173184; 91-11-26189360 #extn 314 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: breaking the string
Gowthaman Ramasamy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hello list, can we split a string into substrings of particular size. for example .. i have as sting of 1000 characters. can i split it into stings of 150 and feed them into an array. This should be EXACTLY what you're looking for: http://de3.php.net/manual/en/function.str-split.php Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: export mysql to excel
[snip] i want to export data in mysql to excel .. but problem is mysql runs in the linux machine , How can i get that data from mysql-Linux machine to windows-Excel machine , plz help asap [/snip] There are several tutorials for retrieveing data from a database server to any other client machine, regardless of the OS. Here one such tutorial http://www.evolt.org/article/Using_MySQL_and_PHP_to_Present_Excel_Spread sheets/20/26896/index.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] md5() with rand() || Strange results, need help....
It doesn't appear to be cookie settings either, nor auto-fill in. I do not have auto-complete running; when I log in under an affected users account, the stored md5($plain_password) does not match the submitted md5($plain_password). Could it be perhaps that md5() works differently with integers vs. a text string? God knows at this point, --Noah Travis Low [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Besides checking the browser cookie settings, have one of the affected users turn off the auto-fill form feature, then tell the browser to forget all saved form information. Let us know what happens. cheers, Travis CF High wrote: Re: the browser track, it looks like all adversely affected users; i.e. those who can no longer log in, have a browser of I.E. 6.0. I know that in many cases I.E. 6.0 has session and cookie vars disabled by default. Is it possible, a long, long shot, that rand() behaves differently in I.E. 6.0 -- I know PHP is server side, but I'm looking for any clues --Noah John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] CF High wrote: If anyone has any clues as to what might be happening; i.e. why the md5'd submitted plain text password does not match the stored md5'd password, please, please let me know. md5() results in a 32 character string. What kind of field are you storing it in? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- Travis Low mailto:[EMAIL PROTECTED] http://www.dawnstar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamically building insert/update forms from db
I was up late last night creating insert and update forms for tables in my db and knew there had to be a better way. I do have a class that will generate forms but I still have to create each input..i.e $forms-inputBox(), etc. I want to be able to pass in a table name and have a form returned to me. How do other's handle this? My first thought is to have an xml file that maps the database columns to form elements such as text, radio, etc then when the class is called, it searches the xml file for the passed in name and builds the appropriate form. Is this the best way? Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables Help
Ford, Mike [LSS] wrote: On 13 May 2004 19:52, John Nichel wrote: Monty wrote: Is there any way to get JUST the user-defined variables in PHP? Problem with get_defined_vars() is that it contains everything, including server and environment vars, and there's no easy way to keep just the user-defined vars part of the array created by get_defined_vars. Monty foreach ( get_defined_vars() as $key = $val ) { if ( ! preg_match ( /_POST|_GET|_COOKIE|_SERVER|_ENV|_FILES|_REQUEST|_SESSION/, $key ) ) { $user_defined[$key] = $val; } } U, or even, possibly, if no user variable names begin with _ if ($key{0}!='_') Cheers! Mike That won't 'strip out' all the non-user defined vars...ones like HTTP_POST_VARS -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reversing a string?
hehe, Reading the manual is somewhat not so bad after all... -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 2004-05-13 at 17:27, Kristian Rasmussen wrote: Hi all, I need a script for reversing a string (hello world becomes dlrow olleh). I have tried the following: --- $length = strlen($i); $g = ; while ($length 0) { $g = $i[$length] . $g; $length--; } echo $g; The following will work: $length = strlen( $i ); $g = ; while( $length 0 ) { $g .= $i{--$length}; } echo $g; But in all honesty the following is superior: $g = strrev( $i ); echo $g; Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically building insert/update forms from db
Edward Peloke wrote: I was up late last night creating insert and update forms for tables in my db and knew there had to be a better way. I do have a class that will generate forms but I still have to create each input..i.e $forms-inputBox(), etc. I want to be able to pass in a table name and have a form returned to me. How do other's handle this? My first thought is to have an xml file that maps the database columns to form elements such as text, radio, etc then when the class is called, it searches the xml file for the passed in name and builds the appropriate form. Is this the best way? This question if posted in a database newsgroup will get you a better answer. Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. Hope I am the intended recipient of this message ;-) if not please remove the disclaimer when sending to mailing lists. -- Raditha Dissanayake. - http://raditha/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically building insert/update forms from db
Why don't you have your script do a desc on the table you pass to it, parse the results, and populate the data needed for your form building class? - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Friday, May 14, 2004 9:37 AM Subject: [PHP] dynamically building insert/update forms from db I was up late last night creating insert and update forms for tables in my db and knew there had to be a better way. I do have a class that will generate forms but I still have to create each input..i.e $forms-inputBox(), etc. I want to be able to pass in a table name and have a form returned to me. How do other's handle this? My first thought is to have an xml file that maps the database columns to form elements such as text, radio, etc then when the class is called, it searches the xml file for the passed in name and builds the appropriate form. Is this the best way? Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dynamically building insert/update forms from db
desc? how would it know that I want the numeric in the db to be a menu item or yes, no on the form? Thanks, Eddie -Original Message- From: Steve Douville [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 10:26 AM To: Edward Peloke; Php-General Subject: Re: [PHP] dynamically building insert/update forms from db Why don't you have your script do a desc on the table you pass to it, parse the results, and populate the data needed for your form building class? - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Friday, May 14, 2004 9:37 AM Subject: [PHP] dynamically building insert/update forms from db I was up late last night creating insert and update forms for tables in my db and knew there had to be a better way. I do have a class that will generate forms but I still have to create each input..i.e $forms-inputBox(), etc. I want to be able to pass in a table name and have a form returned to me. How do other's handle this? My first thought is to have an xml file that maps the database columns to form elements such as text, radio, etc then when the class is called, it searches the xml file for the passed in name and builds the appropriate form. Is this the best way? Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically building insert/update forms from db
When you do a describe (desc tablename) it returns the type and length of the field in the database as part of the result set. You can parse that out and determine what kind of an input field to generate. - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: Steve Douville [EMAIL PROTECTED]; Php-General [EMAIL PROTECTED] Sent: Friday, May 14, 2004 10:51 AM Subject: RE: [PHP] dynamically building insert/update forms from db desc? how would it know that I want the numeric in the db to be a menu item or yes, no on the form? Thanks, Eddie -Original Message- From: Steve Douville [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 10:26 AM To: Edward Peloke; Php-General Subject: Re: [PHP] dynamically building insert/update forms from db Why don't you have your script do a desc on the table you pass to it, parse the results, and populate the data needed for your form building class? - Original Message - From: Edward Peloke [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Friday, May 14, 2004 9:37 AM Subject: [PHP] dynamically building insert/update forms from db I was up late last night creating insert and update forms for tables in my db and knew there had to be a better way. I do have a class that will generate forms but I still have to create each input..i.e $forms-inputBox(), etc. I want to be able to pass in a table name and have a form returned to me. How do other's handle this? My first thought is to have an xml file that maps the database columns to form elements such as text, radio, etc then when the class is called, it searches the xml file for the passed in name and builds the appropriate form. Is this the best way? Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically building insert/update forms from db
From: Edward Peloke [EMAIL PROTECTED] how would it know that I want the numeric in the db to be a menu item or yes, no on the form? How do you know whether you want it to be a menu item or yes, no? Now program the same logic into your function/class that handles creating your form... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Yahoo and PHP
I was reading the following article http://www.linux.com/article.pl?sid=04/05/12/1327217 and it says Yahoo, of course, makes heavy use of MySQL, and not only do Yahoo developers code in PHP, they even hired PHP's creator, Rasmus Lerdorf. I was wondering if anyone had some information to further substantiate this...(reply from Rasmus would be great :) ) I was aware that Yahoo was using PHP for some sites such as freedom.yahoo.com after 9/11, but how much more do they do with PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Yahoo and PHP
[snip] how much more do they do with PHP? [/snip] I cant remember all of the details, but I think they are going to be (might already be) using it extensively. http://www.internetnews.com/dev-news/article.php/1491221 http://news.com.com/2100-1023-963937.html?tag=lh Do some googleing, you will find a bunch of articles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Why would a socket be unavailable?
On Thursday, May 13, 2004, at 08:05 PM, Vail, Warren wrote: Don't know if this will help, but can you confirm whether your while loop is failing on the first time through or a subsequent time through (perhaps by echoing something each time through)? No, it doesn't fail the first time. It runs through the loop several times, and fails ONLY once it timesout (because the server is sending no more data). Then, the next time it loops, it fails again. That said, I am going to shortly repost the program flow (in simplified form), so you guys can see the issue. (Someone kindly pointed out that as this thread has grown, the original issue is no longer clear.) Thanks guys for helping. ...rene Warren Vail -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 5:13 PM To: Vail, Warren Cc: php Subject: Re: [PHP] Why would a socket be unavailable? Hi Warren, There is only one process, and I'm sure I have only one IP address. It's just one script that loops. At the top of the loop, it waits to socket_read some data. If no data appears, I want it to timeout so that it can send the server a ping (which I must do). THAT is where the problem starts. If I don't bother making the socket_read timeout, the loop works beautifully-it just waits and waits at socket_read, and then when data appears, it does its thing, then goes back to the top of the loop and waits again. It's when I set the timeout option, and then it DOES actually time out (because there is no data for several seconds), that it no longer is able to socket_read data from the connection. .Rene On Thursday, May 13, 2004, at 05:57 PM, Vail, Warren wrote: So you have two processes running, one which is waiting on the socket connection and another, which we have seen, to establish the connection. Doesn't sound to me to be related to performing blocked/non-blocked connections. What are the odds that you have multiple IP addresses on your machine? Can you confirm that both of your processes are using the same IP address (or the ip address of the other process)? Warren Vail -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:49 PM To: Vail, Warren Cc: php Subject: Re: [PHP] Why would a socket be unavailable? There is no firewall-it's all running locally, on my iBook (with Firewall off). You know, I really wish it WAS the firewall. :-) I really can't believe this little problem I'm encountering is because of some bug in the Socket library. I mean, what I'm doing is so simple, and I'm sure hundreds of other PHP programmers have done this before, like, a million times. The whole script is actually very simple: Enter loop If data is received, handle it If data is not received in several seconds, send server a ping .Rene On Thursday, May 13, 2004, at 05:40 PM, Vail, Warren wrote: There is another kind of blocking you could be running into (other than the type mentioned in the manual) and it was eluded to before. What are the odds you are going through a firewall to get to the server. Firewalls will reject attempts to connect to unauthorized sockets on protected machines. Warren Vail -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 4:24 PM To: [EMAIL PROTECTED] Cc: php Subject: Re: [PHP] Why would a socket be unavailable? On Thursday, May 13, 2004, at 05:13 PM, Daniel Clark wrote: http://www.php.net/manual/en/ref.sockets.ph Yes, I've read that page... many times. It has not helped me. That is why I am posting my problem here, in that hopes that someone can help. (I don't mean to be completely helpless, but I just don't yet understand blocking/non-blocking sockets, and the parameters associated, since they are not well-documented. Someone said I shouldn't complain about this-and I'm not-since the functions are marked Experimental. But this is precisely why I'm posting the question here.) .Rene I just read something about sock warnings this morning. It said sometimes they drop off, and to ignore the warnings, but capture the errors. I get this output: PHP Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 63 From this code: do { socket_set_block($socket); socket_set_option($socket,SOL_SOCKET,SO_RCVTIMEO,$timeout); while(($buf = socket_read($socket,128,PHP_BINARY_READ)) !== false) { [...] And it's failing at while. Any ideas? ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Socket client can do one thing (loop), but not the other (loop, timeout, loop again)
Hello everyone, I really appreciate the suggestions so far with my socket client problem. Somebody suggested I repost the issue with the program flow and code, to clarify the situation (a good idea). So here it is: To sumarrize: My socket client runs fine when all it does is (1) wait for data from the server (2) respond to server message (3) then wait again (ad infinitum). E.g., ---THIS WORKS-- Setup and open TCP socket Send a Password_DS to the Server Send a Resend_DS to the Server Enter infinite loop: Wait for messages from the Server Upon receipt of a Send_DS from the Server Respond with a Send_DS_Ack Upon receipt of a Ping_DS from the Server Respond with a Ping_DS_Ack Upon receipt of a Status_DS from the Server Respond with a Status_DS_Ack ---THIS WORKS-- Again, the client loops fine and works wellUNTIL I I try to add one feature: If the Server doesn't send a message for more than five seconds, the socket_read should send Ping_DS to the Server to see if it's still alive, and then, if it is, continue to the top of the loop and wait for another message from the Server. ---THIS DOESN'T WORK-- Setup and open TCP socket Send a Password_DS to the Server Send a Resend_DS to the Server Enter infinite loop: Wait for messages from the Server Upon receipt of a Send_DS from the Server Respond with a Send_DS_Ack Upon receipt of a Ping_DS from the Server Respond with a Ping_DS_Ack Upon receipt of a Status_DS from the Server Respond with a Status_DS_Ack - Periodically, send a Ping_DS to the Server - If the Ping_DS transmit fails - Clean-up and restart the socket connection - If a Ping_DS_Ack is not received from the Server - Clean-up and restart the socket connection ---THIS DOESN'T WORK-- ---PROGRAM OUTPUT-- Socket created. Socket connected to 192.168.0.13:9500. SERVER - CLIENT: 18 (PASSWORD_DS) SERVER - CLIENT: 19 (PASSWORD_DS_ACK) SERVER - CLIENT: 3 (RESEND_DS) MESSAGE RECEIVED SERVER - CLIENT: 23 (STATUS_DS) SERVER - CLIENT: 24 (STATUS_DS_ACK) MESSAGE RECEIVED SERVER - CLIENT: 16 (RESEND_DS_ACK) PHP Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 PHP Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 ---PROGRAM OUTPUT-- ---MY CODE (WHICH DOESN'T WORK)-- $msg_recv = 3; $timeout = array('sec' = 5, 'usec' = 0); // ENTER LOOP do { $data = ; socket_set_block($socket); socket_set_option($socket,SOL_SOCKET,SO_RCVTIMEO,$timeout); while(($buf = socket_read($socket,128,PHP_BINARY_READ)) !== false) { $data .= $buf; if(preg_match(/ENX/,$data)) { $msg_recv = 1; break; } elseif ($error = socket_last_error($socket)) { $msg_recv = 0; echo \nTIMEOUT: SOCKET ERROR [$error]: . socket_strerror($error); break; } } if ($msg_recv == 1) { echo \n\n\nMESSAGE RECEIVED\n; // RECEIVED MESSAGE $msg_type = get_msg_type($data); recv_msg($msg_type); // RESPONSE switch ($msg_type) { case 1: // SEND_DS -- PROCESS MESSAGE, RESPOND $msg_body = get_msg_body($data); send_msg(,$cn[SEND_DS_ACK]); break; case 13: // PING_DS -- RESPOND send_msg(,$cn[PING_DS_ACK]); break; case 23: // STATUS_DS -- UP AND RUNNING -- RESPOND send_msg(,$cn[STATUS_DS_ACK]); break; case 16: // RESEND_DS_ACK -- DO NOTHING break; case 25: // DISCONNECT_DS -- ACKNOWLEDGE, CLOSE SOCKET, REOPEN socket_close($socket);
Re: [PHP] dynamically building insert/update forms from db
generate forms but I still have to create each input..i.e $forms-inputBox(), etc. I want to be able to pass in a table name and have a form returned to me. How do other's handle this? My first thought is to have an xml file that maps the database columns to form elements such as text, radio, etc then when the class is called, it searches the xml file for the passed in name and builds the appropriate form. Is this the best way? I believe there is a PEAR library package that does this. You might want to do some research to see if it fits your needs. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Calendar math .... how to count in week days....?
The PEAR functions didn't seem to do what I was looking for. I built this function based on an idea given to me by Daryl Meese. After much trial and error, it actualy does what I need. My function is bassed on hours but you can easily change that. It will add or subtract days. - Anthony /* buisinessDays * Calculates a new date bassed on buisiness hours * vars: hours to adjust by, timestamp * returns: adjusted timestamp */ function businessDays($hours,$date) { // this function assumes $date is a business day $dayHours=7.5; // set how many hours are in a day // set the days we need to adjust by. there is a one day buffer $days=(abs($hours/$dayHours))+1; // weeks $adjust=604800 * floor($days / 5); // how many days are left over $remain=round($days % 5); // check for negative if ($hours0) { // check to see if we will land on a weekend, and make appropriate adjustment if (date(w,$date)=$remain) { $remain +=2; } // make the time adjustment, 8640 microseconds in a day, times the remaining adjustment $date -=($adjust +(86400 * $remain)); } else { // check to see if we will land on a weekend, and make appropriate adjustment if ((6-date(w,$date))=$remain) { $remain+=2; } // make the time adjustment, 8640 microseconds in a day, times the remaining adjustment $date +=($adjust +(86400 * $remain)); } return $date; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically building insert/update forms from db
I believe there is a PEAR library package that does this. You might want to do some research to see if it fits your needs. Take a look at the following: http://pear.php.net/package/DB_DataObject_FormBuilder Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best way to do Last 3 Items Viewed
Anyone have any code snippits that would allow me to do a Last 3 Items Viewed like on ebay? Thanks, Chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Best way to do Last 3 Items Viewed
Chuck Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Anyone have any code snippits that would allow me to do a Last 3 Items Viewed like on ebay? Thanks, Chuck Why not mark your records with a timestamp at every view and then do a limited select sorted by the timestamp? Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Best way to do Last 3 Items Viewed
Chuck Barnett mailto:[EMAIL PROTECTED] on Friday, May 14, 2004 10:42 AM said: Anyone have any code snippits that would allow me to do a Last 3 Items Viewed like on ebay? no but i can give you a suggestion as to a method... each time someone views an item do a first-in-last-out rotation of a cookie. in other words.. each time you come to a page do the following: (pseudo code) COOKIE['item3'] = COOKIE['item2']; COOKIE['item2'] = COOKIE['item1']; COOKIE['item1'] = $new_value; then you go back and read the three items and you're done. hth, chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php_module and cgi's
I'm running FreeBSD 4.7 REL and Apache 1.3.28 and when I try to load the php4_module it brakes the CGI stuff. I start getting Premature end of script header error. Has anyone seen this. Don 8) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: dynamically building insert/update forms from db
Edward Peloke wrote: I was up late last night creating insert and update forms for tables in my db and knew there had to be a better way. I do have a class that will generate forms but I still have to create each input..i.e $forms-inputBox(), etc. I want to be able to pass in a table name and have a form returned to me. How do other's handle this? My first thought is to have an xml file that maps the database columns to form elements such as text, radio, etc then when the class is called, it searches the xml file for the passed in name and builds the appropriate form. Is this the best way? Thanks, Eddie PEAR's DB_DataObject_FormBuilder will do this. You have to get DB and DB_DataObject set up, but it's not too hard to do. Mail me if you need more help (but read the docs first). http://pear.php.net/package/DB http://pear.php.net/package/DB_DataObject http://pear.php.net/package/DB_DataObject_FormBuilder -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically building insert/update forms from db
CB I believe there is a PEAR library package that does this. You might CB want to do some research to see if it fits your needs. Yes, there is. Check out PEAR::DB or PEAR::MDB which both have good classes for preparing INSERT and UPDATE statements, as well as for finding out information about what columns and datatypes a table has (which is what I think you are most interested in). These are really easy-to-use classes, too. Then, I would also suggest checking out the PEAR::HTML_QuickForm class, as it has functions you can use to generate HTML forms. -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SuExec and PHP
I sent this a couple days ago and haven't heard a peep. Can anyone help me? Or, is there a better place I could be asking these questions? cheers, Travis Travis Low wrote: Greetings. We have a need for our PHP scripts to run as the user and group associated with each Apache virtual domain on our Redhat server. Currently, all PHP scripts run as nobody.nobody. I know that the apache suexec module allows CGI scripts to run as the user and group of the virtual host, but that doesn't seem to be the case for PHP scripts run under the apache php module (mod_php). So my questions are: (1) Can we use suexec to force PHP scripts (running under mod_php) to run as the user/group associated with the virtual host? If so, how? Are there any special configuration tricks to make this happen? (2) If we CAN'T use suexec with mod_php, I assume we can run PHP as CGI to solve our problem. However, I'm worried about performance. Have any of you done this on linux? Is it difficult to configure? Do you have to audit all of your PHP scripts? Etc., etc. I did read the pages http://www.php.net/security.cgi_bin and http://www.php.net/manual/en/security.apache.php, but did not come away with clear answers to my questions. There were also a lot of contradictory comments at the bottom of those pages, and a whole mess of stuff on google, so I'm getting more lost, not less. Please help! cheers, Travis -- Travis Low mailto:[EMAIL PROTECTED] http://www.dawnstar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Breaks on socket_read
Can anyone suggest why this script (well, part of the script) fails on the while(($bug=socket_read... line after it successfully loops several times? (Of course, it is only after it timesout, but that is what I need it to do.) ---CODE-- $msg_recv = 3; $timeout = array('sec' = 5, 'usec' = 0); // ENTER LOOP do { $data = ; socket_set_block($socket); socket_set_option($socket,SOL_SOCKET,SO_RCVTIMEO,$timeout); while(($buf = socket_read($socket,128,PHP_BINARY_READ)) !== false) { $data .= $buf; ---OUTPUT-- PHP Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 PHP Warning: socket_read() unable to read from socket [35]: Resource temporarily unavailable in /Users/rene/Sites/gpspolice/titan/cr.php on line 65 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Template Engine
I was just wondering if anyone had any good advice or tutorials on building a simple template engine system. I am woking on a small project that I would like to distribute, and I would of course like to separate logic from html. I really just want to know the basics without caching. I am familiar with Smarty and PHPLib and FastTemplate and some others. But since I am going to be distributing the app, I would like it as portable and small/simple as possible. Those template systems are overkill for what I need. Really it does not even have to be a Template system, I would just like to here your thoughts on how you may have accomplished separation of logic from output in a simple way. Thanks, George
Re: [PHP] dynamically building insert/update forms from db
Ben Ramsey wrote: CB I believe there is a PEAR library package that does this. You might CB want to do some research to see if it fits your needs. Yes, there is. Check out PEAR::DB or PEAR::MDB which both have good classes for preparing INSERT and UPDATE statements, as well as for finding out information about what columns and datatypes a table has (which is what I think you are most interested in). These are really easy-to-use classes, too. Then, I would also suggest checking out the PEAR::HTML_QuickForm class, as it has functions you can use to generate HTML forms. BTW, DB_DataObject_FormBuilder uses DB and HTML_QuickForm to automate this for you . ;-) -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template Engine
On Fri, 2004-05-14 at 16:13, George Lantz wrote: I was just wondering if anyone had any good advice or tutorials on building a simple template engine system. I am woking on a small project that I would like to distribute, and I would of course like to separate logic from html. I really just want to know the basics without caching. I am familiar with Smarty and PHPLib and FastTemplate and some others. But since I am going to be distributing the app, I would like it as portable and small/simple as possible. Those template systems are overkill for what I need. Really it does not even have to be a Template system, I would just like to here your thoughts on how you may have accomplished separation of logic from output in a simple way. If simple is what you want, then write your business logic into library files that you can include at the top of your source page. Then use functions which just output the content. As many will argue, PHP is a template engine in its own right, and for your simple purposes then it is probably perfect. Separation in this case just requires you keep your business logic in include files either as simple functiosn or as classes of related behaviour. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session variables not working
I'm trying to set the following two vars on one page then read their values on another like this: page1.php... ob_start(); session_start(); $_SESSION['member_id'] = $member_id; $_SESSION['password'] = $password; ob_end_flush(); page2.php... ob_start(); session_start(); $member_id = $_SESSION['member_id']; $password $_SESSION['password']; ob_end_flush(); But on page2.php the variables are null. Can anyone help me out with this. I must be doing something really obvious wrong. Thanks AW -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variables not working
- Original Message - From: Andrew Wood [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 14, 2004 4:48 PM Subject: [PHP] Session variables not working I'm trying to set the following two vars on one page then read their values on another like this: [snip] But on page2.php the variables are null. Can anyone help me out with this. I must be doing something really obvious wrong. How are you getting from page 1 to page 2? Is a session cookie being set? Are page 1 and page 2 on the same domain? Do you see a PHPSESSID in the URL? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variables not working
Using a cookie which is shown in my browser as PHPSESSID Yes they're on the same domain but no there's nothing being passed accross the URL. Should there be? AW On 14 May 2004, at 21:59, John W. Holmes wrote: - Original Message - From: Andrew Wood [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 14, 2004 4:48 PM Subject: [PHP] Session variables not working I'm trying to set the following two vars on one page then read their values on another like this: [snip] But on page2.php the variables are null. Can anyone help me out with this. I must be doing something really obvious wrong. How are you getting from page 1 to page 2? Is a session cookie being set? Are page 1 and page 2 on the same domain? Do you see a PHPSESSID in the URL? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variables not working
From: Andrew Wood [EMAIL PROTECTED] Using a cookie which is shown in my browser as PHPSESSID Yes they're on the same domain but no there's nothing being passed accross the URL. Should there be? No, not normally. How are you getting from page 1 to page 2? page1.php... ob_start(); session_start(); $_SESSION['member_id'] = $member_id; $_SESSION['password'] = $password; ob_end_flush(); page2.php... ob_start(); session_start(); $member_id = $_SESSION['member_id']; $password $_SESSION['password']; ob_end_flush(); What's with the output buffering functions? Are you sure $member_id and $password have a value in the first script? I assume there is more code to this, or no? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variables not working
On Fri, 2004-05-14 at 14:48, Andrew Wood wrote: I'm trying to set the following two vars on one page then read their values on another like this: page1.php... ob_start(); session_start(); $_SESSION['member_id'] = $member_id; $_SESSION['password'] = $password; ob_end_flush(); Where are $member_id and $password coming from? page2.php... ob_start(); session_start(); $member_id = $_SESSION['member_id']; $password $_SESSION['password']; ob_end_flush(); I think you want $password = $_SESSION['password']; But on page2.php the variables are null. Can anyone help me out with this. I must be doing something really obvious wrong. Where are you outputting the variables to see what they are? You might want to add a print_r($_SESSION) to see what is there. The ob_* functions don't cause any output of variables, they only output what you output within them (if that makes sense). For example: ob_start(); echo 'Hi'; ob_end_flush(); - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session variables not working
Either typing the URL directly or by using a hyperlink. On 14 May 2004, at 22:09, John W. Holmes wrote: From: Andrew Wood [EMAIL PROTECTED] Using a cookie which is shown in my browser as PHPSESSID Yes they're on the same domain but no there's nothing being passed accross the URL. Should there be? No, not normally. How are you getting from page 1 to page 2? page1.php... ob_start(); session_start(); $_SESSION['member_id'] = $member_id; $_SESSION['password'] = $password; ob_end_flush(); page2.php... ob_start(); session_start(); $member_id = $_SESSION['member_id']; $password $_SESSION['password']; ob_end_flush(); What's with the output buffering functions? Are you sure $member_id and $password have a value in the first script? I assume there is more code to this, or no? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD createpng and getting different png formats
Hi all, I've recently got the GD libraries set up and working with php and I have been resizing and reformating images to my hearts content. One thing I notice however is that when I output png images they seem by default to come out in the larger size PNG32 format, as opposed to the lightweight PNG8 format that I would prefer. I've checked the archives and googled and found no direct reference to this issue. If anybody can tell me how to adjust the png output format php I'd be very grateful. Although I have the feeling that this might well require hacking away at the gd source Thanks in advance. CHEERS SAM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Looking For Easy To Use Shopping Cart
Can anyone recommend a good open source shopping cart solution? I built an application for custom websites, now, I just need to interface to a shopping cart. I'm using mysql. Any suggestions? ...looking for something easy. Thanks, Ryan
[PHP] Missing data types?
I need to pack() data in PHP according to a typedef'ed C format structure, but there seems to be two problems (as per the docs: http://ca.php.net/manual/en/function.pack.php). First, in PHP there is no format option for long signed integers, big-endian byte order, just signed long (always 32 bit, machine byte order). Or am I missing something? Secondand I guess this is not a problem with PHP per se, just a question of interpretationthe client specifications call for a certain 10-digit string to be packed as char ( char[10] ). But char is just a single character right? Or do you think the docs essentially mean packing it as an alpha? (Whose length can be specified.) $str = 1234567890; $packed = pack(a10string,$str); ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] tracking ip and its location
Hello Tom, Friday, May 14, 2004, 7:21:39 PM, you wrote: TC Try: TC http://www.1phpstreet.com/vb/scripts/ShowCode.asp?txtCodeId=318lngWId=8 TC Regards, TC Tom so, where i can download the list of countries and its ip address ? thx -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Looking For Easy To Use Shopping Cart
Ryan Schefke wrote: Can anyone recommend a good open source shopping cart solution? I built an application for custom websites, now, I just need to interface to a shopping cart. I'm using mysql. Any suggestions? ...looking for something easy. Thanks, Ryan Well... Do you mean that you've created a storefront already and need a cart, or do you need the whole thing? There really isn't any only cart software, they all include a storefront. From what I've seen, Zen Cart is pretty well featured and is open source and free. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD createpng and getting different png formats
IIRC, the goal of PNG is lossless output and it outputs that exactly with PHP. What you send is what you get out. When you're using GD, I suggest you make an 8 bit GD image resource, then make that into PNG. There are several functions dealing with converting bit depth and such, poke around the GD image reference section in the PHP manual. Sorry if this is too vague, it's all off the top of my head but I think it will give you enough to go on. -Galen On May 14, 2004, at 3:05 PM, Sam Joseph wrote: Hi all, I've recently got the GD libraries set up and working with php and I have been resizing and reformating images to my hearts content. One thing I notice however is that when I output png images they seem by default to come out in the larger size PNG32 format, as opposed to the lightweight PNG8 format that I would prefer. I've checked the archives and googled and found no direct reference to this issue. If anybody can tell me how to adjust the png output format php I'd be very grateful. Although I have the feeling that this might well require hacking away at the gd source Thanks in advance. CHEERS SAM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Looking For Easy To Use Shopping Cart
There are several tutorials that are just the cart, probably some minimal code typing and fixing for your needs. MyMarket found on SourceForge is one. There was one on Monkey Junkies. FreeTrade is good. dan mccullough sr. engineer url: heathermccullough.com tf: 866.298.3991 w: 603.444.9808 There is no such thing as a problem, unless the servers are on fire. Sometimes great opportunity comes brilliantly disguised as bad news. -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 6:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Looking For Easy To Use Shopping Cart Ryan Schefke wrote: Can anyone recommend a good open source shopping cart solution? I built an application for custom websites, now, I just need to interface to a shopping cart. I'm using mysql. Any suggestions? ...looking for something easy. Thanks, Ryan Well... Do you mean that you've created a storefront already and need a cart, or do you need the whole thing? There really isn't any only cart software, they all include a storefront. From what I've seen, Zen Cart is pretty well featured and is open source and free. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD createpng and getting different png formats
Hi Galen, Many thanks for your reply. I tried to find things in the php manual relating to bit depth, but I didn't find anything relevant: http://www.google.co.jp/search?sourceid=navclienthl=jaie=UTF-8oe=UTF-8q=site:www%2Ephp%2Enet+bit+depth I haven't read every single one of the image functions in detail, but I did look through them all, and at the moment I can't see anything that allows me to manipulate the bit depth. The closest thing I can see is the imagecolorstotal function which returns the number of colors in the specified image's palette. Apologies if I'm missing something obvious, but if anybody knows about a specific function that does this I'd be very interested to hear about it. Many thanks in advance. CHEERS SAM Galen wrote: IIRC, the goal of PNG is lossless output and it outputs that exactly with PHP. What you send is what you get out. When you're using GD, I suggest you make an 8 bit GD image resource, then make that into PNG. There are several functions dealing with converting bit depth and such, poke around the GD image reference section in the PHP manual. Sorry if this is too vague, it's all off the top of my head but I think it will give you enough to go on. -Galen On May 14, 2004, at 3:05 PM, Sam Joseph wrote: Hi all, I've recently got the GD libraries set up and working with php and I have been resizing and reformating images to my hearts content. One thing I notice however is that when I output png images they seem by default to come out in the larger size PNG32 format, as opposed to the lightweight PNG8 format that I would prefer. I've checked the archives and googled and found no direct reference to this issue. If anybody can tell me how to adjust the png output format php I'd be very grateful. Although I have the feeling that this might well require hacking away at the gd source Thanks in advance. CHEERS SAM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Looking For Easy To Use Shopping Cart
I want my customer to be able to select a few options via radio buttons (12 months or 24 months - how many photos in their photo album, etc) that impact the price. Then, I want the customer to click a checkout link that takes them directly to a form to input billing address and credit card information. Any recommendations/guidance? I'm calling around and speaking to payment gateways and merchant account providers but wanted to tap into the open source community to see what's out there that can fit my needs. I really don't think this is that complex of a task, or maybe it is? Thanks, Ryan -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 6:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Looking For Easy To Use Shopping Cart Ryan Schefke wrote: Can anyone recommend a good open source shopping cart solution? I built an application for custom websites, now, I just need to interface to a shopping cart. I'm using mysql. Any suggestions? ...looking for something easy. Thanks, Ryan Well... Do you mean that you've created a storefront already and need a cart, or do you need the whole thing? There really isn't any only cart software, they all include a storefront. From what I've seen, Zen Cart is pretty well featured and is open source and free. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Looking For Easy To Use Shopping Cart
Ryan Schefke wrote: I want my customer to be able to select a few options via radio buttons (12 months or 24 months - how many photos in their photo album, etc) that impact the price. Then, I want the customer to click a checkout link that takes them directly to a form to input billing address and credit card information. Any recommendations/guidance? I'm calling around and speaking to payment gateways and merchant account providers but wanted to tap into the open source community to see what's out there that can fit my needs. I really don't think this is that complex of a task, or maybe it is? Thanks, Ryan -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 6:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Looking For Easy To Use Shopping Cart Ryan Schefke wrote: Can anyone recommend a good open source shopping cart solution? I built an application for custom websites, now, I just need to interface to a shopping cart. I'm using mysql. Any suggestions? ...looking for something easy. Thanks, Ryan Well... Do you mean that you've created a storefront already and need a cart, or do you need the whole thing? There really isn't any only cart software, they all include a storefront. From what I've seen, Zen Cart is pretty well featured and is open source and free. No, it's not that complex. And if you want something simple, you may want to make your own cart and use something like PEAR's Payment_Process to deal with the payments. That said, I believe that Zen Cart does product options, but don't quote me on that, I've never actually used it myself, just looked. ;-) -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to duplicate this functionality?
Hi, I just visited a popular swedish based site that is mostly powered via ASP, they have one little piece of functionality this is really puzzling me and I would like to add it to one of my working apps (a shopping cart)... Its a bit hard to explain so will give you the steps so you can go to the site and see for yourself...Its all pretty much written in swedish but will try to explain. 1. go to http://www.blocket.se/ 2. on the right side of the screen there are some numbers (1 to 23) and next to each number is a Swedish city...click on any one of them. 3. You should be presented by a lot of text ads...click on any one of them to open them (the ones with teh little camera symbol at the side will also display a pic of the product) 4.Scroll to the bottom of any ad and you should see Spara i Annonsbevakningen which roughly translates to save this ad...click it. It will save the ad for you (via cookies most probably..dont know for sure...but I visited much later and even after I closed-reopened my browser and revisited the site,it was still there) 5.Click the back button a few times so that you can save a bunch of ads...then This is the part I like, when you click on Ta bort next to any of your saved ads (Ta bort means Remove)...it just goes from the page...very smooth and does not need for the page to be script processed again or anything...HOW? What is it? Javascript..? DHTML? what? Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Looking For Easy To Use Shopping Cart
That's very simple. If you don't mind writing a bit of specific code you could do it in about an hour, there are many snippets of code for payment processors that you could use. Try Hotscripts.com. dan mccullough sr. engineer url: heathermccullough.com tf: 866.298.3991 w: 603.444.9808 There is no such thing as a problem, unless the servers are on fire. Sometimes great opportunity comes brilliantly disguised as bad news. -Original Message- From: Ryan Schefke [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 8:05 PM To: 'Justin Patrin'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Looking For Easy To Use Shopping Cart I want my customer to be able to select a few options via radio buttons (12 months or 24 months - how many photos in their photo album, etc) that impact the price. Then, I want the customer to click a checkout link that takes them directly to a form to input billing address and credit card information. Any recommendations/guidance? I'm calling around and speaking to payment gateways and merchant account providers but wanted to tap into the open source community to see what's out there that can fit my needs. I really don't think this is that complex of a task, or maybe it is? Thanks, Ryan -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 6:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Looking For Easy To Use Shopping Cart Ryan Schefke wrote: Can anyone recommend a good open source shopping cart solution? I built an application for custom websites, now, I just need to interface to a shopping cart. I'm using mysql. Any suggestions? ...looking for something easy. Thanks, Ryan Well... Do you mean that you've created a storefront already and need a cart, or do you need the whole thing? There really isn't any only cart software, they all include a storefront. From what I've seen, Zen Cart is pretty well featured and is open source and free. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Looking For Easy To Use Shopping Cart
http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Roll-Out-Your-Cart /619 very very simple. The problem with most e-commerce carts out there is that they come with more then just the cart piece, they have all the product and ancillary pages and you have to weed through their design. That's why I suggest a tutorial as they usually only have the cart piece. http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Building-an-E-Comm erce-Site-Part-1-Building-a-Product-Catalog/622 http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Building-an-E-Comm erce-Site-Part-2-Managing-Users-with-Sessions/623 http://tutorialized.com/tutorials/PHP/E-Commerce/tutorial/Building-an-E-Comm erce-Site-Part-3-Catalogs-and-Shopping-Carts/624 A little more involved. dan mccullough sr. engineer url: heathermccullough.com tf: 866.298.3991 w: 603.444.9808 There is no such thing as a problem, unless the servers are on fire. Sometimes great opportunity comes brilliantly disguised as bad news. -Original Message- From: Ryan Schefke [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 8:05 PM To: 'Justin Patrin'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Looking For Easy To Use Shopping Cart I want my customer to be able to select a few options via radio buttons (12 months or 24 months - how many photos in their photo album, etc) that impact the price. Then, I want the customer to click a checkout link that takes them directly to a form to input billing address and credit card information. Any recommendations/guidance? I'm calling around and speaking to payment gateways and merchant account providers but wanted to tap into the open source community to see what's out there that can fit my needs. I really don't think this is that complex of a task, or maybe it is? Thanks, Ryan -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 6:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Looking For Easy To Use Shopping Cart Ryan Schefke wrote: Can anyone recommend a good open source shopping cart solution? I built an application for custom websites, now, I just need to interface to a shopping cart. I'm using mysql. Any suggestions? ...looking for something easy. Thanks, Ryan Well... Do you mean that you've created a storefront already and need a cart, or do you need the whole thing? There really isn't any only cart software, they all include a storefront. From what I've seen, Zen Cart is pretty well featured and is open source and free. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD createpng and getting different png formats
Sam, OK, sorry, I only had a few moments before. Let's see if this points you in the right direction. Basically, you can have standard 8-bit images (color) and then true color images (24 bit). When you create the GD image resource, you use a function to do that. One such function is imagecreate() - this generates a palette based image that (IIRC, 8 bit or less) will compress to that smaller PNG 8 file. imagecreatetruecolor() typically makes full-depth (true color) images that become PNG 24/32 and support transparency and everything. You may find imagetruecolortopalette() also of interest as it transforms a true color image into a palette based image. So the distinction is this: true color = 32 bit (24 bit + alpha channel), palette based = exact number of colors + no alpha channel I may be subtly wrong on a few of these smaller points, and please accept my apologies if I am, but the gist is that you need a palette-based image to get 8-bit PNGs! -Galen On May 14, 2004, at 4:27 PM, Sam Joseph wrote: Hi Galen, Many thanks for your reply. I tried to find things in the php manual relating to bit depth, but I didn't find anything relevant: http://www.google.co.jp/search?sourceid=navclienthl=jaie=UTF -8oe=UTF-8q=site:www%2Ephp%2Enet+bit+depth I haven't read every single one of the image functions in detail, but I did look through them all, and at the moment I can't see anything that allows me to manipulate the bit depth. The closest thing I can see is the imagecolorstotal function which returns the number of colors in the specified image's palette. Apologies if I'm missing something obvious, but if anybody knows about a specific function that does this I'd be very interested to hear about it. Many thanks in advance. CHEERS SAM Galen wrote: IIRC, the goal of PNG is lossless output and it outputs that exactly with PHP. What you send is what you get out. When you're using GD, I suggest you make an 8 bit GD image resource, then make that into PNG. There are several functions dealing with converting bit depth and such, poke around the GD image reference section in the PHP manual. Sorry if this is too vague, it's all off the top of my head but I think it will give you enough to go on. -Galen On May 14, 2004, at 3:05 PM, Sam Joseph wrote: Hi all, I've recently got the GD libraries set up and working with php and I have been resizing and reformating images to my hearts content. One thing I notice however is that when I output png images they seem by default to come out in the larger size PNG32 format, as opposed to the lightweight PNG8 format that I would prefer. I've checked the archives and googled and found no direct reference to this issue. If anybody can tell me how to adjust the png output format php I'd be very grateful. Although I have the feeling that this might well require hacking away at the gd source Thanks in advance. CHEERS SAM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to duplicate this functionality?
On Fri, 2004-05-14 at 21:23, Ryan A wrote: Hi, I just visited a popular swedish based site that is mostly powered via ASP, they have one little piece of functionality this is really puzzling me and I would like to add it to one of my working apps (a shopping cart)... Its a bit hard to explain so will give you the steps so you can go to the site and see for yourself...Its all pretty much written in swedish but will try to explain. 1. go to http://www.blocket.se/ 2. on the right side of the screen there are some numbers (1 to 23) and next to each number is a Swedish city...click on any one of them. 3. You should be presented by a lot of text ads...click on any one of them to open them (the ones with teh little camera symbol at the side will also display a pic of the product) 4.Scroll to the bottom of any ad and you should see Spara i Annonsbevakningen which roughly translates to save this ad...click it. It will save the ad for you (via cookies most probably..dont know for sure...but I visited much later and even after I closed-reopened my browser and revisited the site,it was still there) 5.Click the back button a few times so that you can save a bunch of ads...then This is the part I like, when you click on Ta bort next to any of your saved ads (Ta bort means Remove)...it just goes from the page...very smooth and does not need for the page to be script processed again or anything...HOW? What is it? Javascript..? DHTML? what? In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That said looking at the URL when the mouse is over the link: http://www.blocket.se/new?caller=ogl_sl=0rm_id=2595475city=0 The rm_id is being set as a GET variable with an appropriate ID to remove the entry. So when the page reloads it first deletes the entry. This is standard functionality in many websites. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to duplicate this functionality?
Hey Rob snip In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That said looking at the URL when the mouse is over the link: http://www.blocket.se/new?caller=ogl_sl=0rm_id=2595475city=0 The rm_id is being set as a GET variable with an appropriate ID to remove the entry. So when the page reloads it first deletes the entry. This is standard functionality in many websites. /snip Hmmm..for IE it didnt reload the page...or reloaded the page so fast that I couldnt make out the reload and the product just seemed to disappear...very smoothly...thats why I was impressed... I did make a note of the rm_id and saw that everything was a GET stringbut didnt know how it was deleteing the text from the page so fast... Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD createpng and getting different png formats
Hi Galen, Thanks for that - all sorted now. I had looked at imagetruecolortopalette, but had not taken it on board. I'm now using it as follows to get a balance between image quality and file size (for png output): imagetruecolortopalette ( $myImage, true, 64); It's just remarkable how much better quality I can get for a given size with jpeg as opposed to png - but then I'm unable to use jpeg for my current application. Many, many thanks for your help. CHEERS SAM Galen wrote: Sam, OK, sorry, I only had a few moments before. Let's see if this points you in the right direction. Basically, you can have standard 8-bit images (color) and then true color images (24 bit). When you create the GD image resource, you use a function to do that. One such function is imagecreate() - this generates a palette based image that (IIRC, 8 bit or less) will compress to that smaller PNG 8 file. imagecreatetruecolor() typically makes full-depth (true color) images that become PNG 24/32 and support transparency and everything. You may find imagetruecolortopalette() also of interest as it transforms a true color image into a palette based image. So the distinction is this: true color = 32 bit (24 bit + alpha channel), palette based = exact number of colors + no alpha channel I may be subtly wrong on a few of these smaller points, and please accept my apologies if I am, but the gist is that you need a palette-based image to get 8-bit PNGs! -Galen On May 14, 2004, at 4:27 PM, Sam Joseph wrote: Hi Galen, Many thanks for your reply. I tried to find things in the php manual relating to bit depth, but I didn't find anything relevant: http://www.google.co.jp/search?sourceid=navclienthl=jaie=UTF -8oe=UTF-8q=site:www%2Ephp%2Enet+bit+depth I haven't read every single one of the image functions in detail, but I did look through them all, and at the moment I can't see anything that allows me to manipulate the bit depth. The closest thing I can see is the imagecolorstotal function which returns the number of colors in the specified image's palette. Apologies if I'm missing something obvious, but if anybody knows about a specific function that does this I'd be very interested to hear about it. Many thanks in advance. CHEERS SAM Galen wrote: IIRC, the goal of PNG is lossless output and it outputs that exactly with PHP. What you send is what you get out. When you're using GD, I suggest you make an 8 bit GD image resource, then make that into PNG. There are several functions dealing with converting bit depth and such, poke around the GD image reference section in the PHP manual. Sorry if this is too vague, it's all off the top of my head but I think it will give you enough to go on. -Galen On May 14, 2004, at 3:05 PM, Sam Joseph wrote: Hi all, I've recently got the GD libraries set up and working with php and I have been resizing and reformating images to my hearts content. One thing I notice however is that when I output png images they seem by default to come out in the larger size PNG32 format, as opposed to the lightweight PNG8 format that I would prefer. I've checked the archives and googled and found no direct reference to this issue. If anybody can tell me how to adjust the png output format php I'd be very grateful. Although I have the feeling that this might well require hacking away at the gd source Thanks in advance. CHEERS SAM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to duplicate this functionality?
It's fairly simple: at the top of your script, have a block of code similar to the following, and have the link point to -- $_SERVER['PHP_SELF'].?rm_id=.$id_to_be_deleted -- I'll leave out all but the essential elements. code ?php if (isset($_GET['rm_id'])) { $query = REMOVE FROM whatever WHERE id = .$_GET['rm_id']. LIMIT 1; mysql_query($query); } ? /code Will Collins -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 8:49 PM To: Ryan A Cc: PHP-General Subject: Re: [PHP] How to duplicate this functionality? On Fri, 2004-05-14 at 21:23, Ryan A wrote: Hi, I just visited a popular swedish based site that is mostly powered via ASP, they have one little piece of functionality this is really puzzling me and I would like to add it to one of my working apps (a shopping cart)... Its a bit hard to explain so will give you the steps so you can go to the site and see for yourself...Its all pretty much written in swedish but will try to explain. 1. go to http://www.blocket.se/ 2. on the right side of the screen there are some numbers (1 to 23) and next to each number is a Swedish city...click on any one of them. 3. You should be presented by a lot of text ads...click on any one of them to open them (the ones with teh little camera symbol at the side will also display a pic of the product) 4.Scroll to the bottom of any ad and you should see Spara i Annonsbevakningen which roughly translates to save this ad...click it. It will save the ad for you (via cookies most probably..dont know for sure...but I visited much later and even after I closed-reopened my browser and revisited the site,it was still there) 5.Click the back button a few times so that you can save a bunch of ads...then This is the part I like, when you click on Ta bort next to any of your saved ads (Ta bort means Remove)...it just goes from the page...very smooth and does not need for the page to be script processed again or anything...HOW? What is it? Javascript..? DHTML? what? In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That said looking at the URL when the mouse is over the link: http://www.blocket.se/new?caller=ogl_sl=0rm_id=2595475city=0 The rm_id is being set as a GET variable with an appropriate ID to remove the entry. So when the page reloads it first deletes the entry. This is standard functionality in many websites. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to duplicate this functionality?
* Thus wrote Ryan A ([EMAIL PROTECTED]): Hey Rob snip In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That said looking at the URL when the mouse is over the link: http://www.blocket.se/new?caller=ogl_sl=0rm_id=2595475city=0 The rm_id is being set as a GET variable with an appropriate ID to remove the entry. So when the page reloads it first deletes the entry. This is standard functionality in many websites. /snip Hmmm..for IE it didnt reload the page...or reloaded the page so fast that I couldnt make out the reload and the product just seemed to disappear...very smoothly...thats why I was impressed... You might want to complain to your ISP that your connection is too fast :) I did make a note of the rm_id and saw that everything was a GET stringbut didnt know how it was deleteing the text from the page so fast... The rendering is fast because its a simple page and utilizes the browser's cache effeciently (css link, cached small images, etc.) Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php-general Digest 14 May 2004 22:05:59 -0000 Issue 2763
How are you restarting the socket? From memory you can't just reuse a socket you would need to create a new socket. What does netstat say about the status of your connection before and after? -Periodically, send a Ping_DS to the Server -If the Ping_DS transmit fails -Clean-up and restart the socket connection -If a Ping_DS_Ack is not received from the Server -Clean-up and restart the socket connection ---THIS DOESN'T WORK-- Graeme. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to duplicate this functionality?
Also, I forgot to mention... another little snippet I like to use for something like this is this meta tag: META HTTP-EQUIV=Page-Enter Content=blendtrans(duration=.1) It makes the pages fade into each other, and for two pages that are very similar (like your example) it doesn't look like there's any reload at all. It has a pretty cool effect when you up the duration and use it for totally different pages too... it's just really fun to play with. Just stick it into the header of your page. Will Collins -Original Message- From: Will Collins [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 9:17 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] How to duplicate this functionality? It's fairly simple: at the top of your script, have a block of code similar to the following, and have the link point to -- $_SERVER['PHP_SELF'].?rm_id=.$id_to_be_deleted -- I'll leave out all but the essential elements. code ?php if (isset($_GET['rm_id'])) { $query = REMOVE FROM whatever WHERE id = .$_GET['rm_id']. LIMIT 1; mysql_query($query); } ? /code Will Collins -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 8:49 PM To: Ryan A Cc: PHP-General Subject: Re: [PHP] How to duplicate this functionality? On Fri, 2004-05-14 at 21:23, Ryan A wrote: Hi, I just visited a popular swedish based site that is mostly powered via ASP, they have one little piece of functionality this is really puzzling me and I would like to add it to one of my working apps (a shopping cart)... Its a bit hard to explain so will give you the steps so you can go to the site and see for yourself...Its all pretty much written in swedish but will try to explain. 1. go to http://www.blocket.se/ 2. on the right side of the screen there are some numbers (1 to 23) and next to each number is a Swedish city...click on any one of them. 3. You should be presented by a lot of text ads...click on any one of them to open them (the ones with teh little camera symbol at the side will also display a pic of the product) 4.Scroll to the bottom of any ad and you should see Spara i Annonsbevakningen which roughly translates to save this ad...click it. It will save the ad for you (via cookies most probably..dont know for sure...but I visited much later and even after I closed-reopened my browser and revisited the site,it was still there) 5.Click the back button a few times so that you can save a bunch of ads...then This is the part I like, when you click on Ta bort next to any of your saved ads (Ta bort means Remove)...it just goes from the page...very smooth and does not need for the page to be script processed again or anything...HOW? What is it? Javascript..? DHTML? what? In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That said looking at the URL when the mouse is over the link: http://www.blocket.se/new?caller=ogl_sl=0rm_id=2595475city=0 The rm_id is being set as a GET variable with an appropriate ID to remove the entry. So when the page reloads it first deletes the entry. This is standard functionality in many websites. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php