[PHP] Re: CVS In PHP
Either use exec() to run a command line script. Or investigate creating a php module or something. -- --- JJ Harrison [EMAIL PROTECTED] "Trilochan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello > Every body , I have written some programs in c , I want to run those > programs in my PHP script. Is there any way to do that . > > Any suggestion is highly appreciated. > > > Regards > Trilochan > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL+php
it doesn't change it in the database, just in the output. Thomas On Sun, 19 Jan 2003 03:17:04 +0200 (EET) [EMAIL PROTECTED] (Paul Marinas) wrote: > something like that only i don't whant to alter the database, the fields > in the database must remains unchanged, only, on page i whant to display > diferent data. > > On Sun, 19 Jan 2003, Sean Malloy wrote: > > > If you want to do it within the query itself, take a look at the mysql > > replace command > > > > REPLACE(str,from_str,to_str) > > > > SELECT REPLACE(,,) FROM table > > > > or you can do it using PHP once the query has executed, on a record by > > record basis, within a while/for loop or whatever. > > > > -Original Message- > > From: Paul Marinas [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, 19 January 2003 11:07 AM > > Cc: [EMAIL PROTECTED] > > Subject: [PHP] SQL+php > > > > > > Dose anyone know how to search and replace a string in a > > mysql_query output. > > > > Thanks, Paul > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Thomas Seifert mailto:[EMAIL PROTECTED] http://www.MyPhorum.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL+php
Sean Malloy wrote: I see a lot of these type of answers on the list at the moment. I'm sick of receiving smart ass answers from people. It wastes my time, and my bandwidth. Either answer the fucking question, even if it hasn't been asked correctly, or don't reply at all. Given you are a 'PHP Professional' John, I would expect a little more from you. I thought Johns response was humorous and to the point ... John has shown a tremendous willingness to help people on this list - and I can undertsand him getting frustrated by the number of unclear questions... I sometimes read this list and see if there is anything I can give back to the community ... ..but often give up trying to find questions I can answer in amongst the cryptic posts some people seem to think are a way of asking for help. I think the bandwidth wasters are those who ask questions poorly (it takes several follow up mails to find out what the question was) and those who don't have a qucik look at the archives first (is someone puuting together an FAQ ?) -- Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How know how many sessions are active?
Sorry I'm novice. There is a way to know how many sessions are active and to get variables or the id of them? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Encoders and GPL License
At 02:45 18/01/2003, [-^-!-%- wrote: Food for thought: As I look through the Zend website, and applaud their efforts to create 'protected' php applications, I can't help but wonder about the impact (or lagality) or their efforts. Doesn't the use of the Zend Encoder (or any other PHP Encoders out there) violate the GPL License or the whole Open Source Concept? As far as I understand it, the GPL License states that the source code of any product created from an open source solutions, or is derived from the work of an open solutions, must be made availabe to all users. Since PHP itself is open source, then wouldn't that prohibit a developer from encoding any PHP product? Please correct me, if I'm wrong. I'm just curious. You're wrong for two reasons: [1] As other people mentioned here, PHP (or in that case, the Zend Engine, PHP's core) is not under the GPL license. Since it is under a BSD style license, people are free to use it for commercial ventures in any and all levels. [2] Even if the Zend Engine was under the GPL, the authors of the software always have the right to use their software in whatever way they see fit, and relicense it under any other licenses. In this case, the author of the Zend Engine is the same as one that publishes the Zend Encoder, so there's really no problem at all. Zeev -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How know how many sessions are active?
If you're on a dedicated server (no other sites on the server), you could just count the session files in /tmp. Otherwise, the general consensus seems to be that you need to decide how long a user is "active" for (say a minute, or 3, or an hour?), and save (eg) the SID and timestamp in a file or MySQL table. In theory, you then count the number of sessions that were created or reactivated (restamped) within your definition of "active" time (eg 3 mins). This has been discussed waaay too many time on the list... do a search on the archives for 'active users', perhaps also try a search with the word "ASP" too :) Justin on 19/01/03 10:27 PM, Jeremías Grunge ([EMAIL PROTECTED]) wrote: > Sorry I'm novice. > > There is a way to know how many sessions are active and to get variables or > the id of them? > > Thanks > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Encoders and GPL License
I just want to clarify this for myself. My impression was that the affects of GPL requiring software developed from the original GPL to also be free was only applicable to modifications of the program itself. So if php was GPL and I modified the source and built my own customized version of php I couldn't sell it but could only give it away, but if I used php to develop some other software that runs on php I could sell it without a problem. Similar to creating software that runs on Linux, the software can be sold but if I modify Linux itself and turn around and sell it, it would be against the license. Is this accurate? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Zeev Suraski [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 19, 2003 6:40 AM To: [-^-!-%- Cc: PHP general list Subject: Re: [PHP] PHP Encoders and GPL License At 02:45 18/01/2003, [-^-!-%- wrote: >Food for thought: > >As I look through the Zend website, and applaud their efforts to create >'protected' php applications, I can't help but wonder about the impact >(or lagality) or their efforts. Doesn't the use of the Zend Encoder (or >any other PHP Encoders out there) violate the GPL License or the whole Open >Source Concept? > >As far as I understand it, the GPL License states that the source code >of any product created from an open source solutions, or is derived from >the work of an open solutions, must be made availabe to all users. > >Since PHP itself is open source, then wouldn't that prohibit a developer >from encoding any PHP product? > >Please correct me, if I'm wrong. I'm just curious. You're wrong for two reasons: [1] As other people mentioned here, PHP (or in that case, the Zend Engine, PHP's core) is not under the GPL license. Since it is under a BSD style license, people are free to use it for commercial ventures in any and all levels. [2] Even if the Zend Engine was under the GPL, the authors of the software always have the right to use their software in whatever way they see fit, and relicense it under any other licenses. In this case, the author of the Zend Engine is the same as one that publishes the Zend Encoder, so there's really no problem at all. Zeev -- 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] SQL+php
John W. Holmes wrote: .it's an log for a VoIp network, evrey voip has an ip and i whant that instad of the VoIp's IP to put his name, instad of "1.1.1.1:xxx" must be "jhon doe form yyy city", it's easier to read for the people who So where do you get the name from. You're still not being descriptive enough. I'd probably put the ip address to name mapping in a separate table. If we call that table "nameip" and it has fields "name" and "ip", and if your other table is "othertable" with a "ip" field then you can begin your sql statement with something like: select nip.name from nameip nip, othertable ot where nip.ip = ot.ip and ot.ip = whatever you need to get the right record. The above is untested and you may need to modify it to suit your database's syntax (you do not tell us which), but it should give you the general idea. Sean, the difficulty is that you were not explaining what you wanted clearly enough, not giving us enough information. It took several posts to do that. John's simple answer "yes" was a humourous hint to that. All we knew is the few lines of your original post, we don't know if you are ace programmer and database wizard or newbie. You know what you want to achieve and the backgroud to it, we do not. You know your response was out of line. I think a simple apology would be appreciated. John is a mainstay of this list and deals with many requests for help per day. Its a high volume list, please stay on it yourself and find out. See if you can help others. Its also php-general so should really be for requests that do not fall into other catagories such as php-db, php-install or mysql, its not a database list. I feel that many people post to this list, even with off-topic questions, because they know they will receive help. Why? Simply because there are people such as John who wade through hundreds of posts every day, putting themselves out, and doing their best. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Encoders and GPL License
Larry Brown wrote: I just want to clarify this for myself. My impression was that the affects of GPL requiring software developed from the original GPL to also be free was only applicable to modifications of the program itself. The GPL is a ridiculously outdated and vague license which has rarely been tested in any courts (if ever) and therefore there's no clearly established caselaw to base decision on. 'outdated'? 'vague'? GPL speaks of 'linking'. How is this to be defined? The GPL has language (linking, binary, compiler, kernel, etc) which is not something which even enters into the consideration of most developers who use scripting langauges (perl, php, python, etc). The GPL was written almost exclusively with C and similar languages in mind, although it's not explicitly stated anywhere. "derivative works" is not clearly defined. If I distribute a PHP script, is calling a 'wordwrap' function somehow 'linking' to the original PHP code? My program's functionality certainly depends on the wordwrap code functioning properly. Is it a 'work based on the Program'? The definition states that 'a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language.' Whose copyright law? The original developer's? The 2nd generation developer's? Translated into another language is damn vague, imo. If I take the original wordwrap function code - in C - and translate that to Python, have I translated it to another language? I realize that the PHP code isn't GPL - I'm not speaking specifically to PHP, but to the GPL 'definition' of things. It's a shame so many people just write stuff and put it out under GPL without coming close to understanding the implications of the license, or the ambiguities. At some point, there will be larger legal cases which will invalidate some of the principles which developers though the GPL meant, but didn't really understand. So if php was GPL and I modified the source and built my own customized version of php I couldn't sell it but could only give it away, You can sell GPL software. Often there's not much point because you have to grant the right of redistribution to others, so the first person you sold it to would be able to redistribute the source code (because they're entitled to recieve the original source code), thereby being able to undermine your sales efforts. In practice, many people probably wouldn't bother redistributing something, but it would only take one person to do so to have the impact. Also, just because something is GPL doesn't require the original developers to give it away to everyone by setting up FTP servers and all that other stuff. All you're required to do is provide to source to someone who requests it, and you only have to do that if they got it from you. Example: I have a large system which I GPL. I distribute a binary to customers who purchase it. My only obligation is to provide source code to the customer upon request. At that point, THEY can recreate a binary from my source and sell that, but they would also then have to fulfill requests for the source (which they may not want to do). *I* do not have to fulfill requests for the source to anyone except those to whom I distribute/sell a binary version. That's really it. but if I used php to develop some other software that runs on php I could sell it without a problem. Similar to creating software that runs on Linux, the software can be sold but if I modify Linux itself and turn around and sell it, it would be against the license. Again, no, you can sell it, but you're obligated to provide the source to any purchser who requests it, and you can't then stop them from redistributing it. Any Linux kernel changes you made then 'sold' would either not sell at all, or would sell a couple copies then get rolled back in to the main tree of some distribution. Michael Kimsal PHP Training http://www.tapinternet.com/php 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Changing order of just one array item?
Thanks, but that's not what I'm trying to do. I know how to change the keys, but I'm looking to change the internal order of the key/value pairs. Timothy Hitchens (HiTCHO) wrote: This would do it: $first[] = 'hello'; $first[] = 'bye'; function swap(&$list, $first, $second) { $tempOne = $list[$first]; $list[$first] = $list[$second]; $list[$second] = $tempOne; } swap($first, 0, 1); print_r($first); ?> Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sent: Sunday, 19 January 2003 12:36 PM To: [EMAIL PROTECTED] Subject: [PHP] Changing order of just one array item? I need to change where one item is ordered in an array. I know how to sory an array, but I need to move one item up/down in the array. Example: $array is: 0 => "element one" 1 => "element two" 2 => "element three" 3 => "element four" I call array_order_up($array[1]) and $array is now: 0 => "element one" 2 => "element three" 1 => "element two" 3 => "element four" If there aren't any native functions to do this, can anyone think of a way to make my own function to do this? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
php-general Digest 19 Jan 2003 15:28:36 -0000 Issue 1832
php-general Digest 19 Jan 2003 15:28:36 - Issue 1832 Topics (messages 132158 through 132180): Re: 2 Qs: Passing current URL with session and how to avoid session timeout??? 132158 by: -<[ Rene Brehmer ]>- 132159 by: -<[ Rene Brehmer ]>- 132160 by: Justin French Re: Can I use php to load a icon?(.ico .exe .) 132161 by: hei Re: SQL+php 132162 by: John W. Holmes 132163 by: John W. Holmes 132165 by: Sean Malloy 132172 by: Thomas Seifert 132173 by: Sean Burlington 132178 by: Chris Hewitt Re: Free PHP Hosts? 132164 by: JJ Harrison CVS In PHP 132166 by: Trilochan 132171 by: JJ Harrison File Upload 132167 by: Trilochan 132169 by: John W. Holmes whois script or class 132168 by: Ashley M. Kirchner 132170 by: Jason k Larson How know how many sessions are active? 132174 by: Jeremías Grunge 132176 by: Justin French Re: PHP Encoders and GPL License 132175 by: Zeev Suraski 132177 by: Larry Brown 132179 by: michael kimsal Re: Changing order of just one array item? 132180 by: Leif K-Brooks Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Hi Cal Evans, On Sat, 18 Jan 2003 10:17:01 -0600, you wrote about "RE: [PHP] 2 Qs: Passing current URL with session and how to avoid session timeout???" something that looked like this: >I guess I'm dense this morning. In response to 1: > >$_SESSION['mother']=$_SERVER['PHP_SELF']; Didn't know the server array existed ... where I'd find that in the manual??? Only doc I've got to run from... >and then > >Go Back > >or better yet... >Go Back Wouldn't that produce a link to the current url, rather than the previous? >as to #2: >I usually just pass this kind of info around on the URL. > >http://mypage.com/mypage.php?prevURL=http://mypage.com/lastpage.php > >if I have to pass a full query string then I urlencode() it first and >urldecode() it on the other side. I can't do that reliably, my URLs are simply too long on some occasions ... so the URL ends up getting the end cut off... But apparently the sessions expiring isn't an issue afterall ... have had the page loaded for several hours, and the recursive linkage still works ... Will have to upload to my webhost though before I can be absolutely certain ... Retaining matching settings in my test-enviro is not entirely possible because their Apache is older than mine...and they run with globals on, and I design for them off, just to be safe... Rene -- Rene Brehmer This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net --- End Message --- --- Begin Message --- Hi Justin French, On Sun, 19 Jan 2003 12:01:45 +1100, you wrote about "Re: [PHP] 2 Qs: Passing current URL with session and how to avoid session timeout???" something that looked like this: >1. If you require the back button to work forever, then do not use sessions, >because they're not designed to be a forever thing. I only need the session to pass the url on to the next page ... once there the old URL will be written into the HTML code... The only reasons I need to do it with sessions is because my urls are too long for the encoded url to be transfered reliably within the url... >2. I do this sort of stuff by building my own URL from $_SERVER components: I haven't found the server array in the manual (yet anyway), so I'm not sure what exactly it is you're doing ... so a bit of 'splaining would be nice ... I'm only on my 4th month of PHP'ing afterall ... >$script = $_SERVER['PHP_SELF']; >$qs = $_SERVER['QUERY_STRING']; >$currentURL = base64_encode($script."?".$qs); >?> > >The reason why I base64_encode() it is so that the vars=values of the >previous page don't affect the next page. I don't have that problem. Variables aren't reausable because I'm doing divide and conquer design ... that way I can prevent the code from being too complex and requiring to many variables to work. Thus my variables differ from master page to master page, all the common ones are rewritten on each page load (as it only controls the menu links to be linked correctly up/down folder levels). >I the link to the second page might be something like: > >click > >on page.php, to establish a back button: > > >go back > >3. This way, the referring/mother URL is always attached to that URL... if >they bookmark it, of give it to a friend, it's always there... sessions >don't achieve this, and cookies usually can, apart from the usual cookie >problems. Apparently the trans_sid being on (or 1 as it is) makes the sid transfer correctly everytime, atleast with my current setup ... which is this:
Re: [PHP] SQL+php
--- Sean Burlington <[EMAIL PROTECTED]> wrote: > I think the bandwidth wasters are those who ask > questions poorly (it takes several follow up mails > to find out what the question was) and those who > don't have a qucik look at the archives first > (is someone puuting together an FAQ ?) I agree. I think John's response was a simple answer to a simple question. He was probably tired of trying to interpret questions from this list. I suppose I take a similar approach in that I quickly delete questions that make no sense or only hint at the real question. Perhaps I am being rude, too, but I'm just quieter about it. :-) Oh, and here is a link that I think John alluded to: http://www.tuxedo.org/~esr/faqs/smart-questions.html Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Auto Incrementing in PHP
Thanks Guys I just needed a pointer. I decided to use the database and created two tables, one for invoice number and one for order number then defined a function to read the current number and the increment it. // GET AUTO NUMBER and creates the next one // uses the parameter tablename as $table function get_auto_number($table) { if(!$table) { echo "The Function get_auto_number requires the peramater 'tablename' to allow it to know which auto number you want."; exit; } $query = 'select number from '.$table; $result = mysql_query($query); if (!$result) { echo "Sorry there is a problem getting the auto_number from the table ".$table.""; exit; } $current_number = mysql_fetch_row($result); global $auto_number; $auto_number = $current_number[0]; $query = "update ".$table." SET number = '".($auto_number +1)."'"; $result = mysql_query($query); } Simple when someone tells you what to do :o) Thanks and regards. "Don Mc Nair" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > Is there a way for a php page to automatically increment a number and store > it every time the page is loaded. > > I want to generate an invoice number that goes up 1 everytime the HTML form > is sent to it. > > Thanks > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.435 / Virus Database: 244 - Release Date: 01/01/2003 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.435 / Virus Database: 244 - Release Date: 02/01/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SQL+php
> --- Sean Burlington <[EMAIL PROTECTED]> wrote: > > I think the bandwidth wasters are those who ask > > questions poorly (it takes several follow up mails > > to find out what the question was) and those who > > don't have a qucik look at the archives first > > (is someone puuting together an FAQ ?) > > I agree. I think John's response was a simple answer to a > simple question. He was probably tired of trying to > interpret questions from this list. I suppose I take a > similar approach in that I quickly delete questions that > make no sense or only hint at the real question. Perhaps I > am being rude, too, but I'm just quieter about it. :-) > > Oh, and here is a link that I think John alluded to: > > http://www.tuxedo.org/~esr/faqs/smart-questions.html I'm not tired of anything; it was just too vague of a question to be answered, as were the 3 follow-ups that were posted. I still have no idea what the OP wants. After some more searching, this is the FAQ I was looking for: http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-n o-answers.html Note that the original question started with "Does anyone know..." ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Changing order of just one array item?
Hi Leif K-Brooks, The key is but an alias to the value, so other than rewriting the array I cannot see how to split the two apart. I don't believe there's any simple way to reorder the key/value order of an array dunno, I'm not used at using key'ed arrays ... PHP is the only language (I know) that's got it, and since I program in a couple other languages that don't have it, I'd just get confused by starting to use them. Rene On Sun, 19 Jan 2003 10:28:58 -0500, you wrote about "Re: [PHP] Changing order of just one array item?" something that looked like this: >Thanks, but that's not what I'm trying to do. I know how to change the >keys, but I'm looking to change the internal order of the key/value pairs. -- Rene Brehmer This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Auto Incrementing in PHP
On Sunday 19 January 2003 09:03, Justin French wrote: > on 19/01/03 9:59 AM, John W. Holmes ([EMAIL PROTECTED]) wrote: > >> Is there a way for a php page to automatically increment a number and > >> store > >> it every time the page is loaded. > >> > >> I want to generate an invoice number that goes up 1 everytime the HTML > >> form > >> is sent to it. > > > > I assume you're talking about incrementing for everyone that accesses > > your site. For that you need a database to keep track of the number for > > all users. > > Or use a file-based counter. There are 1000's of counter scripts out there > both file based and database based. If the application is mission critical then a simple file based counter is wholly inadequate. There are issues of concurrent access -- two or more instances of the script trying to read and write to the file at the same time. Using a DBMS means this problem is handled automatically and reliably. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* SEMPER UBI SUB UBI */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How know how many sessions are active?
To help even more, if you're on a dedicated, this shell command will provide you the amount of sessions active: "ls -l /tmp/sess* | wc -l" HTH "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If you're on a dedicated server (no other sites on the server), you could just count the session files in /tmp. Otherwise, the general consensus seems to be that you need to decide how long a user is "active" for (say a minute, or 3, or an hour?), and save (eg) the SID and timestamp in a file or MySQL table. In theory, you then count the number of sessions that were created or reactivated (restamped) within your definition of "active" time (eg 3 mins). This has been discussed waaay too many time on the list... do a search on the archives for 'active users', perhaps also try a search with the word "ASP" too :) Justin on 19/01/03 10:27 PM, Jeremías Grunge ([EMAIL PROTECTED]) wrote: > Sorry I'm novice. > > There is a way to know how many sessions are active and to get variables or > the id of them? > > Thanks > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiplication of double
Hi all, I guess this problem might sound childish for most of you, but I'm having it right now. I get two numbers from a FORM, one price and one quantity and I need to make a multiplication with them in order to store the total amount also as a double expression... I'm trying with: $totalprice = $price * $qty; but when I echo the, it gives me just plain old 0 (zero). Any suggestions? Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multiplication of double
have you try echo $price and $qty separately to check if they are correct? If they are correct, can you post you code? so we can take a look. Foong Cesar Aracena <[EMAIL PROTECTED]> wrote in message 01c2bfeb$cecbd5c0$7a00a8c0@NOTEBOOK">news:01c2bfeb$cecbd5c0$7a00a8c0@NOTEBOOK... Hi all, I guess this problem might sound childish for most of you, but I'm having it right now. I get two numbers from a FORM, one price and one quantity and I need to make a multiplication with them in order to store the total amount also as a double expression... I'm trying with: $totalprice = $price * $qty; but when I echo the, it gives me just plain old 0 (zero). Any suggestions? Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiplication of double
On Monday 20 January 2003 02:51, Cesar Aracena wrote: > Hi all, > > I guess this problem might sound childish for most of you, but I'm > having it right now. I get two numbers from a FORM, one price and one > quantity and I need to make a multiplication with them in order to store > the total amount also as a double expression... I'm trying with: > > $totalprice = $price * $qty; > > but when I echo the, it gives me just plain old 0 (zero). Any > suggestions? What is $price and what is $qty? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Everything I like is either illegal, immoral or fattening. -- Alexander Woollcott */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Free PHP Hosts?
JJ -- ...and then JJ Harrison said... % % I did do that, and have yet to turn up a useful result. That is why I asked. Ah. None of my business, I suppose, but how do you define a useful result? There were at least three that clearly indicated that they provided free PHP hosting in the first page of results alone. HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg93532/pgp0.pgp Description: PGP signature
RE: [PHP] Re: Auto Incrementing in PHP
On 19-Jan-2003 Don Mc Nair wrote: > Thanks Guys > > I just needed a pointer. I decided to use the database and created two > tables, one for invoice number and one for order number then defined a > function to read the current number and the increment it. > That'll work, but it's not atomic. At high traffic loads you can get duplicates. You might want to consider a table with a auto_increment field. Do a dummy insert, the get the value with : mysql_query('SELECT last_insert_id() as id'); Regards, -- Don Read [EMAIL PROTECTED] -- "Beer is proof that God loves us and wants us to be happy." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] please help
Hi, I have a problem. I have created a guestbook for my server and i have php installed. You enter deatils and the guestbook stores it in guestbook.dat.php file. The guestbook itself is also a php file. I have tryed it on other hosts and it has worked. When i run it on my server it doesnt store the data i have inputted and show it on the guestbook. This might be a bit confusing but if you could help me or forward it to someone who can help me i would be much abliged. JAM
Re: [PHP] please help
On Sun, 2003-01-19 at 12:57, JamsterJAM wrote: > Hi, > I have a problem. I have created a guestbook for my server and i have php installed. >You enter deatils and the guestbook stores it in guestbook.dat.php file. The >guestbook itself is also a php file. I have tryed it on other hosts and it has >worked. When i run it on my server it doesnt store the data i have inputted and show >it on the guestbook. This might be a bit confusing but if you could help me or >forward it to someone who can help me i would be much abliged. > > JAM We probably need more info to get to the real problem. However, you are probably having a problem with the the webserver (php) writing to the file. Make sure that the webserver has permission to write to the file. -- Ray Hunter email: [EMAIL PROTECTED] www:http://venticon.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] please help
What version of PHP is running on the server, what version did you develop the script with? Do you know if register globals are on or off? You can get a lot of information about PHP by doing Do you receive any error messages indicating the file can not be opened for writing or does it silently discard the data? Jason On Sun, 2003-01-19 at 12:57, JamsterJAM wrote: > Hi, > I have a problem. I have created a guestbook for my server and i have php installed. >You enter deatils and the guestbook stores it in guestbook.dat.php file. The >guestbook itself is also a php file. I have tryed it on other hosts and it has >worked. When i run it on my server it doesnt store the data i have inputted and show >it on the guestbook. This might be a bit confusing but if you could help me or >forward it to someone who can help me i would be much abliged. > > JAM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiplication of double
--- Cesar Aracena <[EMAIL PROTECTED]> wrote: > I get two numbers from a FORM, one price and one > quantity and I need to make a multiplication with > them in order to store the total amount also as a > double expression... I'm trying with: > > $totalprice = $price * $qty; > > but when I echo the, it gives me just plain old 0 > (zero). Any suggestions? Without seeing more code, it is hard to say, but I imagine $qty and/or $price are not what you think they are. Here is a little example that you might find useful: Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Text report templates a la Perl
I've been looking high and low, and haven't had much luck finding a way to mimic the @ templating capability of Perl. Does a class or similar exist? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php-4.3.0 and wu-imap failed to compile
I tried to install php-4.3.0 with imap-2001a-10, imap-devel-2001a-10 from RH 7.3 Of course I added --with-imap --with-imap-ssl, among other things. These came out when I did make. /php /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o): In function `ssl_onceonlyinit': /usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:286: the use of `tmpnam' is dangerous, better use `mkstemp' ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam': /usr/src/php-4.3.0/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is dangerous, better use `mkstemp' Is there a newer wu-imap package that works with php-4.3.0 ? Did I do something wrong? I compiled php-4.2.3 with the same configuration, and it worked fine. Thanks, - This mail sent through IMP: http://horde.org/imp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP at LinuxWorld Expo 2003
Greetings, LinuxWorld Expo 2003 is January 21-24, and with the indispensable support of members and friends, New York PHP (http://nyphp.org) is excited to offer some great events at LWE. "Q&A with Doron Gerstel, CEO, Co-Founder, Zend Technologies" January 22, 2003 @ 1:30pm, NYPHP, Booth #16 Doron has kindly taken time from his busy schedule to address NY's questions on PHP, Zend, and the community's direction. Join us and get your questions answered by Zend's leading man. "PHP Developers Cookbook by Sterling Hughes and Andrei Zmievski Book Raffle" January 22,23,24, 2003 @ 3:30pm, NYPHP, Booth #16 Get your name entered by 3:30pm each day and have a chance to win this valuable reference for any PHP programmer. Thanks to Sterling Hughes and Sams Publishing. Haven't signed up for LinuxWorld Expo yet? It's not too late - register for FREE at http://linuxworldexpo.com and stop by Booth #16 for talk, fun and PHP! And if you'd like to take a load off, spend some time behind the booth answering questions and talking with fellow Linux and PHP users. - About NYPHP New York PHP is a non-profit organization committed to promoting and supporting the PHP programming language, helping New Yorkers share development experiences, and developing Open Source projects for the PHP community. Join Us Subscribe to our mailing lists and aid the community by sharing your experiences, leading discussions and offering support. Plus, we are always eager for energetic directors to join and help build the NY and worldwide PHP communities. Attend Meetings Our free monthly meetings are open to the public and held on the 4th Tuesday of the month at Digital Pulp. Check our website for details. Acquire Technology With PHP connecting many facets of the Internet, we support the AMP (Apache/MySQL/PHP) Technology suite, plus JSP, .NET, ColdFusion, Oracle and a variety of operating systems. Let the NYPHP community help you reach a new level of performance and functionality. Learn More You'll find NYPHP's projects, mailing lists, announcements, job opportunities, and up-to-the-minute information about meetings, news and events at http://nyphp.org. Thank you, and see you at the Expo! = Hans Zaunere President, New York PHP http://nyphp.org [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php.ini: how to load different ini file depending on host?
On my web server (Apache) I have two sites and I would like each site to use a different php.ini. What is the correct way for me to have each site use it's own php.ini file? I figure it's a setting in the apache conf file but I can't figure out which ... Thanks, Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cli class
Hi, all -- I forget, and can't find, who it was who suggested a mailing list for php as a shell programming language and made the comment that it seems that few use it as such. S/He might find http://www.phpclasses.org/browse.html/package/954.html of interest; it's a CLI class for php :-) HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg93542/pgp0.pgp Description: PGP signature
RE: [PHP] php.ini: how to load different ini file depending on host?
Inside each of the Virtual Host defs you can put most of the php_flag etc settings just like: php_admin_value disable_functions 'ob_start' php_admin_value sendmail_path '/usr/sbin/sendmail -f [EMAIL PROTECTED] -t -i' Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: [EMAIL PROTECTED] > -Original Message- > From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] > Sent: Monday, 20 January 2003 12:28 PM > To: [EMAIL PROTECTED] > Subject: [PHP] php.ini: how to load different ini file > depending on host? > > > On my web server (Apache) I have two sites and I would like > each site to > use a different php.ini. > > What is the correct way for me to have each site use it's own php.ini > file? I figure it's a setting in the apache conf file but I > can't figure > out which ... > > Thanks, > > Jc > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini: how to load different ini file depending on host?
Timothy Hitchens ) wrote: Inside each of the Virtual Host defs you can put most of the php_flag etc settings just like: Oops .. I forgot to mention that these two website do *not* have different IP addresses. Actually these are two testing website on my local LAN. What I have is to have a different php.ini loaded depending on wether the user goes to: http://192.168.254.1/test1 or http://192.168.254.1/test2 I had read up on the Virtual Host directives put it didn't seem to be applicable ... Could I do the same thing you suggested using the apache directive? Thanks, Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini: how to load different ini file depending onhost?
You can override parts of your php.ini on a per-directory level with a .htaccess file... eg: php_flag register_globals off php_flag magic_quotes_gpc on php_flag magic_quotes_runtime on php_flag magic_quotes_sybase on Justin French on 20/01/03 2:14 PM, Jean-Christian Imbeault ([EMAIL PROTECTED]) wrote: > Timothy Hitchens ) wrote: >> Inside each of the Virtual Host defs you can put most of the php_flag >> etc settings just like: > > > Oops .. I forgot to mention that these two website do *not* have > different IP addresses. Actually these are two testing website on my > local LAN. > > What I have is to have a different php.ini loaded depending on wether > the user goes to: > > http://192.168.254.1/test1 > or > http://192.168.254.1/test2 > > I had read up on the Virtual Host directives put it didn't seem to be > applicable ... Could I do the same thing you suggested using the apache > directive? > > Thanks, > > Jc > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mass Mailing with PHP & MySQL
Hi, I'm working on a mailing solution for a client. His site collects email address from a 'Send this site to a friend' page (user enters their email address and up to 10 other addresses - a message is then sent to the 10 addresses from the users own email address). The addresses are then stored in a MySQL database - a column for the users email address, and then a column each for the additional 10 addresses. Now the client would like to have the ability to send an email to all addresses collected at once - to inform the addresses of a sale, etc. I'm guessing for this to be done, I'd have to select all the DISTINCT email addresses from the 11 columns (users email, and the 10 addresses), then use a loop to send the mail out. I had planned on using PHP's mail() function - does anyone know of any limitations imposed by this method? Normally, I'd contact the ISP and ask them directly, however it's been several weeks since they've answered the phones. Does anyone have any other/better options that I should pursue? This will be my first mass mailing typed job so I'm not really sure where to begin or if I'm on the right path at all. Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 20 Jan 2003 04:22:40 -0000 Issue 1833
php-general Digest 20 Jan 2003 04:22:40 - Issue 1833 Topics (messages 132181 through 132204): Re: SQL+php 132181 by: Chris Shiflett 132183 by: John W. Holmes Re: Auto Incrementing in PHP 132182 by: Don Mc Nair 132185 by: Jason Wong 132191 by: Don Read Re: Changing order of just one array item? 132184 by: -<[ Rene Brehmer ]>- Re: How know how many sessions are active? 132186 by: Leon Mergen Multiplication of double 132187 by: Cesar Aracena 132188 by: Foong 132189 by: Jason Wong 132195 by: Chris Shiflett Re: Free PHP Hosts? 132190 by: David T-G please help 132192 by: JamsterJAM 132193 by: Ray Hunter 132194 by: Jason Sheets Text report templates a la Perl 132196 by: Duncan Hill php-4.3.0 and wu-imap failed to compile 132197 by: Ezra Nugroho PHP at LinuxWorld Expo 2003 132198 by: Hans Zaunere php.ini: how to load different ini file depending on host? 132199 by: Jean-Christian Imbeault 132201 by: Timothy Hitchens \(HiTCHO\) 132202 by: Jean-Christian Imbeault 132203 by: Justin French cli class 132200 by: David T-G Mass Mailing with PHP & MySQL 132204 by: Tim Thorburn Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- --- Sean Burlington <[EMAIL PROTECTED]> wrote: > I think the bandwidth wasters are those who ask > questions poorly (it takes several follow up mails > to find out what the question was) and those who > don't have a qucik look at the archives first > (is someone puuting together an FAQ ?) I agree. I think John's response was a simple answer to a simple question. He was probably tired of trying to interpret questions from this list. I suppose I take a similar approach in that I quickly delete questions that make no sense or only hint at the real question. Perhaps I am being rude, too, but I'm just quieter about it. :-) Oh, and here is a link that I think John alluded to: http://www.tuxedo.org/~esr/faqs/smart-questions.html Chris --- End Message --- --- Begin Message --- > --- Sean Burlington <[EMAIL PROTECTED]> wrote: > > I think the bandwidth wasters are those who ask > > questions poorly (it takes several follow up mails > > to find out what the question was) and those who > > don't have a qucik look at the archives first > > (is someone puuting together an FAQ ?) > > I agree. I think John's response was a simple answer to a > simple question. He was probably tired of trying to > interpret questions from this list. I suppose I take a > similar approach in that I quickly delete questions that > make no sense or only hint at the real question. Perhaps I > am being rude, too, but I'm just quieter about it. :-) > > Oh, and here is a link that I think John alluded to: > > http://www.tuxedo.org/~esr/faqs/smart-questions.html I'm not tired of anything; it was just too vague of a question to be answered, as were the 3 follow-ups that were posted. I still have no idea what the OP wants. After some more searching, this is the FAQ I was looking for: http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-n o-answers.html Note that the original question started with "Does anyone know..." ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ --- End Message --- --- Begin Message --- Thanks Guys I just needed a pointer. I decided to use the database and created two tables, one for invoice number and one for order number then defined a function to read the current number and the increment it. // GET AUTO NUMBER and creates the next one // uses the parameter tablename as $table function get_auto_number($table) { if(!$table) { echo "The Function get_auto_number requires the peramater 'tablename' to allow it to know which auto number you want."; exit; } $query = 'select number from '.$table; $result = mysql_query($query); if (!$result) { echo "Sorry there is a problem getting the auto_number from the table ".$table.""; exit; } $current_number = mysql_fetch_row($result); global $auto_number; $auto_number = $current_number[0]; $query = "update ".$table." SET number = '".($auto_number +1)."'"; $result = mysql_query($query); } Simple when someone tells you what to do :o) Thanks and regards. "Don Mc Nair" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > Is there a way for a php page to automatically increment a number and store > it every time the page is loaded. > > I want to generate an invoice number that goes up 1 everytime the HTML form > is sent to it. > > Tha
[PHP] PHP Books
hello, i have been told that i should email you to help me with my question, and the auestion is: Can you recommend an GREAT book for someone to learn php off. The person will only have knowladge of html. Is there a really good book out there that will teach me php??? thanks __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can I use white spaces?
Hi all, I've encountered myself trapped into a big mystery this time, and that's because of some white spaces. I have a MySql table which I use to store users and visitors information, but when I want to display this information on screen for them to see and/or correct, every field that has white spaces are stripped to the first word, so I need something more "Address: Avenue" to ship a product don't I? How can I correct this in PHP? I've tried with stripslashes but white spaces are not treated like quotes (am I right?). FYI, there are Varchars and TEXT fields having this problem. Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mass Mailing with PHP & MySQL
A while() loop will, at some point, break. this is because the script will timeout on the server before you send to any large lists... when I say large, this could be 100 address', or could be 10,000 -- it all depends on your server/ISP and server load at certain times. A better/simpler solution would be to build a Bcc header field using the while loop, then only send ONE email to 1000's of email address' via the Bcc field, just like you would from Outlook. BUT, your host may impose restrictions on how many emails you can send in one Bcc... my host has a limit of 100. So, I tend to send a few emails of 50-ish people per email to my list, balancing the two above issues. There are also some simple/complex classes on phpclasses.org (esp the one by manuel lemmos) which can overcome both these problems, with various methods. I haven't used them yet, basically because I don't see the need yet, given my small lists. Justin on 20/01/03 3:21 PM, Tim Thorburn ([EMAIL PROTECTED]) wrote: > Hi, > > I'm working on a mailing solution for a client. His site collects email > address from a 'Send this site to a friend' page (user enters their email > address and up to 10 other addresses - a message is then sent to the 10 > addresses from the users own email address). The addresses are then stored > in a MySQL database - a column for the users email address, and then a > column each for the additional 10 addresses. > > Now the client would like to have the ability to send an email to all > addresses collected at once - to inform the addresses of a sale, etc. I'm > guessing for this to be done, I'd have to select all the DISTINCT email > addresses from the 11 columns (users email, and the 10 addresses), then use > a loop to send the mail out. > > I had planned on using PHP's mail() function - does anyone know of any > limitations imposed by this method? Normally, I'd contact the ISP and ask > them directly, however it's been several weeks since they've answered the > phones. > > Does anyone have any other/better options that I should pursue? This will > be my first mass mailing typed job so I'm not really sure where to begin or > if I'm on the right path at all. > > Thanks > -Tim > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I use white spaces?
I suspect (but could be wrong) that you aren't quoting these values in your forms. Be sure that you are using... Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini: how to load different ini file depending on host?
I don't think you can load a different ini based on virtual host. However, you can override most php.ini values in either the httpd.conf or in a .htaccess file. I'm running about 10 vhosts on one box, all with the same IP, and I just use .htaccess, ie... php_value include_path ".:/webserver/vhosts/beta/include" to set the include path for my "beta" webserver. Just put the .htaccess file in the document root for that particular vhost. Jean-Christian Imbeault wrote: On my web server (Apache) I have two sites and I would like each site to use a different php.ini. What is the correct way for me to have each site use it's own php.ini file? I figure it's a setting in the apache conf file but I can't figure out which ... Thanks, Jc -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: Re: [PHP] Mass Mailing with PHP & MySQL
- Forwarded message from [EMAIL PROTECTED] - Date: Sun, 19 Jan 2003 22:07:34 -0700 From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Subject: Re: [PHP] Mass Mailing with PHP & MySQL To: Justin French <[EMAIL PROTECTED]> Is Peter McNulty out there anywhere? Don't have a lot of experience with mailing scripts, but I use the one found at codingclick.com Anyone else? RW Quoting Justin French <[EMAIL PROTECTED]>: ### A while() loop will, at some point, break. this is because the script ### will ### timeout on the server before you send to any large lists... when I say ### large, this could be 100 address', or could be 10,000 -- it all depends ### on ### your server/ISP and server load at certain times. ### ### A better/simpler solution would be to build a Bcc header field using the ### while loop, then only send ONE email to 1000's of email address' via the ### Bcc ### field, just like you would from Outlook. ### ### BUT, your host may impose restrictions on how many emails you can send in ### one Bcc... my host has a limit of 100. ### ### So, I tend to send a few emails of 50-ish people per email to my list, ### balancing the two above issues. ### ### ### There are also some simple/complex classes on phpclasses.org (esp the one ### by ### manuel lemmos) which can overcome both these problems, with various ### methods. ### ### I haven't used them yet, basically because I don't see the need yet, ### given ### my small lists. ### ### ### Justin ### ### ### ### ### ### ### ### ### ### on 20/01/03 3:21 PM, Tim Thorburn ([EMAIL PROTECTED]) wrote: ### ### > Hi, ### > ### > I'm working on a mailing solution for a client. His site collects ### email ### > address from a 'Send this site to a friend' page (user enters their ### email ### > address and up to 10 other addresses - a message is then sent to the 10 ### > addresses from the users own email address). The addresses are then ### stored ### > in a MySQL database - a column for the users email address, and then a ### > column each for the additional 10 addresses. ### > ### > Now the client would like to have the ability to send an email to all ### > addresses collected at once - to inform the addresses of a sale, etc. ### I'm ### > guessing for this to be done, I'd have to select all the DISTINCT email ### > addresses from the 11 columns (users email, and the 10 addresses), then ### use ### > a loop to send the mail out. ### > ### > I had planned on using PHP's mail() function - does anyone know of any ### > limitations imposed by this method? Normally, I'd contact the ISP and ### ask ### > them directly, however it's been several weeks since they've answered ### the ### > phones. ### > ### > Does anyone have any other/better options that I should pursue? This ### will ### > be my first mass mailing typed job so I'm not really sure where to begin ### or ### > if I'm on the right path at all. ### > ### > Thanks ### > -Tim ### > ### > ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### - End forwarded message - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can I use white spaces?
You where nothing but right. I didn't know that PHP's html HAD to have all of the quoting right for PHP to work properly. Thank a lot! Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina -Mensaje original- De: Larry E. Ullman [mailto:[EMAIL PROTECTED]] Enviado el: lunes, 20 de enero de 2003 2:04 Para: Cesar Aracena CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Can I use white spaces? I suspect (but could be wrong) that you aren't quoting these values in your forms. Be sure that you are using... Larry -- 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] Re: Multiplication of double
It seems you have register globals set to off, thus when you have variables $price and $qty they are just fresh variables, you might try $HTTP_POST_VARS['price'] and $HTTP_POST_VARS['qty'] (don't forget the single quote). "Cesar Aracena" <[EMAIL PROTECTED]> wrote in message 01c2bfeb$cecbd5c0$7a00a8c0@NOTEBOOK">news:01c2bfeb$cecbd5c0$7a00a8c0@NOTEBOOK... Hi all, I guess this problem might sound childish for most of you, but I'm having it right now. I get two numbers from a FORM, one price and one quantity and I need to make a multiplication with them in order to store the total amount also as a double expression... I'm trying with: $totalprice = $price * $qty; but when I echo the, it gives me just plain old 0 (zero). Any suggestions? Thanks in advance, Cesar L. Aracena [EMAIL PROTECTED] [EMAIL PROTECTED] (0299) 156-356688 Neuquén (8300) Capital Argentina -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I use white spaces?
You where nothing but right. I didn't know that PHP's html HAD to have all of the quoting right for PHP to work properly. Glad it's working but, just to clarify, this is an HTML issue, not a PHP one. Best wishes, Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Login scritp help needed.
hey does anyone have a good login script that i can i can go buy on a tutorial sake. and also how to add the info correctly into a mysql database. Im kinda of a noobie so bare with me please. the books i have are not being very helpfull on this matter. you can see my username and password login page here. any help would be greatly appreciated. thanks Karl James http://www.ultimatefootballleague.com/index.htm under construction IncrediMail - Email has finally evolved - Click Here
Re: [PHP] PHP Books
PHP Fast & Easy Web Development by Julie Meloni kicked things off for me (after knowing only HTML) basically walks you through the code of common things that you would want to do with PHP. (email a submitted html form - insert/retrieve and edit data in mysql database) Read through the examples and picture it in your mind. Lots of it is repetition but by the end you'll understand or at lest know where to look to find answers to solutions you want http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20&index=blended&keyword=PHP+Fast+Easy+Web+Development Julie's site: www.thickbook.com Many tutorials available here as well. PHP Bible is another good reference book. There's also a lot of sample code in here if I remeber right http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20&index=blended&keyword=PHP+bible The manual is really invaluable as well. It's very well organized and easy to find what you need if you know how to use it. A boring but helpful activity would be to read through the summaries of the functions. You won't remember all [or any :)] of them, but you will get an idea of what is possible and how powerful the language is. Sams Teach Yourself SQL in 10 Minutes Also ought to pick yourself up this cheapy while your at it. A great intro to SQL. It's great for a reference and an idea of what is possible (and how simple the majority of what you want to do really is) You'll probably be using MySQL at some point and this will help lots to understand how the database can help you out. http://www.amazon.com/exec/obidos/external-search/002-6827406-7685618?tag=opera-20&index=blended&keyword=Sams+Teach+Yourself+SQL+10+Minutes olinux --- Armoured <[EMAIL PROTECTED]> wrote: > hello, > > i have been told that i should email you to help me > with my question, and the auestion is: > > Can you recommend an GREAT book for someone to learn > php off. The person will only have knowladge of > html. > Is there a really good book out there that will > teach > me php??? > > thanks > > __ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up > now. > http://mailplus.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Login scritp help needed.
Try this article - code sample available in the code library as well. http://www.phpbuilder.com/columns/tim2505.php3 Also a 6 part series on www.devarticles.com (5 are done) Here's part five - you can find the rest :) http://www.devarticles.com/art/1/323 zend.com probably has a good article on this as well. olinux --- Karl James <[EMAIL PROTECTED]> wrote: > hey does anyone have a good login script that i can > i can go buy > on a tutorial sake. and also how to add the info > correctly into a > mysql database. > Im kinda of a noobie so bare with me please. > > the books i have are not being very helpfull on this > matter. > > you can see my username and password login page > here. > any help would be greatly appreciated. > > thanks > Karl James > > http://www.ultimatefootballleague.com/index.htm > under construction __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini: how to load different ini file depending on host?
Thanks to everyone for the suggestions. I finally got what I wanted by doing it a directive in the httpd.conf file. Thanks again! Jc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Recommended freeware guestbook?
Hey, Anybody have a php-based guestbook that they like and can be freely downloaded? Don't need anything really fancy, just for a personal website. Easy-to-use, and not hard to integrate into the site would be bonuses (mysql not a problem). I've looked around, and there's a bunch out there - I'm just looking for recommendations of what people like. Thanks, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: [PHP] Mass Mailing with PHP & MySQL
I had an idea myself to do this. But I've held off because I want to do something rather robust but still flexible. I was going to use a database table.. with the fields.. to.. from.. subject.. body.. etc I was then going to have a cron task that ran every so often grabbing the records 1000-2000 at a time and sending them... if the script timed out the queue would still be there next time it ran. Would this be a good solution for a heavy amount of emails? The benefit I guess is I can use any language I like to read the database and send the emails but still queue it up with php or any other language. I could even add a date time field to send emails at a certain time as well. I think it would also free the user up faster as the records could be added to the database with "Insert delay". The series of inserts would be done and the user can forget about it. A simple admin page with a Count query could monitor the queues progress. Am I on the right track? any ideas additions? Cheers Brendon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 20, 2003 3:09 PM To: [EMAIL PROTECTED] Subject: Fwd: Re: [PHP] Mass Mailing with PHP & MySQL - Forwarded message from [EMAIL PROTECTED] - Date: Sun, 19 Jan 2003 22:07:34 -0700 From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Subject: Re: [PHP] Mass Mailing with PHP & MySQL To: Justin French <[EMAIL PROTECTED]> Is Peter McNulty out there anywhere? Don't have a lot of experience with mailing scripts, but I use the one found at codingclick.com Anyone else? RW Quoting Justin French <[EMAIL PROTECTED]>: ### A while() loop will, at some point, break. this is because the script ### will ### timeout on the server before you send to any large lists... when I say ### large, this could be 100 address', or could be 10,000 -- it all depends ### on ### your server/ISP and server load at certain times. ### ### A better/simpler solution would be to build a Bcc header field using the ### while loop, then only send ONE email to 1000's of email address' via the ### Bcc ### field, just like you would from Outlook. ### ### BUT, your host may impose restrictions on how many emails you can send in ### one Bcc... my host has a limit of 100. ### ### So, I tend to send a few emails of 50-ish people per email to my list, ### balancing the two above issues. ### ### ### There are also some simple/complex classes on phpclasses.org (esp the one ### by ### manuel lemmos) which can overcome both these problems, with various ### methods. ### ### I haven't used them yet, basically because I don't see the need yet, ### given ### my small lists. ### ### ### Justin ### ### ### ### ### ### ### ### ### ### on 20/01/03 3:21 PM, Tim Thorburn ([EMAIL PROTECTED]) wrote: ### ### > Hi, ### > ### > I'm working on a mailing solution for a client. His site collects ### email ### > address from a 'Send this site to a friend' page (user enters their ### email ### > address and up to 10 other addresses - a message is then sent to the 10 ### > addresses from the users own email address). The addresses are then ### stored ### > in a MySQL database - a column for the users email address, and then a ### > column each for the additional 10 addresses. ### > ### > Now the client would like to have the ability to send an email to all ### > addresses collected at once - to inform the addresses of a sale, etc. ### I'm ### > guessing for this to be done, I'd have to select all the DISTINCT email ### > addresses from the 11 columns (users email, and the 10 addresses), then ### use ### > a loop to send the mail out. ### > ### > I had planned on using PHP's mail() function - does anyone know of any ### > limitations imposed by this method? Normally, I'd contact the ISP and ### ask ### > them directly, however it's been several weeks since they've answered ### the ### > phones. ### > ### > Does anyone have any other/better options that I should pursue? This ### will ### > be my first mass mailing typed job so I'm not really sure where to begin ### or ### > if I'm on the right path at all. ### > ### > Thanks ### > -Tim ### > ### > ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### - End forwarded message - -- 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] jpgraph
dear all, please, any body who has experienced with jpgraph, tell me how to install this library. because I want to use this library to create bar chart as dynamic image. I'm using phpdev5 in my win 98. thank you in advance Rizki Salamun http://www.salamun.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Generating formatted reports
hello friends. I have a MYSql database and also a php application on the web. I need to generate formatted reports from the database - something like a report card with table, marks, aggregate etc. - Something like Crystal Reports for MS Visual Basic. Can this be done with PHP or are there any tools available to do this? Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Undefinied Symbol error
i used swig to convert C++ module into a .so file. but when i use .so file in a php4 script i get following error :- Warning: Unable to load dynamic library '/usr/lib/php4/php_kcvsClient.so' - /usr/lib/php4/php_kcvsClient.so: undefined symbol: import__FPcN20 in /var/www.unitedkalinga.com/patro/cvs_swig/kcvsClient.php on line 19 Fatal error: Call to undefined function: checkout() in /var/www.unitedkalinga.com/patro/cvs_swig/runme_.php4 on line 5 Regards Trilochan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php