php-general Digest 25 Jul 2005 13:35:33 -0000 Issue 3587

2005-07-25 Thread php-general-digest-help
php-general Digest 25 Jul 2005 13:35:33 - Issue 3587 Topics (messages 219282 through 219300): Re: how to post a question? 219282 by: Richard Lynch 219285 by: Ryan A 219297 by: Jochem Maas Re: Loading dynamic extension 219283 by: Richard Lynch Re: Don't

Re: [PHP] function MAX with WHERE

2005-07-25 Thread Georgi Ivanov
What print_r($test_m) say ? Or echo mysql_num_rows($test); May be you get 0 records from your query. On Monday 25 July 2005 09:06, Jesús Alain Rodríguez Santos wrote: I have someting like this: $test = mysql_query(SELECT MAX(dato) AS datos FROM tabla WHERE campo_mes = '$mes'); $test_m =

[PHP] Re: function MAX with WHERE

2005-07-25 Thread Mark Rees
Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have someting like this: $test = mysql_query(SELECT MAX(dato) AS datos FROM tabla WHERE campo_mes = '$mes'); $test_m = mysql_fetch_array($test); $test_mes = $test_m['datos']; print $test_mes where

Re: [PHP] is_array() doesn't work on DOM properties?

2005-07-25 Thread Jochem Maas
John Smith wrote: I'm trying to avoid error messages while iterating over DOM properties. e.g. if(is_array($dom-stuff-props)) { maybe you can get roudn the problem by saying?: if($dom-stuff-props) { or?: if(!empty($dom-stuff-props)) { foreach($dom-stuff-props as $prop) { ...

Re: [PHP] Installing OLE/Spreadsheet Excel Writer Query

2005-07-25 Thread Jochem Maas
kevin.o'[EMAIL PROTECTED] wrote: Hi Jochem, can you telnet to pear.php.net:80 ? didn't see your reply earlier (been away from the PC). here is the answer: open a dosbox (type 'CMD' in the run dialog) then type the following in the dosbox: telnet pear.php.net 80 if you get a 'Connecting

[PHP] running number

2005-07-25 Thread Roger Thomas
I am required to write a user registration script that captures the basics like name, phone number etc etc. I would also have to write to mySQL database a number that is associated with that user. At this point of writing, the start of that number is unknown. But the number will be incremented

[PHP] Closing persistent ODBC connections

2005-07-25 Thread Dodot
Hello everyone, The php manual isn't very clear about when and how ODBC persistent connection are actually closed. I tried with odbc_close_all() but I'm not sure it really closes the connection, since the next call to odbc_pconnect() will be faster than before! The problem is that regularly I

[PHP] Re: Delivery Protection

2005-07-25 Thread jonathan . ernst
SMTP: Please confirm the attached message. +++ Attachment: No Virus found +++ MessageLabs AntiVirus - www.messagelabs.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] running number

2005-07-25 Thread Richard Davey
Hello Roger, Monday, July 25, 2005, 10:21:54 AM, you wrote: RT I am quite new at all these stuff and would like to seek your RT advise on the *recommended way* of achieving this. I am thinking RT along these lines: RT a) store that number (12345) in a table RT b) a user registers and assign that

Re: [PHP] running number

2005-07-25 Thread Sascha Kaufmann
try mySQL's auto increment attribute http://dev.mysql.com/doc/mysql/en/example-auto-increment.html Roger Thomas wrote: I am required to write a user registration script that captures the basics like name, phone number etc etc. I would also have to write to mySQL database a number that is

Re: [PHP] how to post a question?

2005-07-25 Thread Jochem Maas
Ryan A wrote: Hey Rich, The str_replace calls are kinda expensive IMHO, a good regex would be better I'd be interested to see a benchmark (any benchmark) where str_replace is SLOWER than the corresponding Regex... I am not very good with RegEx's myself, and I have never benchmarked any

Re: [PHP] quick question about using capital letters coding w/ PHP

2005-07-25 Thread Jochem Maas
Richard Lynch wrote: On Sun, July 24, 2005 11:39 am, Dotan Cohen said: On 7/24/05, Bruce Gilbert [EMAIL PROTECTED] wrote: I am well versed in coding with xhtml which requires all lower case and am pretty much a newbie at PHP so that is why I am asking this question. is this acceptible if

Re: [PHP] Don't ejecute a sentence if a field is empty

2005-07-25 Thread Jochem Maas
Jesús Alain Rodríguez Santos wrote: Hello I'm new: I need to know how can I stop a php sentence if my db is empty, for example I have writed a php sentence, if every fields from mmy db are full, there what do you mean by 'php sentence'? is no problem, but I delete every values from the all

[PHP] A strategy question about using mySQL for saving flat-file stings?

2005-07-25 Thread Al
I've been creating a number of CM applications for a virtual-host website. One feature, of several applications, allows the editor [one of our people] to create simple text files. I've been using simple flat-files in a directory for saving the files. I've gotten tried of dealing with

[PHP] A directory permissions question

2005-07-25 Thread Al
I'm on virtual-host server and have been following a rule of making certain all directories on the root have permissions set to 755. This is the default when creating new directories with ftp, etc. Occasionally, I need directories with 757 and have always made certain they were not on the

Re: [PHP] A strategy question about using mySQL for saving flat-file stings?

2005-07-25 Thread James
I don't know if this is of any help, but you can make a mysql field Unique without it being an index/primary key. - Original Message - From: Al [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Monday, July 25, 2005 9:40 AM Subject: [PHP] A strategy question about using mySQL for

[PHP] Wierd time shifting problem?!?

2005-07-25 Thread Gord Busse
Greetings, I have an application I built that allows the user to schedule mailings to subscribed users for specific times and dates. Everything was working fine as far as I could tell then all of a sudden this time shifting problem started popping up and seems to be getting worse. The

[PHP] Prepopulating form fields afer an error

2005-07-25 Thread Jack Jackson
Hi, I have a form and it does basic error checking after submission; when the user omits required fields it kicks back the form with highlighted errors telling them the error of their ways. I've sussed out that by populating the value of the field with $fieldvalue I can have that form field

[PHP] how to install phpize and php-config?

2005-07-25 Thread Victor Alvarez
Hi, I'm afraid I'm not sure about how to install phpize and php-config. I used to install php using rpms, but this time I downloaded php5 from php.net and configure it with the following options: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --enable-soap The

[PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
I want to create a pixel that can be used to track certain activity on the site. I've got it working fine: I just mod_rewrite spacer.gif to a PHP app that does what I want it to do; but then I don't know how to actually return a blank pixel. Can anyone point me in the right direction? --

Re: [PHP] Prepopulating form fields afer an error

2005-07-25 Thread Matt Darby
select name=user $_REQUEST['user']==$curr_user?$select=selected:$select=; echo(option $select$curr_user/option); /select Jack Jackson wrote: Hi, I have a form and it does basic error checking after submission; when the user omits required fields it kicks back the form with highlighted

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Philip Hallstrom
I want to create a pixel that can be used to track certain activity on the site. I've got it working fine: I just mod_rewrite spacer.gif to a PHP app that does what I want it to do; but then I don't know how to actually return a blank pixel. Can anyone point me in the right direction? Create

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Matt Darby
A blank (transparent) pixel would be more difficult, but a simple colored pixel would be easy: In target file: img src=pixel.php pixel.php ? $im=imagecreate(1,1); $white=imagecolorallocate($im,255,255,255); imagesetpixel($im,1,1,$white); header(content-type:image/jpg); imagejpeg($im);

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
Thanks. A transparent pixel is what I'll need - any guidance on that? On Jul 25, 2005, at 12:37 PM, Matt Darby wrote: A blank (transparent) pixel would be more difficult, but a simple colored pixel would be easy: In target file: img src=pixel.php pixel.php ? $im=imagecreate(1,1);

Re: [PHP] Prepopulating form fields afer an error

2005-07-25 Thread Mark Cain
Here's the way I do it: The following is an HTML code snippet with embedded PHP code for the intelligence. select name=shipper option value=DHL ? if ($shipped_via == DHL) echo selected; ?DHL option value=FedEx ? if ($shipped_via == FedEx) echo selected; ?FedEx option value=UPS ?

Re: [PHP] How would you create a tracking pixel?

2005-07-25 Thread Brian Dunning
I did some more STFW and came up with this - I'll try it to see if it works. Header( Content-type: image/gif); printf (%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c% c%c%c%c%c%c%c%c%c%c%c%c%c, 71,73,70,56,57,97,1,0,1,0,128,255,0,192,192,192,0,0,0,33,249,4,1,0,0,0,0

[PHP] Full time PHP/MySQL position available

2005-07-25 Thread Greg Donald
We have a great deal of PHP/MySQL web development work scheduled and as a result my employer is in need of another coder. Here is the ad on Monster: http://jobsearch.monster.com/getjob.asp?JobID=25532652 Resumes: [EMAIL PROTECTED] The job is in Nashville, TN, USA. Only local or soon to be

Re: [PHP] running number

2005-07-25 Thread Robert Sossomon
CREATE TABLE `users` ( `num` int(10) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `login` varchar(100) NOT NULL default '', `password` varchar(20) NOT NULL default '', PRIMARY KEY (`num`), KEY `num` (`num`) ) TYPE=MyISAM AUTO_INCREMENT=12345 ; That should help

[PHP] Delivery reports about your e-mail

2005-07-25 Thread cf-newbie
œÔ]»È§¦‹Fik˘ä/ÐÚZQ‰ò'É% æQç6^ÂCÛ 3é GÉÝwpÑtžÎ´ÎH*BOðqşªX©¦ tº!‡¡Ø:I9Ó¤xsʛ6ÚOJm¼ôRɽ¸»[ÚÛaÉ^JYû¼£79Ê5¤$}NbÍ4‘ÊÚª{ÞX£~7…»c¢©”bþ ʗ|/ÃKN7áó¨-ËmBëwځœÄL°9#䩑ªjcÙ孅ôê³dÚ1‰Ãy‚放ú¤­âeiÒMEz?¥(—DÉä2Ù].¾¦êõËʱµVڏOÏÅík'”|²

Re: [PHP] Prepopulating form fields afer an error

2005-07-25 Thread Jack Jackson
Thanks so much, Mark, Matt and John! I'll play with all those. Much appreciated, JJ Mark Cain wrote: Here's the way I do it: The following is an HTML code snippet with embedded PHP code for the intelligence. select name=shipper option value=DHL ? if ($shipped_via == DHL) echo selected;

[PHP] [PHP4]: Problem with Form not putting Data in Post Request

2005-07-25 Thread maddog1169
Hi, I got a slight problem with a Form that doesn't correctly transmits its data correctly under entering some special data. I put together an example to get hold of the problem but so far I do not have a clue why this doesn't work. Be great if someone got an idea. Here is the sample

[PHP] performance.

2005-07-25 Thread Rodolfo Gonzalez Gonzalez
Hi, this could be a silly question. Is there some performance penalty when using the operator like this: $var =EOP add a bunch of text here and here EOP; Just curious. Thanks, Rodolfo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [PHP4]: Problem with Form not putting Data in Post Request

2005-07-25 Thread Rasmus Lerdorf
maddog1169 wrote: The one that does not get accepted is Group including the You have something like this? input type=text name=Group / It should work. Make sure you have quotes around it, of course, or weird stuff will happen. Try something like this: form action=f.php method=POST

Re: [PHP] running number

2005-07-25 Thread Roger Thomas
Thanks to all that have helped. I am inclined at Robert's suggestion below that would free me from worrying about locking issues. Thanks everybody. -- Roger Quoting Robert Sossomon [EMAIL PROTECTED]: CREATE TABLE `users` ( `num` int(10) NOT NULL auto_increment, `name` varchar(100) NOT

[PHP] Searching and Count within array

2005-07-25 Thread Bagus Nugroho
Hi Master, I have an array as : $myArray = array('four','four','four','four','one,,'three','three','three','two','two'); Then I want output like this, //== four is 4 times three is 3 times two is 2 times one is 1 times //(it 's better if one is 1 time). //=== How can I search and

Re: [PHP] Searching and Count within array

2005-07-25 Thread Rasmus Lerdorf
array_count_values() Bagus Nugroho wrote: Hi Master, I have an array as : $myArray = array('four','four','four','four','one,,'three','three','three','two','two'); Then I want output like this, //== four is 4 times three is 3 times two is 2 times one is 1 times //(it 's