|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Wed May 14 2008 - 03:46:23 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 14 May 2008 08:46:23 -0000 Issue 5458
Topics (messages 274267 through 274289):
Re: validating textarea using php
274267 by: Iv Ray
274275 by: Shawn McKenzie
274276 by: Richard Heyes
274277 by: Dotan Cohen
274281 by: Robert Cummings
274286 by: Chris W
Re: A Little Something.
274268 by: Thiago Pojda
fsockopen on ssl://
274269 by: bob pilly
274271 by: bob pilly
274285 by: Manuel Lemos
Re: $_SESSION NOT WORKING
274270 by: Daniel Brown
274272 by: Thiago Pojda
274273 by: Balpo
274274 by: Jens Himmelrath
Re: tracking Mials Which were bounced.
274278 by: Chris
274279 by: mike
Re: Good XML Parser
274280 by: Waynn Lue
274284 by: Nathan Nobbe
Re: $_SESSION NOT WORKING --SOLVED
274282 by: Balpo
Re: Can Safari 3 be forced to cache a large jpeg with PHP headers?
274283 by: Chris
274289 by: Colin Guthrie
validating using php
274287 by: Sudhakar
form validation using php
274288 by: Sudhakar
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Sudhakar wrote:
> i do not want
> this to happen, if a user simply hits the spacebar and does not type
> anything i should be able to display an alert message.
From usability point of view such check will, in many cases, generate
annoyance, and bring nothing.
If I do not want to enter anything, and you "error me" to enter
"something", I'll do like this -
asdlöfjasdpoöfja spdfj as fsdaölkjf
And your check is dead. If you want "something", you will get "something".
It is hard (from usability point of view) to "validate" textarea to that
extent, and especially - to get reasonable answers...
I work for a scientific database, where all content providers are very
intelligent, well educated and very disciplined, and the content editors
still have hard time thinking how to guide the content provider so that
they provide reasonable input.
Your problem is not so much php related, but a usability and editorial one.
Iv
attached mail follows:
Dan Joseph wrote:
> On Tue, May 13, 2008 at 12:02 PM, Usamah al-Amin <usamah1228
gmail.com>
> wrote:
>
>>> if(chop($comments) == "") { ... } //hope that helps.
>> Well, chop() is an alias of rtrim(), so it won't work here for, say,
>> trimming control characters at the end of the string like line feeds.
>>
>> trim() is actually the best bit here.
>>
>> Regards,
>> Usamah
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> There is always using substr to mimic the Perl chomp() function. Look thru
> the comments on http://us.php.net/chop and you'll find a few different ways
> of doing it.
>
Or just use trim() :-)
-Shawn
attached mail follows:
Jim Lucas wrote:
> Richard Heyes wrote:
>> Also you can use short tags (popular...) to make the HTML more
>> readable. Eg:
>>
>> <textarea name="comments" cols="26" rows="3" id="comments">
>> <?=htmlspecialchars($comments)?>
>> </textarea>
>>
>
> It also makes the code less portable.
If that's even a concern. A lot of the time, it's not.
--
Richard Heyes
+----------------------------------------+
| Access SSH with a Windows mapped drive |
| http://www.phpguru.org/sftpdrive |
+----------------------------------------+
attached mail follows:
2008/5/14 Richard Heyes <richardh
phpguru.org>:
>> It also makes the code less portable.
>
> If that's even a concern. A lot of the time, it's not.
>
A lot of people think that, until their host upgrades php. Have you
seen how many things are being removed for php6?
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
attached mail follows:
On Wed, 2008-05-14 at 00:32 +0300, Dotan Cohen wrote:
> 2008/5/14 Richard Heyes <richardh
phpguru.org>:
> >> It also makes the code less portable.
> >
> > If that's even a concern. A lot of the time, it's not.
> >
>
> A lot of people think that, until their host upgrades php. Have you
> seen how many things are being removed for php6?
PHP6??? Pshaw... PHP5 just came out the other week ;D
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
attached mail follows:
Dotan Cohen wrote:
> 2008/5/14 Richard Heyes <richardh
phpguru.org>:
>>> It also makes the code less portable.
>> If that's even a concern. A lot of the time, it's not.
>>
>
> A lot of people think that, until their host upgrades php. Have you
> seen how many things are being removed for php6?
From the article I read, that isn't one of them.
--
Chris W
KE5GIX
"Protect your digital freedom and privacy, eliminate DRM,
learn more at http://www.defectivebydesign.org/what_is_drm"
Ham Radio Repeater Database.
http://hrrdb.com
attached mail follows:
Too bad I do not run that ;)
BTW it's in aspx... I'm not that insane.
Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda
softpartech.com.br
Excelncia em Softwares Financeiros
-----Mensagem original-----
De: Robert Cummings [mailto:robert
interjinn.com]
Enviada em: tera-feira, 13 de maio de 2008 15:51
Para: Thiago Pojda
Cc: php-general
lists.php.net
Assunto: Re: RES: [PHP] Re: A Little Something.
On Tue, 2008-05-13 at 15:22 -0300, Thiago Pojda wrote:
> > Our neighbors all thought I had lost my mind
>
> If they only knew you lost it long ago... ;)
>
> Atenciosamente,
>
> www.softpartech.com.br
I tried to hear your website... my screen reader had a lot of trouble :|
;)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
attached mail follows:
Hi all
I have tried researching this issue but havent come up with any solution so im hoping someone has seen it before and can help. I have the following test script that uses fsockopen to connect to a https site, get the contents and outputs it.
<?php
$host = "www.microsoft.com";
$path = "/";
$fh = fsockopen("ssl://".$host, 443, $errno, $errstr, 5);//opens url for reading with a timeout of 2 seconds
if (!$fh){
echo "FAIL: $errno $errstr ";
}
else{
$out = "GET $path HTTP/1.1\r\n";
$out .= "Host: $host\r\n";
$out .= "Connection: Close\r\n";
$out .= "\r\n";
fwrite($fh, $out);
stream_set_timeout($fh,2);
$info = stream_get_meta_data($fh);
if($info['timed_out']){
echo "TIMEOUT\n";
}
else{
$haystack = "";
while (!feof($fh)) {
$haystack.= fgets($fh, 4096);
}
}
print $haystack;
fclose($fh);
}
?>
if i run this script using php -f test.php it works fine. However if i try and run this on my loca apache server i get the following error:
Warning: fsockopen() [function.fsockopen]:unable to connect to ssl://www.microsoft.com:443 (A connection attemptfailed because the connected party did not properly respond after aperiod of time, or established connection failed because connected hosthas failed to respond.) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 4
FAIL: 10060 A connection attempt failed because the connected party didnot properly respond after a period of time, or established connectionfailed because connected host has failed to respond.
As you can see from that error i am using windows and apache 2.2. My php version is 5.25. I have Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tlsin my config.
Thanks for any help in advance and it is greatly appreciated, this problem is driving me nuts!!
Cheers
Bob
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
attached mail follows:
attached mail follows:
Hello,
on 05/13/2008 04:37 PM bob pilly said the following:
> Hi all
>
> I have tried researching this issue but havent come up with any solution so im hoping someone has seen it before and can help. I have the following test script that uses fsockopen to connect to a https site, get the contents and outputs it.
>
> <?php
> $host = "www.microsoft.com";
> $path = "/";
> $fh = fsockopen("ssl://".$host, 443, $errno, $errstr, 5);//opens url for reading with a timeout of 2 seconds
>
> if (!$fh){
> echo "FAIL: $errno $errstr ";
> }
> else{
> $out = "GET $path HTTP/1.1\r\n";
> $out .= "Host: $host\r\n";
> $out .= "Connection: Close\r\n";
> $out .= "\r\n";
> fwrite($fh, $out);
> stream_set_timeout($fh,2);
> $info = stream_get_meta_data($fh);
> if($info['timed_out']){
> echo "TIMEOUT\n";
> }
> else{
> $haystack = "";
> while (!feof($fh)) {
> $haystack.= fgets($fh, 4096);
> }
> }
> print $haystack;
> fclose($fh);
> }
> ?>
>
> if i run this script using php -f test.php it works fine. However if i try and run this on my loca apache server i get the following error:
>
> Warning: fsockopen() [function.fsockopen]:unable to connect to ssl://www.microsoft.com:443 (A connection attemptfailed because the connected party did not properly respond after aperiod of time, or established connection failed because connected hosthas failed to respond.) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 4
> FAIL: 10060 A connection attempt failed because the connected party didnot properly respond after a period of time, or established connectionfailed because connected host has failed to respond.
>
> As you can see from that error i am using windows and apache 2.2. My php version is 5.25. I have Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tlsin my config.
I suspect that you are giving a very short timeout but then you are not
handling the timeout error properly.
Anyway, before reinventing the wheel, you may to try this HTTP client
class that supports many options including establishing SSL corrections
and setting and handling timeouts correctly.
http://www.phpclasses.org/httpclient
--
Regards,
Manuel Lemos
PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
On Tue, May 13, 2008 at 2:38 PM, Balpo <balpo
gmx.net> wrote:
> Hi everyone,
> I'm having a problem moving my code to a linux computer.
> I won't post the whole code here, but an accurate example that reproduces
> exactly the error.
[snip!]
Modify 2.php as follows:
<?php
session_start();
print_r($_SESSION);
?>
You only missed instantiating the session. The rest looks good.
--
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.
attached mail follows:
Actually his question was about why session.auto_start is not working on
Linux, I almost answered what you both did :)
Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
thiago.pojda
softpartech.com.br
Excelncia em Softwares Financeiros
-----Mensagem original-----
De: Daniel Brown [mailto:parasane
gmail.com]
Enviada em: tera-feira, 13 de maio de 2008 16:43
Para: Balpo
Cc: PHP General
Assunto: Re: [PHP] $_SESSION NOT WORKING
On Tue, May 13, 2008 at 2:38 PM, Balpo <balpo
gmx.net> wrote:
> Hi everyone,
> I'm having a problem moving my code to a linux computer.
> I won't post the whole code here, but an accurate example that reproduces
> exactly the error.
[snip!]
Modify 2.php as follows:
<?php
session_start();
print_r($_SESSION);
?>
You only missed instantiating the session. The rest looks good.
--
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Yes, that way it works. Thanx.
But the Windows version of the same code and the same php.ini ***does
not *** need the session_start()
because it has the session.auto_start = 1 inside php.ini.
The thing is, I think session.auto_start = 1 does not work on Linux.
Is this a bug?
Daniel Brown wrote:
> On Tue, May 13, 2008 at 2:38 PM, Balpo <balpo
gmx.net> wrote:
>
>> Hi everyone,
>> I'm having a problem moving my code to a linux computer.
>> I won't post the whole code here, but an accurate example that reproduces
>> exactly the error.
>>
> [snip!]
>
> Modify 2.php as follows:
>
> <?php
> session_start();
> print_r($_SESSION);
> ?>
>
> You only missed instantiating the session. The rest looks good.
>
>
attached mail follows:
Balpo schrieb:
>> Hi everyone, I'm having a problem moving my code to a linux
>> computer. I won't post the whole code here, but an accurate example
>> that reproduces exactly the error.
>>
>> //************************ 1.php <?php session_register('tree');
>> $_SESSION['tree'] = "This is tree number one"; header("Location:
>> 2.php"); ?>
>>
>> //************************ 2.php <?php print_r($_SESSION, false);
>> ?>
>>
>> session.auto_start = 1
>>
>> I want to know why session.auto_start does not work on Linux.
>>
>> If you require the whole php.ini, I'll send it gladly
Hi!
Did you test with phpinfo() if the correct php.ini is used?
regards,
Jens
attached mail follows:
mike wrote:
> Seems like the general way is to create a mailbox (POP3 or IMAP) to
> accept the bounces, then check it periodically and mark the emails as
> invalid in your local database.
>
> I would set threshholds so you don't mark something failed that only
> bounced once - it could have been a mail setup error or something
> else; I'd say wait for 3 failures in a 7 day period at least. If you
> get 3 bounces by that point, the address is probably safely dead.
>
> You can use PHP's IMAP functions to check the mailbox (even for POP3)
> or a million classes or your own functions directly on the socket
> (POP3 is a simple protocol) - it also helps if you parse the bounced
> email message to process the return address and the mail code; perhaps
> build something better than just 3 failures = invalid, but actually
> determine if they're full out failures, or if they're just temporary
> bounces, etc.
I use this method and it works reasonably well. The hard part is the
last sentence - there are so many ways to say "mailbox full" - half
don't include smtp error codes, the rest tell you the same thing in
thousands of different ways.
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
On 5/13/08, Chris <dmagick
gmail.com> wrote:
> I use this method and it works reasonably well. The hard part is the
> last sentence - there are so many ways to say "mailbox full" - half
> don't include smtp error codes, the rest tell you the same thing in
> thousands of different ways.
exactly. that's why i try to make it spread out - if there's failures
for 7 days, odds are that email account is dead/unused. worst case you
lose one person on your mailing list who doesn't check their email
often enough to be worthwhile :)
attached mail follows:
Ok, thanks so much for the help. I went with DOM-parsing to begin
with, I'll explore XPath + SimpleXML later.
Thanks,
Waynn
On Mon, May 12, 2008 at 5:23 AM, David Otton
<phpmail
jawbone.freeserve.co.uk> wrote:
> 2008/5/12 Waynn Lue <waynnlue
gmail.com>:
>> So if I'm looking to parse certain attributes out of an XML tree, if I
>> use SAX, it seems that I would need to keep track of state internally.
>> E.g., if I have a tree like
>>
>> <head>
>> <a>
>> <b></b>
>> </a>
>> <a>
>> <b></b>
>> </a>
>> </head>
>>
>> and say I'm interested in all that's between <b> underneath any <a>,
>> I'd need to have a state machine that looked for an <a> followed by a
>> <b>. If I'm doing that, though, it seems like I should just start
>> using a DOM parser instead?
>
> Yeah, I think you've got it nailed, although your example is simple
> enough (you're only holding one state value - "am I a child of <a>?")
> that I'd probably still reflexively reach for the lightweight
> solution). I use SAX for lightweight hacks, one step up from regexes -
> I know the information I want is between <tag> and </tag>, and I don't
> care about the rest of the document. The more I need to navigate the
> document, the more likely I am to use DOM. I could build my own data
> structures on top of a SAX parser, but why bother reinventing the
> wheel? Of course, you have to factor document size into that - parsing
> a big XML document into a tree can be slow.
>
> You might also want to explore XPath
> (http://uk.php.net/manual/en/function.simplexml-element-xpath.php
> http://uk.php.net/manual/en/class.domxpath.php)... XPath is to XML as
> Regexes are to text files. There's a good chance you'll be able to
> roll all your parsing up into a couple of XPath queries.
>
> I probably should have added that simple parsers come in two flavours
> - Push Parsers and Pull Parsers. I tend to think (lazily) of Push and
> Pull as variations on SAX, but strictly speaking they are different.
>
attached mail follows:
On Tue, May 13, 2008 at 7:29 PM, Waynn Lue <waynnlue
gmail.com> wrote:
> Ok, thanks so much for the help. I went with DOM-parsing to begin
> with, I'll explore XPath + SimpleXML later.
just fyi, youre likely to get more bang for your buck starting off w/
SimpleXML. DOM is a successor to DOMXML from php4. its a bulky, yet
powerful interface into the DOM. SimpleXML is also a DOM parser, however
the interface is simpler in exchange for less power. the good news is in
php5 you can switch back and for between DOM and SimpleXML easily at
virtually no cost.
my modo in php5 is to use SimpleXML unless there is a real need for DOM, and
in that case most likey, you can get away w/ converting to DOM at runtime
(again very little cost there) and doing a few operations, then carrying on
w/ SimpleXML.
-nathan
attached mail follows:
Message-ID: <482A49D8.9010502
gmx.net>
Date: Tue, 13 May 2008 21:09:28 -0500
From: Balpo <balpo
gmx.net>
MIME-Version: 1.0
To: Thiago Pojda <thiago.pojda
softpartech.com.br>
CC: 'Daniel Brown' <parasane
gmail.com>,
'PHP General' <php-general
lists.php.net>
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------ms050201030205000500030807"
Subject: Re: $_SESSION NOT WORKING --SOLVED
--------------ms050201030205000500030807
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
After an all-evening debugging I found out what the problem is.
Why? Please don't ask. I have no idea.
The problem was php's extension php-colorer
How I got to the problem. Eliminating every extension until I got the=20
*bad* one.
Thank you: Daniel, Thiago, Jens, Verny & Dmitri for your concern.
Balpo
Thiago Pojda wrote:
> Actually his question was about why session.auto_start is not working o=
n
> Linux, I almost answered what you both did :)
>
>
> Atenciosamente,
>
> www.softpartech.com.br
>
>
> Thiago Henrique Pojda
> Desenvolvimento Web
> +55 41 3033-7676
> thiago.pojda
softpartech.com.br
> Excel=EAncia em Softwares Financeiros
>
>
> -----Mensagem original-----
> De: Daniel Brown [mailto:parasane
gmail.com]=20
> Enviada em: ter=E7a-feira, 13 de maio de 2008 16:43
> Para: Balpo
> Cc: PHP General
> Assunto: Re: [PHP] $_SESSION NOT WORKING
>
> On Tue, May 13, 2008 at 2:38 PM, Balpo <balpo
gmx.net> wrote:
> =20
>> Hi everyone,
>> I'm having a problem moving my code to a linux computer.
>> I won't post the whole code here, but an accurate example that reprod=
uces
>> exactly the error.
>> =20
> [snip!]
>
> Modify 2.php as follows:
>
> <?php
> session_start();
> print_r($_SESSION);
> ?>
>
> You only missed instantiating the session. The rest looks good.
>
> =20
--------------ms050201030205000500030807
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII8zCC
AtQwggI9oAMCAQICEGG/z6pPMTGgcn0DtSkvSwQwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UE
BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT
I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA4MDExNTE3NDAzNVoX
DTA5MDExNDE3NDAzNVowPzEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEcMBoG
CSqGSIb3DQEJARYNYmFscG9AZ214Lm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAOCKbfEGqQTgty+/5EjWVJisHs6eWxrM2JE0GAzcRDQ6ecemFPfiUlSxro9BBja3VcAi
C39I/+Kht8Zob+c1EbDVFN05kp+MwSEMMlH4ec4Hl6KTpLSJlzacEjuwTKN5pOyyIxDh9JkO
+3WT8Hb3/NmIfByCCXPO4fG2HzoIplAA9HMiyfgpij41UMIBBY/tiHVTlS1VoTU/0jzMMjCN
062l8wk1p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VBAoTHFRoYXd0ZSBDb25zdWx0
aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1
aW5nIENBAhBhv8+qTzExoHJ9A7UpL0sEMA0GCSqGSIb3DQEBAQUABIIBADAs3hol56zy1a5v
Gz9zm62S9yAF+iJp9vK6b5s8f68fnWE7mJRRDFMp1tbgx0WlQ/DagGjTTnGLWSsgHwnmURck
AzUWNZIqSdCVLbcjFSw/304rPLl/CAi0VDr2yFEIpLpiHNDW8EKquagDlFnTT67z6ZnaD5Fz
VQc1N7lJfCdUU0wGadrFCKLwxz0zrW2q76Hx+8XOn3G6mYcXEPmSlUToyuLlkrjWMTuSgAfr
3t577LMTNBMuMrE2JTJLUSRqvFw02jCiY5pKSM/DmpqShoQoyrGHjNiwMO1R9FdThx8L97Hy
YaNriCXKJYsqTt6LiW0IeJm7p9FedV6ErOi+u2YAAAAAAAA=
--------------ms050201030205000500030807--
attached mail follows:
Rob Gould wrote:
> I am creating a touch-screen kiosk application, using a full-screen version of Safari 3.1, and was wondering if there's a way I can force Safari to cache a large background image JPEG.
>
> What I'm finding is that Safari 3 will sometimes cache my large 1.1 MB background image (1680x1050), and display perfectly fine, but on occassion Safari 3 will "think about the cache" and Flash the screen white for a millisecond and then draw the screen. Firefox doesn't seem to have this problem, so unfortunately this is a Safari 3 only issue.
>
> I really only want to cache this ONE image - - - nothing else. Is that possible?
How are you sending it? through a php script or through a normal html tag?
If it's through a php script, try setting a far-future expiry header.
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
Chris wrote:
> Rob Gould wrote:
>> I am creating a touch-screen kiosk application, using a full-screen version of Safari 3.1, and was wondering if there's a way I can force Safari to cache a large background image JPEG.
>>
>> What I'm finding is that Safari 3 will sometimes cache my large 1.1 MB background image (1680x1050), and display perfectly fine, but on occassion Safari 3 will "think about the cache" and Flash the screen white for a millisecond and then draw the screen. Firefox doesn't seem to have this problem, so unfortunately this is a Safari 3 only issue.
>>
>> I really only want to cache this ONE image - - - nothing else. Is that possible?
>
> How are you sending it? through a php script or through a normal html tag?
>
> If it's through a php script, try setting a far-future expiry header.
Yeah PHP can send out appropriate headers to tell the browser to cache
the content delivered. You just use header() with appropriate
Cache-Control and Pragma etc. headers. There are lots of good resources
out there on how to do this so just google around now you know the
concept :)
Col
attached mail follows:
thanks to everyone for providing the solution for validating textarea using
php i have used the following and it worked
$add = trim($_POST["add"]);
if(strlen(trim($add)) == 0 )
{
$error.="<br>Please enter your address ";
}
as part of the form the user has to fill in their name, assuming if the user
simply presses the space bar i would like to display a message like the text
area. presently my validation for name is
$name = trim($_POST["name"]);
if( strlen(trim($name) == 0 ) || !preg_match('/^[a-zA-Z ]+$/x', $name) )
{
$error.="Name is blank or has special characters ";
}
with the above code for validating the name if a user types only spaces then
the error message is displayed however if there is a gap in the name example
john smith the error message is appearing which should not be happening as i
have given
preg_match('/^[a-zA-Z ]+$/x', $name) which means the user can type small,
upper case letters and also there can be a space in the name
how can i change the php code = if( strlen(trim($name) == 0 ) ||
!preg_match('/^[a-zA-Z ]+$/x', $name) )
so that i can validate both a) blank spaces and also accept spaces between
the name, i can validate individually for spaces and uses preg_match as 2
separate lines, instead i would like to validate in a single line of php
please advice.
thanks.
attached mail follows:
Message-ID: <e68d68b80805132258i44780511r52f3540fbd4682ce
mail.gmail.com>
Date: Wed, 14 May 2008 11:28:46 +0530
From: Sudhakar <sudhakararaog
gmail.com>
To: php-general
lists.php.net
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_8_32228021.1210744726334"
Subject: form validation using php
------=_Part_8_32228021.1210744726334
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
hi
i need to validate a field in a form where a user enters their lodgement
number as part of a registration form. this lodgement number can have
letters, numbers, spaces and special characters. i do not know exactly what
those special characters are, so do i have to define the type of special
characters and validate accordingly.
presently my php code for validating the lodgement number is
$lodgementtf =3D $_POST["lodgementtf"];
if($lodgementtf =3D=3D "" || !preg_match("/^[a-zA-Z0-9_ <]+$/", $lodgementt=
f) )
{
echo "display error message":
}
i also have another way of validating
if($lodgementnumber =3D=3D "" || !preg_match("/^[a-zA-Z0-9_ !-
=A3$%^&*()]+=
$/",
$lodgementnumber) )
does this mean that the special characters can only be =3D a space AND
_!-
=A3$%^&*() and no other special characters.
please advice.
thanks.
------=_Part_8_32228021.1210744726334--
- application/x-pkcs7-signature attachment: S/MIME Cryptographic Signature
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]