Re: [PHP] Facebook PHP compiler

2010-02-02 Thread Adam Richardson
Looks very promising !!! On Tue, Feb 2, 2010 at 1:12 PM, Robert Cummings rob...@interjinn.comwrote: Cesar D. Rodas wrote: Hello, Have you guys checked this PHP to C++ converter from the Facebook People? http://developers.facebook.com/news.php?blog=1story=358 Very interesting... I heard

Re: [PHP] Appalling Dreamweaver performance

2010-01-31 Thread Adam Richardson
, but I pointed it out just in case it was contributing to your pain. Adam On Sun, Jan 31, 2010 at 8:02 PM, Allen McCabe allenmcc...@gmail.com wrote: Notepad++ also has session saving capabilities. This means you can save which files you're working on, close Notepad++, and reload those files

Re: [PHP] help with preg_replace pattern

2010-01-26 Thread Adam Richardson
= preg_replace($pattern = /li[^]*style=DISPLAY: none[^]*/i','',$bl); (Note the i after the search pattern above.) Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com

Re: [PHP] Re: http vs https

2010-01-23 Thread Adam Richardson
well. Adam On Sat, Jan 23, 2010 at 12:44 PM, Nathan Rixham nrix...@gmail.com wrote: Ben Miller wrote: Is there a PHP function that will return whether the request was http or https? I have functions that need to cURL other servers - sometimes over SSL, sometimes not, depending whether

Re: [PHP] PHP 5.3 shared hosting

2010-01-20 Thread Adam Richardson
On Fri, Jan 15, 2010 at 6:25 PM, Michael A. Peters mpet...@mac.com wrote: Adam Richardson wrote: Hi, I've developed a framework that requires PHP 5.3 (it takes a more functional approach.) I'm hosting my own apps on a dedicated server running cpanel (thanks to their recent upgrade

[PHP] PHP 5.3 shared hosting

2010-01-15 Thread Adam Richardson
their shared hosting options, and I've only found a couple that accommodate PHP 5.3 so far. Anybody have recommendations for shared hosting providers that are supporting php 5.3 (many of the smaller sites I'm working with don't merit a VPS?) Thank you very much for your help, Adam -- Nephtali

Re: [PHP] strtotime

2010-01-14 Thread Adam Richardson
When you set the date to -00-00, you start the following sequence: 1. strtotime returns false, because -00-00 isn't a date it can parse into a timestamp. 2. date returns 1969, because it's not passed a valid timestamp and it works from December 31, 1969 for any invalid date.

Re: [PHP] strtotime

2010-01-14 Thread Adam Richardson
lets you easily identify an error. Again, I didn't read this anywhere, though, and I could be wrong. Adam On Thu, Jan 14, 2010 at 3:47 PM, Kim Madsen php@emax.dk wrote: Hi guys I have a question: snip Ashley Sheridan wrote on 14/01/2010 19:20: MySQL uses a default -00-00 value

Re: [PHP] Formatting Decimals

2010-01-11 Thread Adam Richardson
On Mon, Jan 11, 2010 at 7:45 PM, Mattias Thorslund matt...@thorslund.uswrote: 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

Re: [PHP] Unable to get output from exec ssh remote-server 'ping -c4 ip'

2009-12-29 Thread Adam Randall
' ) ) == 'Alive'; var_dump( $alive ); I use a variant of the above with good success on Gentoo. Adam. On Sun, Dec 27, 2009 at 1:53 PM, robert mena robert.m...@gmail.com wrote: Hi, I need to develop an interface that will, for example, ping IPs from a remote server. So the php script will be hosted

Re: [PHP] DailyWTF - Maybe I Needing Later

2009-12-23 Thread Adam Randall
to know that the guys making your bridges more earthquake resistant are the ones who are the cheapest. Adam. On Wed, Dec 23, 2009 at 7:34 AM, John Meyer johnme...@pueblocomputing.comwrote: On 12/22/2009 9:10 PM, Daevid Vincent wrote: http://thedailywtf.com/Articles/Maybe-I-Needing-Later.aspx

Re: [PHP] Help needed with calculation

2009-11-15 Thread Adam Shannon
/unsub.php -- - Adam Shannon ( http://ashannon.us ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Checkbox in PHP form

2009-11-10 Thread Adam Randall
size=2PFDsb Adam. On Sun, Nov 8, 2009 at 5:39 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: Need some help here with checkboxes in an html form. My issue is I have a form that needs to be viewed with checkboxes filled in depending on the values in the table. I tried: INPUT class=text

Re: [PHP] Re: Checkbox in PHP form

2009-11-10 Thread Adam Randall
, visit: http://www.php.net/unsub.php -- Adam Randall http://www.xaren.net AIM: blitz574 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] =??Q?Esco=AE?= Frontier Acela High Performance Fume Hoods

2009-11-03 Thread Adam Randall
-freezers/ I Esco on Twitter http://twitter.com/escoglobal I Esco on You Tubehttp://youtube.com/escoglobal I Esco Bio Safety Cabinet Micro-Site http://biologicalsafetycabinet.com/ I -- Xu Han-Jie -- Adam Randall http://www.xaren.net AIM: blitz574 -- PHP General Mailing List (http

Re: [PHP] How is this possible?

2009-10-28 Thread Adam Randall
). If you want to do basic sanitization to your incoming values, such as trimming them, you can do something like this too: foreach( $_GET as $k = $v ) $$k = trim( $v ); None of this is best practices, FYI. Adam. On Wed, Oct 28, 2009 at 10:29 AM, David Otton phpm...@jawbone.freeserve.co.uk wrote: 2009

Re: [PHP] security/deployment issue

2009-10-16 Thread Adam Randall
for the UID and GID then it will just display the UID or GID number. Adam. On Fri, Oct 16, 2009 at 1:13 PM, Augusto Flavio afla...@gmail.com wrote: Humm.. thanks for the replies. But i have another problem about rsync again. When i deploy a project using the rsync the permissions of all home

[PHP] COM Help (hopefully)

2009-10-09 Thread Adam Randall
on commission I'd love to discuss that with you. If anyone wants to help me with this I'd greatly appreciate it. Regards, Adam. -- Adam Randall http://www.xaren.net AIM: blitz574 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] html email showing br instead of line breaks

2009-09-24 Thread Adam Williams
I have users enter support tickets into a a textarea form and then it emails it to me, I'm trying to get the emails to display when they hit enter correctly, so i'm changing the \r\n to br, but in the email i'm getting, its displaying the br instead of a line break: here is the code:

Re: [PHP] html email showing br instead of line breaks

2009-09-24 Thread Adam Williams
Thanks, i'll try that. what is the difference in using '' and ? I thought they were interchangeable. Jonathan Tapicer wrote: \r\n should be between double quotes: \r\n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] html email showing br instead of line breaks

2009-09-24 Thread Adam Williams
oh nevermind, i see double quotes translate the \r\n to its appropriate EOL character. Adam Williams wrote: Thanks, i'll try that. what is the difference in using '' and ? I thought they were interchangeable. Jonathan Tapicer wrote: \r\n should be between double quotes: \r\n

[PHP] Best way to test for form submission?

2009-08-28 Thread Adam Jimerson
This question might give away the fact that I am a php noob, but I am looking for the best way to test for form submission in PHP. I know in Perl this can be done with if (param) but I don't know if that will work with PHP. I have read the Learning PHP 5 book and the only thing that was

[PHP] Re: Best way to test for form submission?

2009-08-28 Thread Adam Jimerson
On 08/27/2009 11:09 PM, Adam Jimerson wrote: This question might give away the fact that I am a php noob, but I am looking for the best way to test for form submission in PHP. I know in Perl this can be done with if (param) but I don't know if that will work with PHP. I have read

Re: [PHP] Is there limitation for switch case: argument's value?

2009-08-21 Thread Adam Randall
: echo sum=2 or 1\n; break; case 0: echo sum=0\n; break; default: echo sum=3/4/5\n; break; } Regards, Adam. On Thu, Aug 20, 2009 at 8:40 PM, Keithsurvivor_...@hotmail.com wrote: Hi, I

Re: [PHP] Form Spam

2009-08-20 Thread Adam Randall
it looks like it was sent :) That's assuming that they were able to figure out the math question before hand. Maybe not fort knox, but it does help out for me at least. Adam. On Thu, Aug 20, 2009 at 6:11 AM, Garygwp...@ptd.net wrote: I have a client with a form on his site and he is getting

Re: [PHP] Sanitizing mysql inserts of user data

2009-08-16 Thread Adam Randall
. You should in pretty much all cases be safe with just using the mysql_real_escape_string, which takes care of the - for you as well. Adam. On Sun, Aug 16, 2009 at 11:42 AM, Dotan Cohendotanco...@gmail.com wrote: I am sanitizing user-entered data before storing in mysql with this function

Re: [PHP] link to a css file requires .css ???

2009-08-16 Thread Adam Shannon
/) To unsubscribe, visit: http://www.php.net/unsub.php Oh, I think it's part of the spec. You could always use .htaccess rules to parse .css files as .php, this will keep search engines happy and browsers happy as well. -- - Adam Shannon ( http://ashannon.us )

Re: [PHP] Include Paths

2009-08-12 Thread Adam Shannon
suddenly turned into something of a matter of a minute rather then seconds. Has anyone ever experienced such an issue? Can anyone please advise? Thanks I wonder if loading the script/page with an absolute path would fix the problem. -- - Adam Shannon ( http://ashannon.us )

Re: [PHP] Image Headers break when image is out of bounds

2009-08-11 Thread Adam Shannon
://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Take the if (!headers_sent()) out and always send the headers. -- - Adam Shannon ( http://ashannon.us )

Re: [PHP] reason for a Notice:.. on one site but not another? (Same code.)

2009-08-10 Thread Adam Randall
That should be !== not !=== Adam. On Mon, Aug 10, 2009 at 12:17 PM, Ralph Deffkeralph_def...@yahoo.de wrote: for the same story there are the -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: how to say inverse your value (to a boolean)?

2009-08-10 Thread Adam Randall
http://us3.php.net/manual/en/language.operators.comparison.php Find Ternary on that page. It's a shortened conditional: cond ? true : false Adam. On Mon, Aug 10, 2009 at 6:27 PM, John Butlergovinda.webdnat...@gmail.com wrote:  echo something . (($a = $a^1) ? red\n : green\n); Re

Re: [PHP] Re: how to say inverse your value (to a boolean)?

2009-08-10 Thread Adam Randall
No...not zerowing...no... But yes, the ternary operator is the bomb, which you can get carried away with. Daevid knows what I mean :) Adam. On Mon, Aug 10, 2009 at 6:59 PM, Daevid Vincentdae...@daevid.com wrote: Pretty much the best operator ever invented IMHO. And Since PHP 5.3

Re: [PHP] Sending email w/ attachments

2009-08-10 Thread Adam Randall
Funny, I just had to figure out today how to nicely do HTML e-mails. I ended up using PEAR:Mail_mime, and it worked pretty well. It will also work for your attachments. I believe that PHP itself recommends it on their mail() function reference page. Adam. On Mon, Aug 10, 2009 at 6:49 PM, Skip

Re: [PHP] Undefined symbol ssl_onceonlyinit

2009-08-08 Thread Adam Randall
I'm expecting is not in the shared library I am using). You know, looking at the error messages that you posted again I now realize that the incompatability is not between imap and php, but imap and /libexec/ld-elf.so.1. That's where you need to look it seems. Adam. On Sat, Aug 8, 2009 at 1:34 AM

Re: [PHP] Server change affecting ability to send downloaded files???

2009-08-07 Thread Adam Randall
on in the ../../store/files path. Adam. On Fri, Aug 7, 2009 at 5:05 PM, Brian Dunningbr...@briandunning.com wrote: Correct, the files on the server have not changed either, and have been working fine for a long time. No funny characters. On Aug 7, 2009, at 4:59 PM, Adam Randall wrote: Sorry for replying

Re: [PHP] need to get .html files parsed by PHP. -- WAS: why does PHP parse *.html files in one subdir/ but not in another?

2009-07-19 Thread Adam Shannon
php.ini -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Adam Shannon ( http://ashannon.us )

Re: [PHP] why does PHP parse *.html files in one subdir/ but not in another?

2009-07-18 Thread Adam Shannon
On Sat, Jul 18, 2009 at 7:54 PM, Govinda govinda.webdnat...@gmail.comwrote: On Jul 18, 2009, at 6:36 PM, Adam Shannon wrote: On Sat, Jul 18, 2009 at 7:01 PM, Govinda govinda.webdnat...@gmail.comwrote: Hi all, ..sitting here thinking this is so easy, and I must have been over

Re: [PHP] why does PHP parse *.html files in one subdir/ but not in another?

2009-07-18 Thread Adam Shannon
/ to treat .html files as .php Just add this to your root .htaccess AddType x-mapp-php5 .html Thank you -Govinda Govinda govinda.webdnat...@gmail.com -- - Adam Shannon ( http://ashannon.us )

[PHP] running php script as a user?

2009-07-15 Thread Adam Williams
I have a page where a user authenticates, fills in some information in an HTML form, and then when clicking on the submit button, will need to execute a php schell script as that user to write some data to their /home/username directory. Since apache web server runs as the user nobody, how

Re: [PHP] Re: RFC/Survey for Our Newer Folks (Including Lurkers)

2009-07-11 Thread Adam Shannon
found the list by the link on php.net (lists.php.net), I mainly joined to grow in my experience with PHP. -- - Adam Shannon ( http://ashannon.us )

Re: [PHP] Split up Date Range

2009-07-01 Thread Adam Shannon
that allows them to enter a range? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Adam Shannon ( http://ashannon.us )

Re: [PHP] Apache module PHP 5.3 on Windows

2009-07-01 Thread Adam Shannon
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 -- - Adam Shannon ( http://ashannon.us )

[PHP] fixing new lines from textarea in an email?

2009-06-26 Thread Adam Williams
I have staff fill out a form that contains a textarea with their problem description and emailed to me when they click submit. Staff will press enter in the text area, but I'm having problems converting the \r\n into a new line in the email that is sent to me, here is the code: $subject =

Re: [PHP] fixing new lines from textarea in an email?

2009-06-26 Thread Adam Williams
Daniel Brown wrote: In a cursory glance, I've noticed the following code: htmlspecialchars(nl2br(str_replace('\r','',$_POST[problem]))) You are using a literal '\r' in your str_replace() function. This should instead be replaced with double quotes to translate the \r to its

[PHP] graphical integrated development environment recommendations?

2009-05-01 Thread Adam Williams
With the wide range of users on the list, I'm sure there are plenty of opinions on what are good graphical IDE's and which ones to avoid. I'd like to get away from using notepad.exe to code with due to its limitations. Something that supports syntax/code highlighting and has browser previews

[PHP] help with explode()

2009-04-24 Thread Adam Williams
I have a form where users submit search terms and it explodes the terms into an array based upon spaces. But, how can I have explode() keep words in quotation marks together? For example, if someone enters on the form: John Jill Judy Smith and I run $termsarray = explode( , $_POST[terms]);

Re: [PHP] help with explode()

2009-04-24 Thread Adam Williams
Jan G.B. wrote: You could try it with regular expression matching.. for example: ?php preg_match_all('/([a-z]+|[a-z ]+)/i', $searchstring, $resultarray); ? Regards Thanks. That seems to create 2 duplicate arrays, though. Can it be narrowed down to just array [0]?

Re: [PHP] help with explode()

2009-04-24 Thread Adam Williams
Jan G.B. wrote: Yes, preg_match_all returns all matches and the subpattern matches (the stuff inside the brakes) You can ommit stop it by using (?:) instead of ().. So: preg_match_all('/(?:[a-z]+|[a-z ]+)/i', $_POST[terms], $termsarray) You might want to check out the regular expression

Re: [PHP] I need ideas for things to code

2009-04-24 Thread Adam Williams
Andrew Hucks wrote: I've been coding PHP for about a year, and I'm running out of things to code that force me to learn new things. If you have any suggestions, I'd greatly appreciate it. I'm currently writing an in-house PHP helpdesk ticket system. I looked at all the open source ones i

Re: [PHP] SMTP mail server

2009-04-24 Thread Adam Williams
Ron Piggott wrote: How do I specify an actual SMTP server? (Like mail.host.com) This is what I have so far: mail($email, $subject, $message, $headers); I was to http://ca2.php.net/manual/en/function.mail.php and saw this syntax: mail ( string $to , string $subject , string $message [,

[PHP] how to determine if a mysql query returns an empty set?

2009-04-23 Thread Adam Williams
Is there a way to determine if a mysql query returns an empty set? I am selecting 10 results at a time with a limit statement and need to know when i've ran out of rows. I've only got 2 rows in the database, so when I start with row 10, it returns an empty set. I have the following code:

Re: [PHP] how to determine if a mysql query returns an empty set?

2009-04-23 Thread Adam Williams
Nitsan Bin-Nun wrote: mysql_num_rows() maybe? if not I probably haven't understood your question. Thanks, I never thought of trying that. This code works! $mysqli_get_requests = mysqli_query($mysqli,$get_requests); if (!mysqli_num_rows($mysqli_get_requests))

Re: [PHP] how to determine if a mysql query returns an empty set?

2009-04-23 Thread Adam Williams
Andrew Ballard wrote: It won't be any of those because the query is successful even if it returns no records. You could use http://us2.php.net/manual/en/mysqli-stmt.num-rows.php to determine how many rows were returned. Andrew Oh ok, thanks that makes sense. Thanks for the link also --

[PHP] php isn't displaying mysql query correctly

2009-04-17 Thread Adam Williams
I have the code: $mysqli_get_support_types = Select types from support_types order by types; $mysqli_get_support_types_result = mysqli_query($mysqli,$mysqli_get_support_types) or die(mysqli_error($mysqli)); while (mysqli_fetch_array($mysqli_get_support_types_result)) { echo

Re: [PHP] php isn't displaying mysql query correctly

2009-04-17 Thread Adam Williams
Shawn McKenzie wrote: No. How about: while ($row = mysqli_fetch_array($mysqli_get_support_types_result)) { echo option.$row['types']; } thanks, now that you provided that, I see that I left out the $row variable! -- PHP General Mailing List (http://www.php.net/)

[PHP] header() and passing sessions

2009-04-15 Thread Adam Williams
I need some help passing a session variable with a header() function. According to www.php.net/header, the documentation states: *Note*: Session ID is not passed with Location header even if session.use_trans_sid session.configuration.php#ini.session.use-trans-sid is enabled. It must by

Re: [PHP] header() and passing sessions

2009-04-15 Thread Adam Williams
abdulazeez alugo wrote: Hi, Well I'ld say the reason is quite obvious. You have simply not set $_session[username] . I'ld have done something like: -- option.php -- ?php session_start(); if ($_POST[option] == View Pending Requests) { $_session[username]= true; //sets the session

Re: [PHP] GIS with PHP tutorial

2009-04-15 Thread Adam Williams
have you looked into this? http://postgis.refractions.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Unexplained Issue Using Regex

2009-03-06 Thread Adam
would this not work? : ?php $string = http://www.zshare.net/video/541070871c7a8d9c;; $replaceWithThis = 'HELLYES-'; echo $string.\n; echo preg_replace('/\S+video\//',$replaceWithThis,$string).\n; echo $replaceWithThis.substr($string, strripos($string, '/')+1, strlen($string)).\n; echo

Re: [PHP] Syntax checker? Character replacing

2009-03-06 Thread Adam
just clean up your code and it will work: ?php $qString = 'http://www.google.ca/search?hl=enq=php+rocks%21%21%21meta='; if (isset($qString)) { $buffer = str_replace(,amp;,$qString); } echo $buffer.\n; ? OUTPUT: C:\php test.php

[PHP] help with end of line charater

2009-01-30 Thread Adam Williams
I have staff inputting email addresses into a textarea named $list on a form and when they click submit, my php script sorts the email addresses and writes to disk. The problem is, lets say they enter the email addresses b...@mdah.state.ms.usstaff hits enter ama...@mdah.state.ms.usstaff hits

Re: [PHP] Re: help with end of line charater

2009-01-30 Thread Adam Williams
Shawn McKenzie wrote: This may be best handled in your sorting code. What does it look like? yeah just a second ago a big lightbulb went off in my head and i fixed my code to add a \r\n on saving, and strip it on viewing. I sort on viewing, not sort on saving. The viewing code looks

[PHP] Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
into smaller single or multipage documents. Has anyone ever heard of anything that might help me in this process? Adam. -- Adam Randall AIM: blitz574 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
-0800, Adam Randall wrote: I'm amazed that this either doesn't exist, or is hard to find. I basically am looking for a way to read in an image into PHP, or shell out to something on the Linux side, and determine, and see if it has a barcode in it or not. If it does, I need to decode the barcode

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
This completely internal, and highly sensitive. Also, the documents themselves will different every time likely as they can either be faxes with who knows what type of skewing/quality/orientation. I need to be able to read them and find out what the barcodes are, if any. Adam. On Wed, Dec 17

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
I would have thought so too, but haven't found anything yet. Maybe there is an answer there (I have Imagick installed for example). iText, a java utility, has the ability to write barcodes nicely to PDF, too bad that there's no some reverse there either. Adam. On Wed, Dec 17, 2008 at 4:42 PM, Al

Re: [PHP] Re: Read/decode barcodes from an image

2008-12-17 Thread Adam Randall
Yeah, I have played with JOCR/GOCR, but it seemed somewhat inaccurate. Does anyone have any examples of working with it in code so that I can figure out how to incorporate it into my solutions? Adam. On Wed, Dec 17, 2008 at 5:17 PM, Bastien Koert phps...@gmail.com wrote: On Wed, Dec 17, 2008

Re: [PHP] Trre/Drop Down quick app for testing database tbls

2008-11-28 Thread Adam Lewis
2008/11/28 Adam Lewis [EMAIL PROTECTED] 2008/11/28 bruce [EMAIL PROTECTED] Hi. I've got a few tbls that I'm testing. I'd like to have a simple web app to be able to iterate through the tbls to test out what I have in them. I'd like to be able to have each tbl as a drop-down/select box

[PHP] removing text from a string

2008-11-04 Thread Adam Williams
I have a file that looks like: 1. Some Text here 2. Another Line of Text 3. Yet another line of text 340. All the way to number 340 And I want to remove the Number, period, and blank space at the begining of each line. How can I accomplish this? Opening the file to modify it is easy, I'm

Re: [PHP] removing text from a string

2008-11-04 Thread Adam Williams
Thanks Boyd, your code did exactly what I wanted! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Graph type

2008-08-08 Thread Adam Richardson
When I first saw it, I thought of a stem and leaf graph: http://cnx.org/content/m10157/latest/#table3 http://www.nervenet.org/papers_images/cb2.jpg However, your stem remains constant (10), so I'm not really sure what you're graphing. Adam On Fri, Aug 8, 2008 at 1:11 PM, tedd [EMAIL PROTECTED

Re: [PHP] PDO prepared statements and LIKE escaping

2008-08-04 Thread Adam Richardson
of the solutions I've undertaken. Recently, I've been avoiding LIKE conditions and using INSTR, LOCATE, CHARINDEX, etc. to avoid the potential for unescaped wildcards. Adam On Mon, Aug 4, 2008 at 12:33 PM, Larry Garfield [EMAIL PROTECTED]wrote: On Mon, 4 Aug 2008 11:48:39 -0400, Andrew Ballard

Re: [PHP] PDO prepared statements and LIKE escaping

2008-08-04 Thread Adam Richardson
Like I said, I'm not 'especially pleased' with any idea up until now. I'm certainly open to any other ideas. Adam On Mon, Aug 4, 2008 at 6:57 PM, Larry Garfield [EMAIL PROTECTED]wrote: Hm. So your solution is don't use LIKE? I can't say I'm wild about that. :-/ --Larry Garfield

[PHP] Changing PHP.ini

2008-07-15 Thread Adam Gerson
display_errors = Off. What else can I do? Thanks, Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Method chaining off constructors

2008-06-06 Thread Adam Richardson
The 'new' keyword has to apply to the object created in the constructor (and not the return value of any of the follow-up calls.) To establish this precedence, chaining wasn't allowed on constructors. On Fri, Jun 6, 2008 at 11:04 AM, Eric Butera [EMAIL PROTECTED] wrote: On Fri, Jun 6, 2008

[PHP] going from procedural style to object orientated style coding

2008-05-30 Thread Adam Williams
I was wondering if anyone knew of some books/tutorials/howto's, etc on going from procedural style coding to object orientated coding with PHP? I've been using PHP since version 3 and am used to the procedural style, but I'm noticing that PHP's trend is going to the object orientated style,

Re: [PHP] Restricting access to a file

2008-05-28 Thread Adam Richardson
, the controller sets the headers, retrieves the file, and then outputs the file contents to the output stream. Otherwise, the controller redirects the visitor to a page that let's them know they don't have access, but prompts them to pay/sign up to get the access for the product. Adam On May 28

Re: [PHP] use of static methods after namespaces arrive

2008-05-28 Thread Adam Richardson
of the time, though, I'd probably start out with a class method instead of a namespaced function so I could more readily adapt to OOP practices if desired as the implementation evolves. Adam On Wed, May 28, 2008 at 11:33 AM, Iv Ray [EMAIL PROTECTED] wrote: In which situation would somebody use

Re: [PHP] Validating Form input

2008-05-15 Thread Adam Richardson
pages with javascript quite easily. I'm pleased with this approach after using for it for a while now, and I recommend it to others. Adam On May 14, 2008, at 10:48 PM, Chris W wrote: I was wondering what others think of my approach to form validation. I know many use Java script to do

RE: [PHP] Re: Ignore Tags

2008-05-11 Thread Adam Richardson
. You can read more at the site below: http://www.regular-expressions.info/lookaround.html Adam -Original Message- From: Jorge Peña [EMAIL PROTECTED] [mailto:=?ISO-8859-1?Q? Jorge_Pe=F1a _[EMAIL PROTECTED]?=] Sent: Monday, May 12, 2008 12:27 AM To: php-general@lists.php.net Subject: [PHP] Re

Re: [PHP] php.ini

2008-05-09 Thread Adam Richardson
And, at some hosts you have to change the settings in htaccess as opposed to php.ini. On Fri, May 9, 2008 at 12:53 PM, André Medeiros [EMAIL PROTECTED] wrote: I'm not sure PHP5 would read php.ini from that directory. You should take in account that your hosting company may _NOT_ allow you to

[PHP] Question on PHP 6 and static calls to instance methods.

2008-05-03 Thread Adam Richardson
, Adam Adam Richardson Envision Internet Consulting, LLC Phone: (517)623-0485 Services and insight for building effective, user-oriented websites.

[PHP] Question on PHP 6 and static calls to instance methods.

2008-05-03 Thread Adam Richardson
framework. However, It sounds like this is going to cause a fatal error in PHP6. Is this in fact true? And, if the behavior is going to change, can somebody explain what the impetus for this change was? Thank you very much for your time, Adam Adam Richardson Envision Internet Consulting, LLC

[PHP] PHP Errors to screen

2008-04-29 Thread Adam Gerson
Where do I change the setting to print PHP errors to the screen when running in a web browser? Thanks, Adam -- Adam Gerson Assistant Director of Technology Apple Certified System Administrator (ACSA) Columbia Grammar and Prep School phone. 212-749-6200 ex. 321 fax. 212-428-6806 [EMAIL

[PHP] extract escaped quoted strings

2008-03-29 Thread Adam Jacob Muller
solution that thus-far evades me :( Any ideas are appreciated. -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] extract escaped quoted strings

2008-03-29 Thread Adam Jacob Muller
Assume that you should accept any string that PHP itself would accept, though no processing of the actual escapes is required nor desirable. On Mar 29, 2008, at 8:34 PM, Robert Cummings wrote: On Sat, 2008-03-29 at 19:16 -0400, Adam Jacob Muller wrote: Hi, Have a potentially interesting

Re: [PHP] extract escaped quoted strings

2008-03-29 Thread Adam Jacob Muller
Yes, php source code. On Mar 29, 2008, at 8:54 PM, Robert Cummings wrote: On Sat, 2008-03-29 at 20:41 -0400, Adam Jacob Muller wrote: Assume that you should accept any string that PHP itself would accept, though no processing of the actual escapes is required nor desirable. Sorry, I

Re: [PHP] extract escaped quoted strings

2008-03-29 Thread Adam Jacob Muller
token_get_all, fantastic! Thanks. - Adam On Mar 29, 2008, at 10:02 PM, Robert Cummings wrote: On Sat, 2008-03-29 at 21:31 -0400, Adam Jacob Muller wrote: Yes, php source code. You will not be able to do this with PCRE. You need something that can track state because double quotes can

Re: [PHP] New search related question

2008-02-05 Thread Adam Williams
http://search.mnogo.ru Jason Pruim wrote: Hi Everyone! :) Just a quick question, I've done some googling but haven't been able to find what I need... I am looking at doing a search function for someone's website, the website is just static HTML files, and she doesn't want to redo the entire

[PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
I'm having users enter dates in MM-DD- format. is there a way to check if what they have entered is invalid (like if they enter 1-15-2008 instead of 01-15-2008) ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
Thanks, I think I have it: $dateexplode = explode(-, $_POST[date_entered]); if (!preg_match(/^(\d{2})$/, $dateexplode[0],$data1) || !preg_match(/^(\d{2})$/, $dateexplode[1],$data2) || !preg_match(/^(\d{4})$/, $dateexplode[2],$data3)) { die (you have entered an invalid date);

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
Andrew Ballard wrote: Just curious why you won't take 1-15-2008. Once you validate it, you can always assign it to a variable as either a timestamp or a DateTime object and then format it however you want when you display it, send it to a database, or whatever you are doing with the date.

Re: [PHP] checking user input of MM-DD-YYYY

2008-01-15 Thread Adam Williams
Andrew Ballard wrote: All the more reason I would turn it into a timestamp or DateTime object in PHP first. That will prevent trying to insert something like what I used above. Then I would get rid of the MySQL STR_TO_DATE function in the $mysqli_insert_sql value just replace it with something

[PHP] mysql date question

2008-01-03 Thread Adam Williams
I have a field in mysql as shown by describe contract; | length_start | date| YES | | NULL || Which stores it in the mysql format of -MM-DD. However, I need the output of my select statement to show it in MM-DD- format. I can select

[PHP] Re: mysql date question

2008-01-03 Thread Adam Williams
nevermind, figure it out, had to take the ' ' away from contract.length_start :) Adam Williams wrote: I have a field in mysql as shown by describe contract; | length_start | date| YES | | NULL || Which stores it in the mysql format of -MM

[PHP] handling ' with mysql/php insert and select

2008-01-03 Thread Adam Williams
In my form, I am parsing all the text inputs through mysql_real_escape_string() before inserting the data. however, when I look at the SQL query in PHP, when I type the word blah's to my text box variable, and then insert it into mysql after being ran through mysql_real_escape_string(), it

[PHP] Wrong parameter count for imap_open()

2008-01-02 Thread Adam Williams
I'm running PHP 5.2.4 and getting the error: *Warning*: Wrong parameter count for imap_open() in */var/www/sites/intra-test/contract/login.php* on line *9 *My code is: $mbox = imap_open(\{mail.mdah.state.ms.us/imap/novalidate-cert:143}INBOX\, \.$_POST[username].\, \.$_POST[password].\); //

[PHP] Fatal error: Function name must be a string

2008-01-02 Thread Adam Williams
I'm getting the following error and I don't see whats wrong with my line. Any ideas? *Fatal error*: Function name must be a string in */var/www/sites/intra-test/contract/perform.php* on line *57* and my snippet of code is: if ( $_POST[perform] == View Contracts ) {

[PHP] how to handle inserting special characters into a mysql field

2007-12-14 Thread Adam Williams
I'm going to be inserting data from a PHP form into a mysql field. The data could contain special characters like ' \ /, etc. How do I handle that? just $data = addslashes(htmlspecialchars($data)); before the insert query? because later on the data will be read back from the mysql db

Re: [PHP] how to handle inserting special characters into a mysql field

2007-12-14 Thread Adam Williams
Thanks for all the replies everyone. I have a question on mysql_real_escape_string(). The PHP example page shows: $query = sprintf(SELECT * FROM users WHERE user='%s' AND password='%s', mysql_real_escape_string($user), mysql_real_escape_string($password)); and I

<    1   2   3   4   5   6   7   8   9   10   >