Re: [PHP] PHP Email Question

2010-09-20 Thread Jim Lucas
Joe Jackson wrote: > Hi > > All I need is in the message body of the email is to include more data from > the form. At present it only displays the 'message' field value in the body > of the email. I need to add further information into the email from the > form such as 'address' 'name' and 'tel

Re: [PHP] Checking file type when uploading

2010-09-17 Thread Jim Lucas
Catherine Madsen wrote: > Hi! > > I have created a form following the PHP manual to upload files and need > to restrict the upload to only PDF. How do I check the file type > ($_FILES['userfile']['type']?) and where: on the form page or on the > validation page? I want to be able to tell the use

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jim Lucas
ce to the month. Here is a combination of Tamara's method and they way that I would do it based off her example. Some of hers didn't work for me out of the box, so I modified it to my liking. Then I included your request to do HEREDOC syntax for outputting the list. '. htmlspecialchars($mname).''; } $select_month_options = join("\n", $o); echo << {$select_month_options} HTML; ?> Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: On 11 September 2010 17:56, Jim Lucas wrote: Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? I sat there for about a minute reading Ashley's comment

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Standalone WebServer for PHP

2010-09-10 Thread Jim Lucas
ini web server on my XP workstation just for testing little things. I have no idea how well it will perform in real world use nor have I tried it on any *nix setup. Just my experiences... Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about translating assoc. arrays to C

2010-09-04 Thread Jim Lucas
p://devzone.zend.com/article/1021 http://www.talkphp.com/vbarticles.php?do=article&articleid=49&title=creating-custom-php-extensions http://www.php.net/~wez/extending-php.pdf Just to list a few... Jim Regards, -Josh Joshua Kehn | josh.k...@gmail.com http://joshuakehn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SSI not working on PHP files with Apache

2010-09-02 Thread Jim Lucas
s it need to be configured in any special way to run them. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem retrieving variables.

2010-09-02 Thread Jim Lucas
all in the parent script place echo $qp; to see if the value is what you expect? Then within edv.php add this var_dump($_REQUEST); and see if $_REQUEST['qp'] is there, and what it is. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Removing link on the fly, but leave link text

2010-08-31 Thread Jim Lucas
lthough it isn't required, should be encoded and conversely will be decoded by the client. So, not to say that you are wrong, but I would suggest that it might be better to explain that the example you suggested should have been written in the following way instead. The > Operato

Re: [PHP] Secure Communication?

2010-08-29 Thread Jim Lucas
local data is located only on the remote server. So, my guess would be that the key would only be usable by the remote server. It would not work on the local server. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Questions about $_SERVER

2010-08-28 Thread Jim Lucas
tedd wrote: At 12:15 AM +0200 8/29/10, Peter Lind wrote: On 28 August 2010 23:45, tedd wrote: > So, I'm trying to figure out a compliment to $_SERVER['SERVER_NAME'] such as something like $_SERVER['REMOTE_NAME']. > Is there such a beast? You're not making any sense. For the script on y

Re: [PHP] Variable variables into an array.

2010-08-10 Thread Jim Lucas
Richard Quadling wrote: Hi. Quick set of eyes needed to see what I've done wrong... The following is a reduced example ... The output is an empty array. Examining $GLOBALS, I end up with an entries ... [Set] => Array ( ) [Entry] => Set[1] [Value] => Assigned

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Jim Lucas
l the duplicates and left one instance of the multiple entry values. This will add a permanent unique restraint to the table. So, you will never have dupps again. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Weird behavior of exec()

2010-07-16 Thread Jim Lucas
t the php binary is not in my path. run this echo passthru('which php'); Also, modify your existing exec() command to the following and it will capture errors too. exec('php b.php > output.txt 2>&1 &'); After running this is when I noticed it say "sh: ph

Re: [PHP] Malformed UTF-8 Data in JSON

2010-07-14 Thread Jim Lucas
hat the value is. And, if my suspicion is correct it is going to be because when you stripslashes and then try and decode it, it breaks because the escaped characters are not longer escaped. My suggestion would be to UTF*_encode() each piece of data before you stuff it into your json string. Then

Re: [PHP] Looking for a little MySQL help as well

2010-07-12 Thread Jim Lucas
Jim Lucas wrote: > Phillip Baker wrote: >> Thanks Jim, >> >> This outputs 2 results. >> Is there a way to get the one result set per product regardless of the >> number of categories associated with the product, yet displaying all the >> categories asso

Re: [PHP] Looking for a little MySQL help as well

2010-07-12 Thread Jim Lucas
Phillip Baker wrote: > Thanks Jim, > > This outputs 2 results. > Is there a way to get the one result set per product regardless of the > number of categories associated with the product, yet displaying all the > categories associated with said prodcut? Run this: SELEC

Re: [PHP] Validate if the field of a form is empty

2010-07-12 Thread Jim Lucas
"archivo"]["name"]; > $field = $_FILES["archivo[]"]["name"]; > > i dont know how to validate it, any help would be appreciated. > > Thanks, > To see what is happening, look at the output of print_r($_FILES); But, you should be doing it like th

Re: [PHP] Looking for a little MySQL help as well

2010-07-12 Thread Jim Lucas
e latin1_bin NOT NULL, PRIMARY KEY (`Product_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin AUTO_INCREMENT=5 ; INSERT INTO `products` (`Product_ID`, `Product_Name`) VALUES (1, 'Product A'),(2, 'Product B'),(3, 'Product C'),(4, 'Product D'

Re: [PHP] State and City Database

2010-07-09 Thread Jim Lucas
Floyd Resler wrote: > On Jul 9, 2010, at 1:58 PM, Jim Lucas wrote: > >> Paul M Foster wrote: >>> On Fri, Jul 09, 2010 at 10:43:09AM -0400, tedd wrote: >>> >>> >>> >>> >>>> Here's an example of my copy working: >>&g

Re: [PHP] State and City Database

2010-07-09 Thread Jim Lucas
click on the city, the list blinks and then deletes the contents of the state and zip code dropdown menus. System: Windows XP SP3 + FF v3.5.3 w/Firebug Checking with my Opera 9.24 install, seems to do something similar. Timer is very fast and it doesn't allow for me to click on anything.

Re: [PHP] Past discussion

2010-07-02 Thread Jim Lucas
can > find it in the archives again? > David, Daniel Brown wrote a weekly summary stats app that scanned his email account and totaled the number of lines of code someone wrote in their email sent to the mailing list. It might worth while to ask him for this code detection method(s).

Re: [PHP] PHP Trick or Not - You Be the Judge

2010-06-30 Thread Jim Lucas
at said, it will be much slower. It has to detect what type of object it is and then deal with all the pieces. And then in the end, output everything to the screen. -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Becaus

Re: [PHP] Array form processing

2010-06-29 Thread Jim Lucas
#x27;]; With that said, going back to your issue, you would do this: if ( $_REQUEST['painDesc'] && count($_REQUEST['painDesc']) ) { foreach($_REQUEST['painDesc'] as $key => $val) { echo "{$key}:{$val}"; } } -- Jim Lucas A: Maybe because some people ar

Re: [PHP] Quick session question

2010-06-24 Thread Jim Lucas
Danny wrote: > Thanks Ashley and Jim, > >> When you say 'sessions did not work' what do you mean? Sessions aren't being >> created? You can't access session variables? You need to be a bit more >> specific >> about the issue. > > Sorry, h

Re: [PHP] Quick session question

2010-06-24 Thread Jim Lucas
e. The problem is more the likely the calls to include a remote file. Basically, to expand your variables out, you would be doing this: include ( 'http://localhost/~user/new_project/sql/sql_dflts.inc' ) ; include ( 'http://localhost/~user/new_project/fnc/fnc_include_dir.inc' ) ;

Re: [PHP] Stripping Characters

2010-06-22 Thread Jim Lucas
>> - >> Richard Quadling >> "Standing on the shoulders of some very clever giants!" >> EE : http://www.experts-exchange.com/M_248814.html >> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp >> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND0024

Re: [PHP] Warning messages on web page.

2010-06-22 Thread Jim Lucas
ne 73 > > > The relevant lines are : > put a var_dump($thumbarray); right here and see what $thumbarray is > > 72 reset($thumbsarray); > > 73 while (list($key, $value) = each($thumbsarray)) { > > The site is at www.aadf.co.uk and select 'News'. > > Is

Re: [PHP] How could I mix popen() and pcntl_alarm() function ?

2010-06-15 Thread Jim Lucas
lue is ignored in PHP 5.3 unless php is compiled with --enable-zend-multibyte. [/quote] Also, doesn't look like you are using the "register_tick_function()" function. Is it required? Not sure, but their examples show its usage. -- Jim Lucas A: Maybe because some people are too annoyed by

Re: [PHP] Question - foreach.

2010-06-09 Thread Jim Lucas
y is referenced, foreach operates on a copy of the specified array and not the array itself. foreach has some side effects on the array pointer. Don't rely on the array pointer during or after the foreach without resetting it. -- Jim Lucas A: Maybe because some people are too annoyed by top-

Re: [PHP] Re: Passing large object between methods

2010-06-09 Thread Jim Lucas
mrfroasty wrote: > > //NOTHING!!!// > Well Mr. Froasty, was there a point to your email or do you always send empty emails with random files attached to them to list the list? Was their suppose to be a question along with that email? You simply forgot to add it? -- Jim Lucas A: Mayb

Re: [PHP] finding the web root

2010-06-08 Thread Jim Lucas
Jim Lucas wrote: > Tanel Tammik wrote: >> "Jim Lucas" wrote in message >> news:4c0e99d9.20...@cmsws.com... >>> Tanel Tammik wrote: >>>> Hi, >>>> >>>> i like to find the web root where the current file is. is there a

Re: [PHP] finding the web root

2010-06-08 Thread Jim Lucas
Tanel Tammik wrote: > "Jim Lucas" wrote in message > news:4c0e99d9.20...@cmsws.com... >> Tanel Tammik wrote: >>> Hi, >>> >>> i like to find the web root where the current file is. is there a better >>> solution? it must work both o

Re: [PHP] finding the web root

2010-06-08 Thread Jim Lucas
OR, __DIR__); > $web_root = '/' . implode('/', array_diff($cwd, $root)); > echo $web_root; > ?> > > maybe there is a function for that :D:D:D > > Br > Tanel > > > If I understand what you are asking for, I think this will work. -

Re: [PHP] complex if statement for field validation

2010-06-07 Thread Jim Lucas
$year1 = (int)$_POST['year1']; $date_value1= "{$year1}-{$month1}-{$day1}"; #if ( !checkdate($month1, $day1, $year1) ) if ( ($date_value1_ts = strtotime($date_value1) ) === FALSE ) { echo "Invalid Date.\n"; } els

Re: [PHP] Battle of Spam

2010-06-07 Thread Jim Lucas
Roberts suggestion. Please go back and re-read his message. Once you understand what information will be sent to you, you will realize by implementing this technique that you will be given all the information you need to identify the source of the problem. Then, hopefully you will also get the

Re: [PHP] Battle of Spam

2010-06-07 Thread Jim Lucas
rocessing script that processes said form. Change all the forms to use a single processing script and then you won't have such a big problem tracking down the "information processing error/insecurity" that you are having. -- Jim Lucas A: Maybe because some people are too annoyed by to

Re: [PHP] Parse info from 1,000 files to file

2010-06-03 Thread Jim Lucas
Sam Smith wrote: > Can someone briefly point me to the functions I'll need to parse some > information from thousands of files in a single directory and then > prepare the extracted info into a single file for SQL import? > > Like file() or readfile() and some regex and writefile?? > > Thanks >

Re: [PHP] PHP Form submitting to MySQL not working...

2010-06-03 Thread Jim Lucas
they are all at home. > > :) > -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- PHP General Mailing

Re: [PHP] PHP Form submitting to MySQL not working...

2010-06-03 Thread Jim Lucas
t be doing? (Happened to me once...) Are you accessing the files via http://localhost/... ?? or as a local file? -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read

Re: [PHP] strange problem of mysql_query

2010-06-02 Thread Jim Lucas
ysql from php 3. prepare the SQL query 4. executing said query 5. collecting/displaying the results of executed query As you can see, you gave us step 3. The problem could be in any of the other setups. -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get

Re: [PHP] Question about a security function

2010-05-21 Thread Jim Lucas
er msg which says to > contact tech support with a link. > > > Do you actually "show them" the error. That would give away your mystical powers of detection... :) -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have gre

Re: [PHP] Some undefined function errors

2010-05-20 Thread Jim Lucas
epending on what version of apache you are running, you need to make sure that you are loading the pgsql.so file or have the psql.ini file in your /var/www/conf/php5/ directory. This way it knows to load pg. -- Jim Lucas "Some men are born to greatness, some achieve greatness, an

Re: [PHP] Question about a security function

2010-05-20 Thread Jim Lucas
Al wrote: > > > On 5/20/2010 11:23 AM, David Otton wrote: >> On 20 May 2010 15:52, Al wrote: >> >>> I agree blacklisting is a flawed approach in general. My approach is to >>> strictly confine entry text to a whitelist of benign, acceptable >>> tags. The >> >> But that's not what you've done. Yo

Re: [PHP] preg_replace: avoiding double replacements

2010-05-17 Thread Jim Lucas
'', ); # Original String echo $text."\n"; # After regex is applied echo preg_replace($regex, $replacements, $text)."\n"; # After plain tag replacement happens echo str_replace($oldtags, $replacements, $text)."\n"; ?> See if that works for you. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Site with CSS and Internet Explorer

2010-05-15 Thread Jim Lucas
text-align: left; } -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- PHP General Mailing List (htt

Re: [PHP] Email with attachment

2010-05-15 Thread Jim Lucas
.$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol; $msg .= "This is a multi-part message in MIME format.".$eol; $msg .= "If you are reading this, please update your email-reading-software.".$eol; $msg .= "+ + Text Only + +".$eol.$eol; # Finished $msg .

Re: [PHP] regexp questions

2010-05-11 Thread Jim Lucas
; > > Post a regex and what you think it should match but doesn't. > > Again... Why don't you show us an example of what it is you are trying to match this against. Then, after that example, show us what you would like to see as the output. Then, send us a copy

Re: [PHP] Array group and sum values.

2010-05-11 Thread Jim Lucas
Paul Halliday wrote: > On Tue, May 11, 2010 at 2:25 PM, Jim Lucas wrote: >> Paul Halliday wrote: >>> I have this: >>> >>> while ($row = mysql_fetch_array($theData[0])) { >>> >>> $col1[] = $row[0]; >>> $col2[] = lookup($row[

Re: [PHP] Array group and sum values.

2010-05-11 Thread Jim Lucas
[0] => 261 ) [EGYPT] => Array ( [0] => 53 ) [INDIA] => Array ( [0] => 62 [1] => 50 ) ) -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatnes

Re: [PHP] Can't find my error

2010-05-06 Thread Jim Lucas
"i" in team." I'm pretty sure the ones who helped me figure this one out will find the humor in that one. :-) Maybe no 'i' but there's "me", "met", "meat", "eat", "at", and "am" :) Cheers, Rob. + mat

Re: [PHP] how to check for bandwidth limitations when uploading files?

2010-05-05 Thread Jim Lucas
sing? Is it Apache, lighttpd, php daemon, etc? If it is anything but directly talking to a php daemon, you must take into consideration that the parent web server does not hand off processing to PHP until it has received the entire file. At this point is when your timer script starts workin

Re: [PHP] Any One See where this is going wrong?

2010-05-01 Thread Jim Lucas
echo "Some Error Occured While Inserting Records"; } } } } } mysqli_close($batchconnection); } ?> __ Information from ESET Smart Security, version of virus signature database 5076 (20100430) __ The message was checked by ESET Smart Security. htt

Re: [PHP] Getting root privs

2010-04-29 Thread Jim Lucas
ne files for us. Might try something similar. It would be a lot safer then giving root access via PHP... :) -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespear

Re: [PHP] LDAP import a csv file from php

2010-04-27 Thread Jim Lucas
understand the basics of these two sections, present some code that you think does the trick and we can give you advice. -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally

Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Jim Lucas
host Recon, etc.). My gamer tag is "special tedd" What's your game? Cheers, tedd Battlefield 2142 Call Sign: ChefLord -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order

Re: [PHP] Recommendation for online PHP editor please....

2010-04-25 Thread Jim Lucas
entler.de/tools/filemanager/ Put it in a password protected area on your server and you have it made. It comes with syntax highlighting that has worked for me so far. -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because i

Re: [PHP] Directory permissions question

2010-04-19 Thread Jim Lucas
named "nobody"] and permissions 755. > > Is there any way the files could have been written other than by ftp > access or at the host root level? Clearly a php script couldn't. > > Thanks, Al.. > What version of Apache/PHP is it running? -- Jim Lucas

Re: [PHP] Basic switch statement

2010-04-16 Thread Jim Lucas
rport security doesn't allow them to use their terminals to run -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Solution

2010-04-13 Thread Jim Lucas
too. This is achieved by having two separate tables to hold the data. It is a 1 to nth relationship. PS: Gary, fix your mail server. It is telling me that you don't exist. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness th

Re: [PHP] Solution

2010-04-13 Thread Jim Lucas
27;test')or die('Error >> connecting to >> MySQL server'); >> >> $query="INSERT INTO name(fname, lname)"."VALUES('$fname','$lname')"; >> >> $result=mysqli_query($dbc, $query) >> or die('Error querying dat

Re: [PHP] Solution

2010-04-13 Thread Jim Lucas
s one and thought it was very informative. http://devzone.zend.com/article/4497-The-ZendCon-Sessions-Episode-17-SQL-Query-Tuning-The-Legend-of-Drunken-Query-Master It is pretty long, but it contains a lot of good information. Listen the part about how many records you can contain in memor

Re: [PHP] Little php code - error

2010-04-08 Thread Jim Lucas
impact on the size of the file, and all the while it's >> very easy to read. If you've accidentally missed out a closing brace >> you'll spot it immediately. >> >> It's called the Allman style and has another advantage. Consider: > > While we all love Ash, he is a blasphemer, as he argues against the One > True Style, which is K&R. (Please forgive him, Lords Kernighan and > Richie). ;-} > > In the OP's case, his error was syntax (a condition after an else > clause). But I don't know that even a syntax-highlighting editor would > have caught his error. > > Paul > The syntax highlighters that I use didn't recognize it as a problem. They styled it right up... -- Jim Lucas NOC Manager 541-323-9113 BendTel, Inc. http://www.bendtel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_match? Or something else?

2010-04-02 Thread Jim Lucas
] => 311 > > [letter] => - > > [2] => - > > ) > > Array > > ( > > ) > > However that's as far as it goes. For the other number it returns an empty > array and I know why, the decimal point. Now I can evaluate each $item

Re: [PHP] convert a string into an array

2010-04-02 Thread Jim Lucas
$tonames = (is_array($tonames) ? $tonames : array($tonames) ); $toemails = (is_array($toemails) ? $toemails : array($toemails)); -- Jim Lucas NOC Manager 541-323-9113 BendTel, Inc. http://www.bendtel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Need routine to tell me number of dimensions in array.

2010-03-15 Thread Jim Lucas
max_array_depth($row); } $cur_depth--; } } max_array_depth($in); echo "Max depth of array is: {$max_depth}"; ?> http://www.cmsws.com/examples/php/testscripts/dae...@daevid.com/0002.php -- Jim Lucas NOC Manager 541-323-9113 BendTel, Inc. http://www.bendtel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Deleting multiple backslashes; regex?

2010-03-15 Thread Jim Lucas
are limited. > > > Might I ask, how are the multiple slashes getting generated in the first place? Where is the data coming from? Next question would be: Do you want to completely remove all instances of multiple backslashes? Or, do you want to replace all instances of multiple backsla

Re: [PHP] Going from IIS6 to WAMP

2010-03-01 Thread Jim Lucas
dex.htm, index.html, or index.php Basically, with PHP, you need to make sure that anything you include is actually in your include path. Check that and let us know what you find. -- Jim Lucas NOC Manager 541-323-9113 BendTel, Inc. http://www.bendtel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP or SQL to do this?

2010-02-23 Thread Jim Lucas
ISTS `wine` ( `wineid` int(11) NOT NULL auto_increment, `barcode2` int(11) NOT NULL, PRIMARY KEY (`wineid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin AUTO_INCREMENT=4 ; INSERT INTO `wine` (`wineid`, `barcode2`) VALUES (1, 5), (2, -5), (3, 10); -- Jim Lucas A: Maybe beca

Re: [PHP] PHP / mySQL Project... Real men use 'cat'

2010-02-23 Thread Jim Lucas
ial to JOE. Pffft. Real men use Vim. And Emacs is for Martians with ten fingers on each hand. I use mg on OpenBSD. Somewhat the same as Emacs. Just a simplified version of it. And yeah, for what it's worth, I've been running Linux since 1996. And yeah, cats are smarter than dogs. Fla

Re: [PHP] syntax error in class

2010-02-10 Thread Jim Lucas
evaluated at compile time and must not depend on run-time information in order to be evaluated. [/quote] Basically, anything that requires the concatenation of string parts or usage of variables is not allowed. -- Jim Lucas "Some men are born to greatness, some achieve greatness,

Re: [PHP] Speed of sending email .. can I put them in a queue rather than wait?

2010-01-26 Thread Jim Lucas
s presentation. Jump to slide 11. > > http://www.phpclasses.org/browse/video/3/package/9.html > > If you want to use this solution, the MIME message package has a driver > class for queueing messages in Exchange pickup queue directory . Take a > look at the test_pickup_message.php example script. > > > http://www.phpclasses.org/mimemessage > > -- Jim Lucas NOC Manager 541-323-9113 BendTel, Inc. http://www.bendtel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Foreign Characters Break in MySQL

2010-01-21 Thread Jim Lucas
/clk.atdmt.com/GBL/go/196390709/direct/01/ How about showing a little of the insert code. ie: how you are gathering the data, how you are preping the data, and the actual insert statement. -- Jim Lucas NOC Manager 541-323-9113 BendTel, Inc. http://www.bendtel.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql_real_escape_string(0xffffffff) yields -1

2010-01-15 Thread Jim Lucas
Richard Lynch wrote: > The subject line says it all: > > mysql_real_escape_string(0x) yields -1 > > What's up with that? > > Is there some way to convince mysql_real_escape_string to use BIGINT? > > I guess I'll just PCRE for digits and then pass it in and... > > But what if somebody p

Re: [PHP] POLL: To add the final ?> or not...

2010-01-10 Thread Jim Lucas
he second included the first, it would still have the same results. Simple test: CONTENTS EOF No, as is, this will return 'No'. But if you place /ANY/ character between the ?> \n. But, you better make sure that nothing else is there along with it. J

Re: [PHP] Re: First time PHP user question

2010-01-07 Thread Jim Lucas
Ashley Sheridan wrote: > On Thu, 2010-01-07 at 08:32 -0500, Rick Dwyer wrote: > >> Thanks Ashley & Nathan. >> >> As it turns out, there is more than one "tmp" folder... and I was >> looking in the wrong one. When I SSH'd in the correct one, I created >> the missing file and it began to work p

Re: [PHP] After editing only the httpd.conf PHP 5.2.12 works in Apache2.2 on WindowsXP Professional 2002 SP 3, Can this be?

2010-01-05 Thread Jim Lucas
Because you are trying to look for a file or folder called test in the "C:/Program Files/Apache Software Foundation/Apache2.2/test" directory. Jim -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them."

Re: [PHP] Problem with XPath query

2009-12-14 Thread Jim Lucas
Lester Caine wrote: > > I often find that it's quicker to ask - because invariably the answer > presents itself the second you hit send ;) > Isn't that the truth! Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] json_last_error

2009-12-04 Thread Jim Lucas
ode() on a given string. My guess is that json_decode() set an internal variable that json_last_error() picks up and returns. Without having json_decode() say what the problem was/is then you can never recreate the json_last_error() function. Jim Lucas -- PHP General Mailing List (http://www.

Re: [PHP] PHP APACHE SAVE AS

2009-11-27 Thread Jim Lucas
ct DB settings, and have it connect to the DB. If that doesn't work, try using a command line utility that came with your mysql installation. Jim Lucas -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them.&qu

Re: [PHP] Pear include path problem

2009-11-17 Thread Jim Lucas
th(get_include_path() . PATH_SEPARATOR . $basePath); # Well, it is what it is $filename = "{$basePath}/php/Mail.php"; # Check to see if file exists and is readable BEFORE you try including it if ( is_file($filename) && is_readable($filename) ) { require_once $fil

Re: [PHP] RIGHT Function?

2009-11-13 Thread Jim Lucas
sono...@fannullone.us wrote: Jim, $parts = explode(PHP_EOL, $item['unitprice']); $price = '$'.(( count($parts) > 1 ) ? $parts[0] : $parts[(count($parts)-1)]); For some reason, I couldn't get explode to work with PHP_EOL. $parts[0] would return the en

Re: [PHP] RIGHT Function?

2009-11-13 Thread Jim Lucas
sono...@fannullone.us wrote: > I think I've solved a problem that I had posted back in September. > Here's a recap: > > == > I need to grab a dollar amount from a text field in a MySQL db that > can contain more information than just the price. Here are 4 examples > o

Re: [PHP] PHP: creating combobox in excel sheet?

2009-11-13 Thread Jim Lucas
a combo box from PHP with these (or other > classes)? By combobox I mean the / dropdown box in HTML. > Where will your combobox reside? What will your combobox contain/display? What are you going to generating your combobox with? Are you wanting to build it with one of the two listed so

Re: [PHP] How do I get reliable COMPUTERNAME?

2009-11-05 Thread Jim Lucas
data = phpinfo_array(TRUE); list(, $server_name) = explode(' ', $data['PHP Configuration']['System']); print( $server_name ); This will give you what you are looking for. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] please help with regular expression in preg_replace

2009-10-29 Thread Jim Lucas
t so wise to call sed > everytime, i would like to ask someone for help how to write preg_replace > pattern. > > thanx > > Rene > I would add one thing and change another. Adding an additional '^' to the start tells it to start at the beginning. And changing '*' to a '+' Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How is this possible? [Solved]

2009-10-28 Thread Jim Lucas
tedd wrote: > At 2:48 PM -0400 10/28/09, Robert Cummings wrote: >> Bob McConnell wrote: >>> From: tedd >>> I found the problem, which basically was that I had declared a variable in a preceding script with the same name, namely $user_id. When I changed my script to $u_id, everyt

Re: [PHP] PHP String convention

2009-10-28 Thread Jim Lucas
Nick Cooper wrote: > 2009/10/28 Jim Lucas: >> Nick Cooper wrote: >>> Hi, >>> >>> I was just wondering what the difference/advantage of these two >>> methods of writing a string are: >>> >>> 1) $string = "foo{$bar}"; >

Re: [PHP] PHP String convention

2009-10-28 Thread Jim Lucas
Nick Cooper wrote: > Hi, > > I was just wondering what the difference/advantage of these two > methods of writing a string are: > > 1) $string = "foo{$bar}"; > > 2) $string = 'foo'.$bar; > > I always use method 2 but have been noticing method 1 more and more in > source code. Is this just user

Re: [PHP] PHP+Apache suddenly not working

2009-10-27 Thread Jim Lucas
tokenizer shared extension for php >>> php5-xml-5.2.11_1 The xml shared extension for php >>> php5-xmlreader-5.2.11_1 The xmlreader shared extension for php >>> php5-xmlwriter-5.2.11_1 The xmlwriter shared extension for php >>> [r...@ricky /]# >>> >>> Any ideas for a completely ignorant, non-developer type? >>> >>> Thanks in advance. >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> create a small file with this code >> >> >> >> which will tell you want modules are enabled in php >> >> -- >> >> Bastien >> >> Cat, the other other white meat >> > > He already mentioned that phpinfo() fails. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > No, he mentioned that the "page" that he navigates to fails. My best guess would be that he is getting a fatal error, like he mentioned above, which is preventing the output of the phpinfo() to be displayed. He needs a stripped down file that has nothing but this in it. If that still doesn't work, the op needs to set the error level and error reporting options in his php.ini so it will display the errors in the browser. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamic menu with show hide capabilities - understanding possible workflow

2009-10-26 Thread Jim Lucas
MEM wrote: > Thank you all. > > Ok. Please stay with me, cause I still have some doubts. > Not only do I need to display the subitems on click but also, when the user > clicks on one menu item, I need to change the URI as well. > Why? Because, each time the user clicks on a menu item (whateaver

Re: [PHP] Array

2009-10-24 Thread Jim Lucas
Thanks, Ash http://www.ashleysheridan.co.uk foreach works with array and instances. Unless the class implements Transversable, it's public properties are used on the loop. foreach($object as $prop => $value ) //php translates t

Re: [PHP] regex pattern for extracting URLs

2009-10-23 Thread Jim Lucas
Brad Fuller wrote: > I'm looking for a regular expression to accomplish a specific task. > > I'm hoping someone who's really good at regex patterns can lend a quick hand. > > I need a regex pattern that will grab URLs out of HTML that have a > certain link text. (i.e. the word "Continue") > > Th

Re: [PHP] Trapping failure of file_get_contents()

2009-10-22 Thread Jim Lucas
. To squelch the warning notice that is generated, you might want to put an @ in front of the file_get_contents() call. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-21 Thread Jim Lucas
Dotan Cohen wrote: >> If you look a little closer, you will see that I am not using addslashes(). >> Rather, I am using addcslashes(). This allows to specify the characters >> that I want escaped, instead of the default assumed characters from >> addslashes(). >> > > I do not know which characte

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-21 Thread Jim Lucas
Jim Lucas wrote: > Dotan Cohen wrote: >>> So, actually taking a minute to read up on addcslashes(), it is a >>> rather handy >>> little function. >>> >>> Taking the list of characters that mysql_real_escape_string() says it >>> esc

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-21 Thread Jim Lucas
d \x1a \0 = \x0 \10 = \n \13 = \r \92 = \ \44 = ' \34 = " \26 = \x1a You could do something like this. function cleaner($input) { return addcslashes($input, "\0\10\13\92\44\34\26"); } Maybe this will help... Jim So far as I understand mysql_real_escape_string() was in

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-20 Thread Jim Lucas
Jim Lucas wrote: > Dotan Cohen wrote: >> 2009/10/19 Kim Madsen : >>> Dotan Cohen wrote on 2009-10-18 21:21: >>> >>>> I thought that one could not test if a database connection is >>>> established or not, this is the most relevant thi

Re: [PHP] Sanitizing potential MySQL strings with no database connection

2009-10-19 Thread Jim Lucas
en it has to be. All you need is to replicate the escaping of the same characters that mysql_real_escape_string() escapes. Simply do that. They are listed on the functions manual page on php.net http://php.net/mysql_real_escape_string Here is a function that I mocked up really quick. I have n

<    3   4   5   6   7   8   9   10   11   12   >