Re: [PHP] Can't connect to MySQL via PHP

2013-01-13 Thread Rick Dwyer
. --Rick On Jan 13, 2013, at 12:12 PM, Jim Giner wrote: > Regardless of the choice of interface to mysql, regardless of the completely > harmless but educational tips from Ash, and very deliberately ignoring the > un-helpful and extraneous comments of others, > I'm wondering ho

Re: [PHP] Can't connect to MySQL via PHP

2013-01-12 Thread Rick Dwyer
On Jan 12, 2013, at 3:56 PM, "admin" wrote: > > >> -Original Message- >> From: Rick Dwyer [mailto:rpdw...@earthlink.net] >> Sent: Saturday, January 12, 2013 8:26 AM >> To: php-general@lists.php.net >> Subject: [PHP] Can't connect t

[PHP] Can't connect to MySQL via PHP

2013-01-12 Thread Rick Dwyer
t. Can someone tell me what I am doing wrong here? Appreciate it. Thanks, --Rick $db_name = "mydb"; $vc_host= "db.hostprovider.net"; $vc_user= "user"; $vc_pass= "pass"; $connection = @mysql_

Re: [PHP] Pear Mail - Trap for errors?

2012-11-15 Thread Rick Dwyer
On Nov 14, 2012, at 10:48 PM, tamouse mailing lists wrote: > On Wed, Nov 14, 2012 at 7:19 PM, Rick Dwyer wrote: >> Hello all. >> >> I have some Pear Mail code composing an email and sending it to an external >> smtp server for sending. >> >> The iss

[PHP] Pear Mail - Trap for errors?

2012-11-14 Thread Rick Dwyer
have experience with the scenario below… specifically with determining if the smtp server accepted the mail for delivery? Thanks for any info. --Rick require_once "Mail.php"; $from = "f...@address.com"; $to = "t...@address.com"; $subject = "H

Re: [PHP] PHP to decode AES

2012-10-18 Thread Rick Dwyer
On Oct 18, 2012, at 4:39 PM, Adam Richardson wrote: > On Thu, Oct 18, 2012 at 12:06 PM, Rick Dwyer wrote: >> Hello all. >> >> Has anyone ever tried to decode a JAVA AES/CBC encrypted string with PHP >> before? >> >> I found a tutorial online with the

Re: [PHP] PHP to decode AES

2012-10-18 Thread Rick Dwyer
On Oct 18, 2012, at 2:38 PM, Matijn Woudt wrote: > On Thu, Oct 18, 2012 at 7:19 PM, Rick Dwyer wrote: >> To correct what I posted below, $code that I'm passing to my function is >> encrypted… not plain text: >> >> ch7WvaSrCiHLstNeNUp5SkPfPgw0Z8vrNPJT+9vU7jN/C

Re: [PHP] PHP to decode AES

2012-10-18 Thread Rick Dwyer
To correct what I posted below, $code that I'm passing to my function is encrypted… not plain text: ch7WvaSrCiHLstNeNUp5SkPfPgw0Z8vrNPJT+9vU7jN/C --Rick On Oct 18, 2012, at 12:06 PM, Rick Dwyer wrote: > Hello all. > > Has anyone ever tried to decode a JAVA AES/CBC encrypt

[PHP] PHP to decode AES

2012-10-18 Thread Rick Dwyer
of unprintable characters. I thought maybe it was due to $code not being in a hex format, but after converting to hex and resubmitting, I still unprintable characters. Any info is appreciated. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Serving an image

2012-10-15 Thread Rick Dwyer
when it is opened? Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array_diff problems

2012-04-27 Thread Rick Dwyer
Thanks to both for the direction. --Rick On Apr 27, 2012, at 4:13 PM, Jim Giner wrote: > > > Are these arrays nested in an array? In that case the manual says you have > to do the compare differently. On Apr 27, 2012, at 4:19 PM, admin wrote: > > > -Origina

[PHP] Array_diff problems

2012-04-27 Thread Rick Dwyer
[Funding_Type] => Other Funding [Amount] => 50 [Frequency_Description] => Other [Other_Funding] => none )) $arraydifferences = (array_diff($myarray1,$myarray2)); I need $arraydifferences to record the differences between the two. Any help is appreciated. Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Insert group by

2012-04-26 Thread Rick Dwyer
ut I would like it to groups plurals with singular words as well. So "hats" are grouped with "hat". Since I'm doing a "group by" column name, I don't know that this can be done. Any help is appreciated. Thanks, --Rick -- PHP General Mailing

Re: [PHP] Selecting checkboxes based on SQL query

2012-02-23 Thread Rick Dwyer
0] => Array ( [cb] => 2 ) [1] => Array ( [cb] => 6 ) [2] => Array ( [cb] => 1 ) ) --Rick On Feb 23, 2012, at 2:08 PM, Fatih P. wrote: On Thu, Feb 23, 2012 at 8:49 PM, Rick Dwyer wrote: Hello all. I perform a SQL query like the following: $sql = 'select * f

[PHP] Selecting checkboxes based on SQL query

2012-02-23 Thread Rick Dwyer
heckbox. But I don't know how to create a custom function from the above array to provide that logic. I've tried some tutorials, but with no success as the array I am receiving is not like those in the tutorials. Any help would be greatly appreciated. Thank you. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form Post to different domain

2012-02-14 Thread Rick Dwyer
Thanks Dan. As it turned out the reason for not showing the passed values is that I didn't have "www" in the destination address and the values must have been getting lost when Apache redirected requests without www to the fully formed URL. --Rick On Feb 14, 2012, at

Re: [PHP] Form Post to different domain

2012-02-14 Thread Rick Dwyer
On Feb 14, 2012, at 1:16 PM, Daniel Brown wrote: On Tue, Feb 14, 2012 at 13:14, Rick Dwyer wrote: Hello all. If I have a form on domain A that uses POST to submit data and I want to submit the form to domain B on an entirely different server, how do I pull the form values (... echo

[PHP] Form Post to different domain

2012-02-14 Thread Rick Dwyer
Hello all. If I have a form on domain A that uses POST to submit data and I want to submit the form to domain B on an entirely different server, how do I pull the form values (... echo $_POST["myval"] returns nothing) from the form at domain B? --Rick -- PHP General Ma

Re: [PHP] Curl problems

2012-01-11 Thread Rick Dwyer
On Jan 11, 2012, at 6:29 PM, Matijn Woudt wrote: On Thu, Jan 12, 2012 at 12:20 AM, Rick Dwyer wrote: Hello all. I use curl to make a call to another page on my site... but it operates erroneously sometimes working... sometimes not. The page it calls creates an email and I can see

[PHP] Curl problems

2012-01-11 Thread Rick Dwyer
#x27;.$sess_id) ; curl_exec($curl_handle); curl_close($curl_handle); --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP page source charset

2011-12-20 Thread Rick Dwyer
On Dec 20, 2011, at 1:32 PM, Jim Lucas wrote: On 12/19/2011 6:44 PM, Rick Dwyer wrote: Hello all. When I set my page charset from iso-8859-1 to utf-8, when I run it through the W3C validator, the validator returns an error that it can't validate the page because of an illegal char

[PHP] PHP page source charset

2011-12-19 Thread Rick Dwyer
Hello all. When I set my page charset from iso-8859-1 to utf-8, when I run it through the W3C validator, the validator returns an error that it can't validate the page because of an illegal character not covered by UTF-8. "Sorry, I am unable to validate this document because on line 199

Re: [PHP] Preferred Syntax

2011-12-14 Thread Rick Dwyer
tinue to write new code breaking it out. And I too prefer a single quote for PHP and a double for HTML... even though the sample I displayed showed otherwise. Thanks to all who responded. --Rick

[PHP] Preferred Syntax

2011-12-14 Thread Rick Dwyer
t better in BBEdit. Is this just a preference choice or is one method better than the other? --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
On Nov 30, 2011, at 7:38 PM, Matijn Woudt wrote: On Thu, Dec 1, 2011 at 1:14 AM, Rick Dwyer wrote: On Nov 30, 2011, at 5:13 PM, Matijn Woudt wrote: Your decrypt function seems fine, and the encrypt/decrypt functions work fine both in the same file for me. Now you say you use $_GET["

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
s me problems. Is there alternative encrypting scheme that will not need url encoding (so I can be sure the passed url back from PayPal is ok as is)? --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
et_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))); } echo decrypt($myval); --Rick On Nov 30, 2011, at 4:14 PM, Adam Richardson wrote: On Wed, Nov 30, 2011 at 3:57 PM, Rick Dwyer wrote: Hello all. I am using the following function to encrypt a string: define('SALT

[PHP] mcrypt_encrypt help needed

2011-11-30 Thread Rick Dwyer
="var1=1&var2=2&var3=3"; The above when decrypted will spit out a string of unprintable characters. Is encrypt/decrypt choking on the "=" sign? I tried: $myval=htmlentities($myval); But it did not work. Any help is appreciated. Thanks, --Rick -- PHP General Mailing

[PHP] Writing out errors to a file

2011-11-03 Thread Rick Dwyer
Hello all. How do I get PHP to write out any errors or warnings to a text file that I can review and go through to troubleshoot issues? I don't have access to the ini file... so I was hoping for a simple write to a file at the web root. Thanks, --Rick -- PHP General Mailing List

[PHP] PHP and webmaster tools

2011-11-02 Thread Rick Dwyer
Hello list. I am looking for someone who knows PHP and has extensive experience with webmaster tools. I have a series of crawl errors I need resolved but cannot find the bad URL's anywhere on the site. Please contact me off list. Thanks, --Rick -- PHP General Mailing List

Re: [PHP] function.session-start in Webmaster Tools

2011-10-31 Thread Rick Dwyer
this... so I eliminated it. Not sure if that will fix as the page has never displayed an error and Google takes forever to recrawl the whole site. --Rick On Oct 31, 2011, at 5:44 AM, Stuart Dallas wrote: On 30 Oct 2011, at 20:30, Rick Dwyer wrote: Hello all. Not sure just how much

[PHP] function.session-start in Webmaster Tools

2011-10-30 Thread Rick Dwyer
start Can anyone explain why webmaster tools is seeing pages with links ending in "function.session-start"? I read up on the error itself... sometimes caused by whitespace before the session_start tag... have fixed that. Any info is appreciated. --Rick

[PHP] Displaying variables in text - clarification needed

2011-10-26 Thread Rick Dwyer
from mytable where name=' ".$myvar." ' and display='yes' "; What would explain why the former is suddenly causing problems? The version of PHP is 5.2.3 and from what I can tell, hasn't been updated since February of 2011. Thanks, --Rick --

[PHP] PHP Rounding Question

2011-05-20 Thread Rick Dwyer
rounded to 0.25 4.28 gets rounded to 4.50 3.71 gets rounded to 3.75 Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Destroying cookies... not working

2011-04-27 Thread Rick Dwyer
The following did the trick... is there any reason I should not use it? $name="mysession"; setcookie($name); --Rick On Apr 27, 2011, at 7:16 PM, Rick Dwyer wrote: Hello all. I have a logout page that should be destroying cookies when loaded... but it is not. setcookie

[PHP] Destroying cookies... not working

2011-04-27 Thread Rick Dwyer
t;Show Cookies" window. So I tried the following: setcookie('mycookie','',time()-3600); unset($_COOKIE['mycookie']); Still no luck. Any help with this is appreciated. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Memory_Limit adjustments

2011-01-06 Thread Rick Dwyer
00 Total:21898120 283912 21614208 Thanks for any help. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Parsing a phrase

2010-12-12 Thread Rick Dwyer
I have it working now using preg_replace. --Rick On Dec 12, 2010, at 3:50 PM, Rick Dwyer wrote: Thanks Nathan. The MySQL Match/Against will probably work well... but I would need to somehow add a "+" to the beginning of each word in the phrase so PHP will still be involved.

Re: [PHP] Re: Parsing a phrase

2010-12-12 Thread Rick Dwyer
Thanks Nathan. The MySQL Match/Against will probably work well... but I would need to somehow add a "+" to the beginning of each word in the phrase so PHP will still be involved. --Rick On Dec 12, 2010, at 2:51 PM, Nathan Rixham wrote: Rick Dwyer wrote: Hello all. I have a

[PHP] Parsing a phrase

2010-12-12 Thread Rick Dwyer
the search phrase to it's own variable so I can place them dynamically into the SQL statement. Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP loop to issue sql insert

2010-11-14 Thread Rick Dwyer
On Nov 14, 2010, at 8:15 PM, Simon J Welsh wrote: On 15/11/2010, at 12:47 PM, Rick Dwyer wrote: Hello List. I have a sql command that counts, groups and sorts data from a table. I need to insert the results of that sql command into different table. My sql SELECT looks like this

[PHP] PHP loop to issue sql insert

2010-11-14 Thread Rick Dwyer
p through the above found data, inserting each value as like this: insert into mytable (count, color) values ("578", "green"); insert into mytable (count, color) values ("254", "blue"); ...etc Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Auto-generating HTML

2010-09-20 Thread Rick Pasotto
t; > > Thanks, > > Alex > > Alex > > Just add a \n at the end as > > echo '\n'; That will not work. Single quotes means that the '\n' is not interpreted as a new line so you'll see a bunch of '\n' in the output. What I sometimes do is: $out = array(); $out[] = ''; $out[] = ''; $out[] = ' Page Title'; $out[] = ''; $out[] = ''; $out[] = 'This is the page body'; $out[] = ''; $out[] = ''; echo join("\n",$out); -- "Act as if you were already happy and that will tend to make you happy." -- Dale Carnegie Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strtotime()

2010-08-23 Thread Rick Pasotto
On Mon, Aug 23, 2010 at 11:38:41PM -0400, Daniel P. Brown wrote: > On Mon, Aug 23, 2010 at 22:27, Rick Pasotto wrote: > > > > After I sent my original post the one and only user comment on the > > relative date strings man page was pointed out to me. So, it's there but

Re: [PHP] strtotime()

2010-08-23 Thread Rick Pasotto
ecifically including those terms - are > in PHP5 >= 5.3.0 exclusively, for now. I don't believe there are any > plans to backport it to the 5.2 branch. > > Rick, if you want to add this as a "Documentation Problem" to > http://bugs.php.net/, one of us will like

[PHP] strtotime()

2010-08-23 Thread Rick Pasotto
vider running 5.2.13 on BSD and both give '1969-12-31'. What could be causing this? The second command is straight from the manual and the first is clearly implied. So far everything else seems to work as expected. -- "Economics is extremely useful as a form of employment for econom

Re: [PHP] Quotes vs. Single Quote

2010-08-05 Thread Rick Dwyer
On Aug 5, 2010, at 10:43 PM, Michael Shadle wrote: > On Thu, Aug 5, 2010 at 7:10 PM, Rick Dwyer wrote: >> Hi List. >> I've mentioned before that I am both just beginning to learn PHP AND I have >> inherited a number of pages that I'm trying to cle

[PHP] Quotes vs. Single Quote

2010-08-05 Thread Rick Dwyer
kstat = 'select field from table where fieldid = "'.$field_id.'"'; $result1 = @mysql_query($checkstat,$connection) or die('Couldn\'t execute query'); The focus being here: "'.$field_id.'"'; ('Couldn\'t execute query') Is this correct? Thanks for the help. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Encoding for W3C Validation

2010-08-03 Thread Rick Dwyer
On Aug 3, 2010, at 3:36 PM, Ashley Sheridan wrote: > On Tue, 2010-08-03 at 15:32 -0400, Rick Dwyer wrote: >> >> On Aug 3, 2010, at 3:15 PM, Sebastian Ewert wrote: >> >> > Ashley Sheridan wrote: >> >> On Tue, 2010-08-03 at 15:00 -0400, Rick Dwyer wrote

Re: [PHP] Encoding for W3C Validation

2010-08-03 Thread Rick Dwyer
On Aug 3, 2010, at 3:15 PM, Sebastian Ewert wrote: > Ashley Sheridan wrote: >> On Tue, 2010-08-03 at 15:00 -0400, Rick Dwyer wrote: >> >>> On Aug 3, 2010, at 2:47 PM, Sebastian Ewert wrote: >>> >>>> Rick Dwyer wrote: >>>>> Hello Lis

Re: [PHP] Encoding for W3C Validation

2010-08-03 Thread Rick Dwyer
Thanks Ash... this worked. --Rick On Aug 3, 2010, at 3:01 PM, Ashley Sheridan wrote: > On Tue, 2010-08-03 at 15:00 -0400, Rick Dwyer wrote: > >> On Aug 3, 2010, at 2:47 PM, Sebastian Ewert wrote: >> >>> Rick Dwyer wrote: >>>> Hello List. >>>>

Re: [PHP] Encoding for W3C Validation

2010-08-03 Thread Rick Dwyer
On Aug 3, 2010, at 2:47 PM, Sebastian Ewert wrote: > Rick Dwyer wrote: >> Hello List. >> >> In the Alt section of the IMG tag below, the variable $myitem has a value of >> "Who's There". >> >> echo " > src='/itemimages/$m

[PHP] Encoding for W3C Validation

2010-08-03 Thread Rick Dwyer
Hello List. In the Alt section of the IMG tag below, the variable $myitem has a value of "Who's There". echo " http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Encoding Ampersands

2010-07-28 Thread Rick Dwyer
Exactly what I was looking for! Thanks Josh. --Rick On Jul 29, 2010, at 12:33 AM, Josh Kehn wrote: > Rick- > > Give it a try! > > $test_one = "Green, Red & Blue"; > $test_two = "htm?color=blue&number=2&letter=a"; > > echo htmlentit

Re: [PHP] Encoding Ampersands

2010-07-28 Thread Rick Dwyer
So htmlentities() will work for "Green, Red & Blue"? Will it work for "htm?color=blue&number=2&letter="? --Rick On Jul 29, 2010, at 12:23 AM, Josh Kehn wrote: > Rick- > > Probably would use htmlentities() instead. You could also

[PHP] Encoding Ampersands

2010-07-28 Thread Rick Dwyer
nswer as simple as: urlencode($myvar) Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Pill

2010-07-17 Thread Rick Dwyer
On Jul 17, 2010, at 2:34 PM, Peter Lind wrote: On 17 July 2010 20:08, Rick Dwyer wrote: On Jul 17, 2010, at 1:29 PM, Ashley Sheridan wrote: Well, I did suggest one thing that could be happening. What do both string lengths come to? On the PC, the length of variable old string is 44

Re: [PHP] PHP Pill

2010-07-17 Thread Rick Dwyer
On Jul 17, 2010, at 2:08 PM, Rick Dwyer wrote: On Jul 17, 2010, at 1:29 PM, Ashley Sheridan wrote: Well, I did suggest one thing that could be happening. What do both string lengths come to? On the PC, the length of variable old string is 44 and new string is 39 On the Mac, the

Re: [PHP] PHP Pill

2010-07-17 Thread Rick Dwyer
38. This is all happening inside of FileMaker... I will test the PHP code inside a web browser on both plaforms to see what happens. --Rick

Re: [PHP] PHP Pill

2010-07-17 Thread Rick Dwyer
lugin is working as it is removing everthing... but gets tripped on the trade mark symbol. I sent a side by side screen shot of the fields on the mac and pc to your personal address. --Rick On Jul 17, 2010, at 12:34 PM, Ashley Sheridan wrote: On Sat, 2010-07-17 at 12:30 -0400, Rick

[PHP] PHP Pill

2010-07-17 Thread Rick Dwyer
queHousesAppointmentCalendar vs. the PC returns: AntiqueHousesTAppointmentCalendar Is there any reason the PC version of FM converts the TM symbol to a T instead of removing as it should via regex? Thanks. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HTML in emails

2010-07-04 Thread Rick Pasotto
gt; > We follow the standard and send both text and html. The text portion is the *only* portion I read. -- "When dealing with people, remember you are not dealing with creatures of logic, but creatures of emotion." -- Dale Carnegie Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Stripping Characters

2010-06-22 Thread Rick Dwyer
Very good. Thank you. --Rick On Jun 22, 2010, at 8:14 PM, Ashley Sheridan wrote: On Tue, 2010-06-22 at 20:03 -0400, Rick Dwyer wrote: Hello again list. My code for stripping characters is below. I'm hoping to get feedback as to how rock solid it will provide the desired output

Re: [PHP] Stripping Characters

2010-06-22 Thread Rick Dwyer
logic above capture and remove every non alpha numeric character and place a SINGLE hyphen between the non contiguous alpha numeric characters? Thanks for the help on this. --Rick On Jun 22, 2010, at 4:52 PM, Rick Dwyer wrote: On Jun 22, 2010, at 1:41 PM, Ashley Sheridan wrote: It

Re: [PHP] Stripping Characters

2010-06-22 Thread Rick Dwyer
f you are happy that your input won't go beyond the a-z0-9 range, then it should do what you need. No, actually I'm fairly confident characters outside the 128 range are what are causing me problems now. So I will try Richard's method. Thanks to all. --Rick

Re: [PHP] Stripping Characters

2010-06-22 Thread Rick Dwyer
Thanks to everyone who responded. Regarding the myriad of choices, isn't Ashley's, listed below, the one most like to guarantee the cleanest output of just letters and numbers? --Rick On Jun 22, 2010, at 11:44 AM, Ashley Sheridan wrote: On Tue, 2010-06-22 at 11:40 -0400,

[PHP] Stripping Characters

2010-06-22 Thread Rick Dwyer
item = str_replace("!","_","$mystring"); etc. For every possible character I can think of, is there a way to simply omit any character that is not an alpha character and not a number value from 0 to 9? --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] not receiving mail from list

2010-06-20 Thread Rick Pasotto
laughs does not believe in what he laughs at, but neither does he hate it. Therefore, laughing at evil means not preparing oneself to combat it, and laughing at good means denying the power through which good is self-propagating. -- Umberto Eco, "The Name of the Rose" Rick Pa

Re: [PHP] function within a class function

2010-06-20 Thread Rick Pasotto
On Sun, Jun 20, 2010 at 08:47:53PM -0400, Brandon Rampersad wrote: > $this->usort(); > self::usort(); > > On Sun, Jun 20, 2010 at 7:45 PM, Rick Pasotto wrote: > > > Within a class function I have defined another function for use with the > > usort() function. How d

[PHP] function within a class function

2010-06-20 Thread Rick Pasotto
T_STRING, expecting T_FUNCTION Is it not in the scope of the class function? -- "Memory is like an orgasm. It's a lot better if you don't have to fake it." -- Seymour Cray (on virtual memory) Rick Pasottor...@niof.nethttp://www.niof.net -- PHP Gener

[PHP] What am I missing here?

2010-06-19 Thread Rick Dwyer
o return anything: $PATH_INFO= substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRIPT_NAME']), strlen($_SERVER['REQUEST_URI'])); --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
OK, it's definitely an encoding issue... when I change the encoding of my PHP page in BBedit to Western ISO Latin 1, it replaces successfully. --Rick On Jun 18, 2010, at 5:13 PM, Daniel Brown wrote: On Fri, Jun 18, 2010 at 17:07, Rick Dwyer wrote: Navicat shows it as Latin

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
On Jun 18, 2010, at 5:13 PM, Daniel Brown wrote: Can you hit the database from the command line to see if there's a difference in the output when you take the server and browser out of the equation? No, I'm on Mac OS 10.5 and apparently I don't have a MySQL client installed in terminal

Re: [PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
On Jun 18, 2010, at 4:52 PM, Daniel Brown wrote: Check your database's character encoding. My check: Navicat shows it as Latin1. I believe UTF-8 is what it should be, but I don't want to change it without understanding what impact it will have. Note that, while it won't make a

Re: [PHP] newbie sequel question: how do we search for multiple things on 1 field like:

2010-06-18 Thread Rick Dwyer
SELECT * FROM contacts WHERE state = 'CA' and (name = 'bob' or name = 'sam' or name = 'sara') --Rick On Jun 18, 2010, at 4:30 PM, Dave wrote: SELECT * FROM contacts WHERE state = 'CA' and name = 'bob' or name = 'sam

[PHP] Replacing Registered Symbol

2010-06-18 Thread Rick Dwyer
str_replace("®","","$mystring"); I tried replacing the symbol in the above syntax with the HTML equivalent but no luck. Any help is appreciated. Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] String Parse Help for novice

2010-06-13 Thread Rick Dwyer
... if there were 5 more subdirectories... they would be dynamically assigned to a variable. --Rick On Jun 13, 2010, at 6:42 PM, Ashley Sheridan wrote: On Sun, 2010-06-13 at 18:35 -0400, Rick Dwyer wrote: OK, I get the following error: Warning: basename() expects parameter 1 to

Re: [PHP] String Parse Help for novice

2010-06-13 Thread Rick Dwyer
OK, I get the following error: Warning: basename() expects parameter 1 to be string, array given in When I use the following: $thepath = parse_url($url); $filename = basename($thepath); Is my variable thepath not automatically string? --Rick On Jun 13, 2010, at 6:23 PM, Ashley

[PHP] String Parse Help for novice

2010-06-13 Thread Rick Dwyer
5 more subdirectories... they would be dynamically assigned to a variable. Thanks for any help. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 02:35:54PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > >On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > >>Rick Pasotto wrote: > >>>I repeat: is there more than one way to run a php script from the cli? > >>>

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote: > Rick Pasotto wrote: > > > >I repeat: is there more than one way to run a php script from the cli? > > > > On *nix, you can add "#!/usr/bin/php" as first line and make file > executable (chmod +

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote: > > > On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > > > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > > &

Re: [PHP] php-cli

2010-03-14 Thread Rick Pasotto
On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote: > On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote: > > > Has cli php changed recently? > > > > I've got a php script (script1) that creates a php script (script2) by > > opening a file an

[PHP] php-cli

2010-03-14 Thread Rick Pasotto
is always wise." -- Alexander Meiklejohn, 1955 Rick Pasottor...@niof.nethttp://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error Message - Need help troubleshooting

2010-03-02 Thread Rick Dwyer
On Mar 2, 2010, at 9:45 AM, Joseph Thayne wrote: I do not know if the question has been answered, but how are you opening the session? Are you using session_start() or are you using session_register()? Hi Joseph. It is created via: session_start(); --Rick -- PHP General Mailing List

Re: [PHP] Error Message - Need help troubleshooting

2010-03-02 Thread Rick Dwyer
link and if so, sets the variable item_id to the value passed in the URL. Again however, this was not returning errors when the link was hardcoded with a value in place of item_id. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error Message - Need help troubleshooting

2010-03-02 Thread Rick Dwyer
coded value and I never received this error. Only when I made it dynamic did this error appear. Thanks for any help. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error Message - Need help troubleshooting

2010-03-02 Thread Rick Dwyer
The most annoying thing in making it difficult to to troubleshoot is this message does not always appear. --Rick On Tue, Mar 2, 2010 at 5:46 AM, Rick Dwyer wrote: Hello List. I have some JS code that open a new window with a contact form in it. When the link is clicked to open the

[PHP] Error Message - Need help troubleshooting

2010-03-01 Thread Rick Dwyer
o,status=no"); } As I said above, the error message does not always appear. Is the error due to the fact I am JS & PHP together? Any help in understanding what I am doing wrong is appreciated. --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread Rick Dwyer
uot; => 'Item Number:', . ); and I added: "my_id" => 'My ID Is:', And this works! So when I am on mypage.php and I enter a value into the form field "my_id" it carries over and repopulates should the form fail validation. But upon initial load

Re: [PHP] PHP Syntax Help - Check?

2010-02-24 Thread Rick Dwyer
id. SO, I created a hidden field on mypate.php with value="" and on formcheck.php, I added $my_id = $_Post['my_id']; However, when formcheck.php returns me to mypage.php, $my_id is still blank. Very frustrating. Any help determining what I am doing wrong is greatly ap

[PHP] PHP Syntax Help - Check?

2010-02-24 Thread Rick Dwyer
Hello all. I'm trying to learn PHP on the fly and I have a line of code that contains syntax I can't find documented anywhere: php echo check('element8'); In the above line, can someone tell me what "check" means? Thank you. --Rick -- PHP General Mailing

Re: [PHP] Formatting Decimals Further Help

2010-01-22 Thread Rick Dwyer
Thank you Nathan, This worked quite well. --Rick On Jan 22, 2010, at 8:10 PM, Nathan Rixham wrote: Rick Dwyer wrote: On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote: Thanks Nathan I'll give it a shot. np - here's a more condensed version: function round_to_half_ce

Re: [PHP] Formatting Decimals Further Help

2010-01-22 Thread Rick Dwyer
On Jan 22, 2010, at 7:30 PM, Nathan Rixham wrote: Thanks Nathan I'll give it a shot. --Rick your doing the number format before the rounding.. here's a version of the function that should fit the bill: function round_to_half_cent( $value ) { $value *= 100;

Re: [PHP] Formatting Decimals Further Help

2010-01-22 Thread Rick Dwyer
when the value of $my_price is 3.8 that is what it returns. How can I force the formatting of my_price to always contain either 2 or 3 decimal points (3 if the original number contains 3 or more decimal points to begin with) Thanks, --Rick Rick: Okay so 3.8 is stored in the database an

Re: [PHP] Formatting Decimals Further Help

2010-01-22 Thread Rick Dwyer
t returns. How can I force the formatting of my_price to always contain either 2 or 3 decimal points (3 if the original number contains 3 or more decimal points to begin with) Thanks, --Rick On Jan 11, 2010, at 10:39 PM, Adam Richardson wrote: On Mon, Jan 11, 2010 at 7:45 PM, Matt

Re: [PHP] Formatting Decimals

2010-01-11 Thread Rick Dwyer
On Jan 11, 2010, at 4:56 PM, tedd wrote: At 2:55 PM -0500 1/11/10, Rick Dwyer wrote: I have been asked to further modify the value to the nearest half cent. So if the 3rd decimal spot ends in 1 or 2, it gets rounded down to 0 If it ends in 3, 4, 5, 6 it gets rounded to 5. And if it 7, 8

Re: [PHP] Formatting Decimals

2010-01-11 Thread Rick Dwyer
well, I am not aware of the logic to configure this accordingly. Thanks, --Rick On Jan 11, 2010, at 10:55 AM, Ryan Sun wrote: $newprice = sprintf("$%.2f", 15.109); On Sun, Jan 10, 2010 at 8:36 PM, Rick Dwyer wrote: Hello List. Probably an easy question, but I am not able t

[PHP] Formatting Decimals

2010-01-10 Thread Rick Dwyer
when I am looking for "$0.11". I tried: $newprice = "$".round(number_format($old_price, 2, ".", ","),2); But no luck. Any help is appreciated. Thanks, --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2010-01-07 Thread Rick Dwyer
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 properly. Thanks for chiming in. --Rick On Jan 7, 2010, at 7:58 AM, As

  1   2   3   4   5   6   7   8   9   10   >