Re: [PHP-DB] php maximum characters in text field

2007-10-17 Thread Niel Archer
Hi

> Does anyone know how to look for a "Curly quote" or "typographer's quotation 
> mark".

Do you mean the equivalent of the left and right double quote entities
in HTML (or 66's and 99's as we called them at school)?


--
Niel Archer

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] php maximum characters in text field

2007-10-17 Thread VanBuskirk, Patricia
I was able to copy and paste from the customer's email exactly what they
were trying to submit.  When I back-spaced out their single quote and
put in my own, it worked fine.  That's how I narrowed it down to that
particular character.  With much help from a coworker, I was able to
implement some functions, and call them BEFORE php tries to create the
new record in the database.  That was my biggest problem ... I put the
cleanup code in the wrong place, after the new record command.  However,
here's what the function looks like (it also gets out ~'s:

function convert_smart_quotes($string) 
{
 $search = array(chr(145),
   chr(146),
   chr(147),
   chr(148),
   chr(151));
  $replace = array("'",
   "'",
 '"',
 '"',
 '-');
  return str_replace($search, $replace, $string); }


-Original Message-
From: Instruct ICC [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 17, 2007 1:54 PM
To: php-db@lists.php.net
Subject: RE: [PHP-DB] php maximum characters in text field


> Does anyone know how to look for a "Curly quote" or "typographer's
quotation mark". They are being submitted on our form under customer
description. I have created a function that replaces a regular straight
quotation mark ($title = str_replace("'", "", $title);), but do not know
what to put in as the "look for" for the curly mark!

How do you know they are submitting ?
Can you copy  from that source, then paste it into your str_replace
function?

Or since it seems to be a two-byte character (I didn't see it at
asciitable.com):
Maybe you need http://php.he.net/manual/en/ref.mbstring.php
mb_ereg_replace

_
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] php maximum characters in text field

2007-10-17 Thread Instruct ICC

> Does anyone know how to look for a "Curly quote" or "typographer's quotation 
> mark". They are being submitted on our form under customer description. I 
> have created a function that replaces a regular straight quotation mark 
> ($title = str_replace("'", "", $title);), but do not know what to put in as 
> the "look for" for the curly mark!

How do you know they are submitting ?
Can you copy  from that source, then paste it into your str_replace function?

Or since it seems to be a two-byte character (I didn't see it at 
asciitable.com):
Maybe you need http://php.he.net/manual/en/ref.mbstring.php
mb_ereg_replace

_
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Variables & Forms

2007-10-17 Thread Niel Archer
Hi Ron

"" is perfectly legitimate in an e-mail header field like "Subject:".
All headers may contain any combination of ASCII characters except CR
and LF which are used to terminate the field (See RFC8222 section 2.2).

There is also defined a means to "fold" lines which involves using the
CR+LF+white-space combination to indicate multiple line entries.  Is it
possible your e-mail header fields are doing this and your access to the
headers does not take this possibility into account?  Without your POP
handling code it's impossible to say whether this is your problem or not.

--
Niel Archer

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] php maximum characters in text field

2007-10-17 Thread VanBuskirk, Patricia
Does anyone know how to look for a "Curly quote" or "typographer's quotation 
mark".  They are being submitted on our form under customer description.  I 
have created a function that replaces a regular straight quotation mark ($title 
= str_replace("'", "", $title);), but do not know what to put in as the "look 
for" for the curly mark!

-Original Message-
From: Instruct ICC [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 15, 2007 3:29 PM
To: php-db@lists.php.net
Subject: RE: [PHP-DB] php maximum characters in text field


Do you see those apostrophes in that text?

They need to be properly escaped.

> Date: Mon, 15 Oct 2007 15:09:52 -0400
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php-db@lists.php.net
> Subject: RE: [PHP-DB] php maximum characters in text field
> 
> Here is the exact text he submitted:
> 
> Please initiate phone lines in the following locations in the Leon
> County Civic Center to support our home Men's and Women's Basketball
> games. Meeting room B: activate 4 lines on the North Wall and 4 lines on
> the South Wall - all lines should have long distance with credit card
> only. Courtside: 1 - Please re-activate saved phone number 224-8790
> along the West side press row. Please include long distance on the
> phone. 2 - Please activate the ISDN line on the East side scorer's
> table. 3 - Please re-activate the saved phone number 224-1155 on the
> East side scorer's table. Work room: Please activate 2 lines in the work
> room, one for telephone and one for fax. - Both with long distance
> capability Please call, e-mail or fax the telephone numbers associated
> with each location to Stuart Pearce at 644-4694 (office), 645-3278
> (fax), [EMAIL PROTECTED] Thank you, Stuart Pearce


_
Help yourself to FREE treats served up daily at the Messenger Café. Stop by 
today.
http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Variables & Forms

2007-10-17 Thread Bastien Koert

Ron,
 
The email subject line should not have a  tag in it at all. It is not 
allowed under the specifications if I remember correctly. I would suggest that 
when you suck the message in, first thing to do is to remove the  tag 
with str_replace...
 
Would this get you on your way?
 
Bastien> From: [EMAIL PROTECTED]> To: php-db@lists.php.net> Date: Tue, 16 Oct 
2007 09:47:13 -0500> Subject: [PHP-DB] Variables & Forms> > I am programming a 
form this morning.  I don't understand arrays really well.  I think this is 
what I am needing to use, but I am really not sure.> > I have a PHP script that 
checks a POP e-mail address and is suppose to take the incoming message and 
save it to a mySQL table based on the subject line.  Every now and then the 
subject line is broken with something like a  and so I have a handful of 
messages that need to be indexed manually.  IE my script can't see a "Subject: 
Correspondence for message 123" --- it is being received as "Subject: 
Correspondence for message 123"  I am trying to update the mySQL table 
with a form instead of continuing to use phpmyadmin to do these updates. > > 
What I am wanting to do in my form is call up all the incoming messages that 
have a message value of 0 and I can read through the incoming message to see 
what their reference number is and type it in the field that I have called 
"new_correspondence_received".  An example of my HTML code is below.> > Where I 
am getting stuck is if I have more than 1 message that wasn't indexed 
automatically I am not sure how to retrieve the values of: 
correspondence_reference and new_correspondence_reference.  (The only reason I 
am displaying correspondence_received is to look for the reference number)  Can 
what I am trying to do be accomplished through an array to find out the values 
submitted?  What changes need to be made to my form so I can find out the 
values being submitted?> > Each message received that isn't automatically index 
is dispayed through this form, one  per message, thanks for your help.  
Ron> > > > >  
172> > > > > 
> > > Message here> > > 
_
Have fun while connecting on Messenger! Click here to learn more.
http://entertainment.sympatico.msn.ca/WindowsLiveMessenger