php-windows Digest 2 Apr 2004 12:42:07 -0000 Issue 2192

Topics (messages 23344 through 23349):

Re: Refresh in php
        23344 by: Nadim Attari
        23348 by: Svensson, B.A.T. (HKG)

Mail Delivery (failure [EMAIL PROTECTED])
        23345 by: shane.caraveo.com

quotes in mysql
        23346 by: Sudeep Sarath
        23347 by: Svensson, B.A.T. (HKG)
        23349 by: DvDmanDT

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
> Is there any function in php that keeps refreshing the page after a fixed
time...just like "<meta refresh>" in normal HTML files.

Hi Sudeep!

Kia haal hein??

Maybe this will help:

$numSeconds = 120;
header ("Refresh: $numSeconds; url=". $_SERVER['PHP_SELF']);

~
Nadim Attari

--- End Message ---
--- Begin Message ---
And in exactly what way would you suggest that this a php
functionality?

It is obvious from the previous letter that the author is
aware of that you can control this behaviour on the client
side, but the question was how this can be achieved on the
server side, and the answer to this question is: it can't be,
because HTTP communication does not work that way - not of
what I am aware of at least. If I am wrong about this, I am
more than glad to be corrected by someoen who know better
than me.



-----Original Message-----
From: Nadim Attari
To: [EMAIL PROTECTED]
Sent: 2004-04-02 07:01
Subject: [PHP-WIN] Re: Refresh in php

> Is there any function in php that keeps refreshing the page after a
> fixed time...just like "<meta refresh>" in normal HTML files.

Hi Sudeep!

Kia haal hein??

Maybe this will help:

$numSeconds = 120;
header ("Refresh: $numSeconds; url=". $_SERVER['PHP_SELF']);

--- End Message ---
--- Begin Message ---
If the message will not displayed automatically,
follow the link to read the delivered message.

Received message is available at:
www.lists.php.net/inbox/php-windows/read.php?sessionid-27461
 

--- End Message ---
--- Begin Message ---
Hi friends,
 
I have a 'textarea' in my php page and i need to put the details typed in that 
textarea box to my MySQL database. The content in the textarea box is(for example) : 
I'm a good boy.
 
and insert string is:
 
insert into table_name (describe) values('" . $check . "')
 
where check is the variable that stores the POST data of textarea. Also the field 
"describe" is of a text datatype. 
 
what happens is that i can't take the content string to the database. B'cause it 
contains I'm (a single quote in between I and m) which confuses mySql that string 
terminates after I. Is there any solution for this problem as we cannot tell the users 
"dont put quotes in textarea".
 
....SuDeEp...

Win an evening with the Indian cricket captain: Yahoo! India Promos.

--- End Message ---
--- Begin Message ---
Why does the wheel need to be reinvented every second month?

The solution to this "problem" is to escape all funny characters.
Particular when it comes to quotes, the traditional solution for
this during the last 40 years has been to quote the quote. Or use
double quotes to quote singe quotes, or the other way around.

Example: I'm

1) 'I'''m' <- quote quotes (This is the safest way)
2) "I'm"   <- double quoting single quotes
3) 'I\'m'  <- Escaping (MySQL specific - don't use!) 


-----Original Message-----
From: Sudeep Sarath
To: Php-windows mailing list
Sent: 2004-04-02 10:16
Subject: [PHP-WIN] quotes in mysql

Hi friends,
 
I have a 'textarea' in my php page and i need to put the details typed
in that textarea box to my MySQL database. The content in the textarea
box is(for example) : I'm a good boy.
 
and insert string is:
 
insert into table_name (describe) values('" . $check . "')
 
where check is the variable that stores the POST data of textarea. Also
the field "describe" is of a text datatype. 
 
what happens is that i can't take the content string to the database.
B'cause it contains I'm (a single quote in between I and m) which
confuses mySql that string terminates after I. Is there any solution for
this problem as we cannot tell the users "dont put quotes in textarea".
 
....SuDeEp...

Win an evening with the Indian cricket captain: Yahoo! India Promos.

--- End Message ---
--- Begin Message ---
replace $check with mysql_escape_string($check);

-- 
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
"Sudeep sarath" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Hi friends,
>
> I have a 'textarea' in my php page and i need to put the details typed in
that textarea box to my MySQL database. The content in the textarea box
is(for example) : I'm a good boy.
>
> and insert string is:
>
> insert into table_name (describe) values('" . $check . "')
>
> where check is the variable that stores the POST data of textarea. Also
the field "describe" is of a text datatype.
>
> what happens is that i can't take the content string to the database.
B'cause it contains I'm (a single quote in between I and m) which confuses
mySql that string terminates after I. Is there any solution for this problem
as we cannot tell the users "dont put quotes in textarea".
>
> ....SuDeEp...
>
> Win an evening with the Indian cricket captain: Yahoo! India Promos.

--- End Message ---

Reply via email to