php-general Digest 7 Aug 2006 08:31:27 - Issue 4279
Topics (messages 240203 through 240219):
Re: Using preg_match to find Japanese text
240203 by: MOKULEN_IMADICA
Re: PHP Frameworks - Opinion
240204 by: Martin Alterisio
Re: OT promotion candidates needed
240205
hi...
i'm looking for a short/simple kind of app to allow me to play around with
some different tbls..
basically.. i have a couple of tbls where i have a top level tbls, and a few
subordinate child tbls
parent
child
child
i'd like to be able to add/modify/delete items from the various
Richard Lynch wrote:
?php
if (isset($_REQUEST['email'])){
$success = mail($_REQUEST['action'], 'un/subscribe',
'un/subscribe', From: $_REQUEST[email]\r\nReply-to:
$_REQUEST[email]);
if ($success) echo Status Change Sent;
else echo Unable to send Status Change;
}
?
What
Hi,
I have Apache 2.2 and PHP 5 on Fedora 5. And since I am writing a lot of my
php code which is only compatible with PHP 4 I remove the PHP 5 rpm and
installed the PHP 4. But I notice that Apache 2.2 doesn't recognize PHP 4 right
away. I can't find out on the net how to tweak the system
Sorry for the late answer,
I have different applications and the users are kept in DB so I cannot make
for every user a directory.
I made a solution with .htaccess from apache and redirection to a php script
that outputs the image if the user has rights to the images.
I will still have to
Andy wrote:
Sorry for the late answer,
I have different applications and the users are kept in DB so I cannot
make for every user a directory.
I made a solution with .htaccess from apache and redirection to a php
script that outputs the image if the user has rights to the images.
I will
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the following error when I run (as root) the script:
-bash: ./makemicrositeml: /usr/lib/php5/bin/php:
Ko Ko wrote:
Hi,
I have Apache 2.2 and PHP 5 on Fedora 5. And since I am writing a lot of my php code which is only compatible with PHP 4 I remove the PHP 5 rpm and installed the PHP 4. But I notice that Apache 2.2 doesn't recognize PHP 4 right away. I can't find out on the net how to
On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the following error when I run (as
hi Chris,
Chris wrote:
Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the following error when I run (as root) the script:
Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the following error when I run (as root) the script:
-bash: ./makemicrositeml:
hi Stut,
I wish it was the line endings - I checked and they where unix-style.
I do edit on windows normally (unless it's some rush fix and then I'll
use vi or nano) but I have the line-endings set to unix.
vi gave no sign of a ^M and I rewrote the shebang there just to be
safe.
alas no joy.
Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the following error when I run (as root) the script:
-bash: ./makemicrositeml:
hi Robert,
thanks for thinking with me
Robert Cummings wrote:
On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
Robert Cummings wrote:
On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the following
Thanks for the answers.
I will launch anyway this solution, it is more secure for us... I will
monitor the server to see if it can handle the load.
Regards,
Andy.
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Andy [EMAIL PROTECTED]
Cc: WeberSites LTD [EMAIL PROTECTED];
Jochem Maas wrote:
Robert Cummings wrote:
On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the
Chris wrote:
Jochem Maas wrote:
Robert Cummings wrote:
On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in
Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
#!php -q
in all cases I get the following error when I run (as root) the script:
-bash: ./makemicrositeml:
Jochem Maas wrote:
in all cases I get the following error when I run (as root) the script:
-bash: ./makemicrositeml: /usr/lib/php5/bin/php: bad interpreter: Permission
denied
Do you have root access on this machine? Perhaps the sysadmin as
configured bash to not accept unknown interpreters?
Jochem Maas wrote:
Chris wrote:
Jochem Maas wrote:
Robert Cummings wrote:
On Mon, 2006-08-07 at 09:59 +0200, Jochem Maas wrote:
I have a php shell script (the execute bit of the file is set)
of which the first line is this:
#!/usr/lib/php5/bin/php -q
or this:
#!/usr/bin/php -q
or this:
On Monday 07 August 2006 09:11, Jochem Maas wrote:
hi Robert,
thanks for thinking with me
If the FS permissions to the binary are correct, odds are the file system is
actually mounted noexec.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Jochem Maas wrote:
I wish it was the line endings - I checked and they where unix-style.
I do edit on windows normally (unless it's some rush fix and then I'll
use vi or nano) but I have the line-endings set to unix.
vi gave no sign of a ^M and I rewrote the shebang there just to be
safe.
alas
Good day,
I try to set ru locale that is converted to UTF-8 in output.
I tried ru_ru.UTF-8 - with no results.
ru returns week and month names in win-1251.
What I missed?
Apache/2.0.55 Win32 PHP/5.1.2
Tony.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
hi Duncan,
the disk the home dirs are situated on (where the script was living)
was indeed mounted as noexec.
THANK YOU for saving me hours of mental torture (and teaching me
something in the process), thanks to everyone else for giving
their time/energy.
kind regards,
Jochem
Duncan Hill
Andy wrote:
...
I want to know... is this a big performance issue or not(the image is handled
by php and not by apache directly)
OR...
Is there any other way to handle this situation???
Thanx,
Andy.
I'd recomend doing a bit of benchmarking to figure out if the
performance hit is
bruce wrote:
hi...
i'm looking for a short/simple kind of app to allow me to play around with
some different tbls..
basically.. i have a couple of tbls where i have a top level tbls, and a
few subordinate child tbls
parent
child
child
i'd like to be able to
Hi all!
I'm trying to learn using PDO and PostgreSQL together a little bit and I
have some problems with (I thinks, auto incrementing fields)
I have the following sample DB:
CREATE TABLE users (
uid SERIAL UNIQUE NOT NULL,
login TEXT NOT NULL,
password TEXT NOT NULL,
PRIMARY KEY (uid)
);
and
Hi,
I have an array of values. I want to save them with php to a single field in
my database and then retrieve them to an array.
What is the simplest way to achive this?
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello all,
When I try to send email from my server as html, my yahoo account and
several of my user's email accounts mark it as spam. I can send a normal
email via mail() just fine but when I try to to html, it's bad. I've played
with a few things but can't seem to figure it out. The html I
Hi,
I have an array of values. I want to save them with php to a
single field in
my database and then retrieve them to an array.
What is the simplest way to achive this?
http://us3.php.net/serialize
Cheers!
JM
--
PHP General Mailing List (http://www.php.net/)
To
ok this seem to work but how do I bring it back? This is what I have so far.
?
$first[] = array('appple', 'pear', 'banana');
$second = serialize($first);
$third[]= unserialize($second);
echo $second; //outputs serialized data
echo $third[1];
?
- Original Message -
From: Peter Lauri
Well it seems like u made a mess there with arrays...
?
$first[] = array('appple', 'pear', 'banana');
$second = serialize($first);
$third[]= unserialize($second);
echo $second; //outputs serialized data
echo $third[1];
?
From definition of first I understand it's an array of arrays with
http://se2.php.net/serialize
/Peter
-Original Message-
From: Ross [mailto:[EMAIL PROTECTED]
Sent: Monday, August 07, 2006 7:19 PM
To: php-general@lists.php.net
Subject: [PHP] saving and retrieving an array from a database
Hi,
I have an array of values. I want to save them with php to
PHP list,
I have many times set the value of a variable by declaring it in the
URL, like so:
http://www.domain.com/index.php?var=1
And then, to use the variable, all I have to do is use it in the script,
like so:
echo This is the value of the variable: . $var;
But, for some reason, in a
[snip]
http://www.domain.com/index.php?var=1
And then, to use the variable, all I have to do is use it in the script,
like so:
echo This is the value of the variable: . $var;
[/snip]
echo $_GET['var'];
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
PHP list,
I have many times set the value of a variable by declaring it in the
URL, like so:
http://www.domain.com/index.php?var=1
And then, to use the variable, all I have to do is use it in
the script,
like so:
echo This is the value of the variable: . $var;
But, for some
Greetings to everyone,
I have been able to program the capability of printing several
end-of-month statements at the click of a
button using php. The problem I am faced with is when one of these
statements has more than one page.
Management would like to have the second page have a header
Also check in php.ini register_globals to be On if you want to have vars
directly available in the script...
Andy
Jay Blanchard wrote:
[snip]
http://www.domain.com/index.php?var=1
And then, to use the variable, all I have to do is use it in the script,
like so:
echo This is
You can generate a PDF with fpdf and then print that.
-Original Message-
From: Jef Sullivan [mailto:[EMAIL PROTECTED]
Sent: Monday, August 07, 2006 8:50 PM
To: php-general@lists.php.net
Subject: [PHP] php and printing
Greetings to everyone,
I have been able to program the capability
Erik Gyepes wrote:
...
$query = INSERT INTO users SET uid = :uid, login = :login, password =
:password;
...
When running the script I get the following error message: Error!:
SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near SET at
character 19
The INSERT INTO ... SET
blackwater dev wrote:
Hello all,
When I try to send email from my server as html, my yahoo account and
several of my user's email accounts mark it as spam. I can send a normal
email via mail() just fine but when I try to to html, it's bad. I've
played
with a few things but can't seem to
Thanks, John.
It's probably also a matter of how you name the classes. It needs to be a
clear name that describes what it 'is'. Hence, the depot name.
Anyway, indeed I have finished the concept of the app.
Sjef
John Wells [EMAIL PROTECTED] schreef in bericht
news:[EMAIL PROTECTED]
On 6/30/06,
Is it possible to recognize if a file for upload really is a pdf (like the
function getimagesize retuns the file type of the image)?
Thanxs,
Sjef
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
blackwater dev wrote:
Hello all,
When I try to send email from my server as html, my yahoo account and
several of my user's email accounts mark it as spam. I can send a normal
email via mail() just fine but when I try to to html, it's bad. I've
played
with a few things but can't seem to
[EMAIL PROTECTED] wrote:
ok this seem to work but how do I bring it back? This is what I have so
far.
?
$first[] = array('appple', 'pear', 'banana');
$second = serialize($first);
$third[]= unserialize($second);
echo $second; //outputs serialized data
echo $third[1];
?
I think you
Sjef schrieb:
Is it possible to recognize if a file for upload really is a pdf (like the
function getimagesize retuns the file type of the image)?
Thanxs,
Sjef
this might help
http://de3.php.net/manual/en/function.mime-content-type.php
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o
Hi to all!
I have a form with 6 text fields where visitor has to enter product serial
number (same type data). he has to enter AT LEAST ONE.
for ($i=0; $i6; $i++)
{
echo 'input type=text name=PSN['.$i.'] value='.$PSN[$i].'
size=25';
}
After the form is submitted I'm getting an array
Array
On Mon, 7 Aug 2006, Sjef wrote:
Is it possible to recognize if a file for upload really is a pdf (like the
function getimagesize retuns the file type of the image)?
Thanxs,
Sjef
Yes it is.
$_FILES['{form_field_name}']['type'] is your friend here. Just match it
against a mime type your
Sjef wrote:
Is it possible to recognize if a file for upload really is a pdf (like the
function getimagesize retuns the file type of the image)?
If you have a suitible mime.magic file, and your PHP has the
functionality built into it, you could try the mime_content_type() function.
Sorry for this. Spelling error.
:(
-afan
Hi to all!
I have a form with 6 text fields where visitor has to enter product serial
number (same type data). he has to enter AT LEAST ONE.
for ($i=0; $i6; $i++)
{
echo 'input type=text name=PSN['.$i.'] value='.$PSN[$i].'
size=25';
}
Adam Zey wrote:
function make_post($message)
{
$headers .= POST /foo.php HTTP/1.1\r\n;
$headers .= Host: bar.com\r\n;
$headers .= Content-Type: application/octet-stream\r\n;
$headers .= Connection: keep-alive\r\n;
$headers .= Content-Length: . strlen($message) . \r\n;
Adam Zey wrote:
$headers .= Content-Type: application/octet-stream\r\n;
I missed the context of this function, but it seems like you probably
mean to send:
Content-Type: application/x-www-form-urlencoded
Chris
--
Chris Shiflett
Principal, OmniTI
http://omniti.com/
--
PHP General Mailing
I am creating an array of sessions
$_SESSION['results'][]
There may be up to 7 and I need to know why do I always get the
notice'Undefined index: results in...'?
How do I define or initialise the array if it only gets set once the form
has been posted (an answer has been given) on the page.
Chris Shiflett wrote:
Adam Zey wrote:
$headers .= Content-Type: application/octet-stream\r\n;
I missed the context of this function, but it seems like you probably
mean to send:
Content-Type: application/x-www-form-urlencoded
Chris
The context is a bit strange, these POST
Ross wrote:
I am creating an array of sessions
$_SESSION['results'][]
There may be up to 7 and I need to know why do I always get the
notice'Undefined index: results in...'?
How do I define or initialise the array if it only gets set once the form
has been posted (an answer has been
On 8/7/06, Colin Guthrie [EMAIL PROTECTED] wrote:
Sjef wrote:
Is it possible to recognize if a file for upload really is a pdf (like
the
function getimagesize retuns the file type of the image)?
If you have a suitible mime.magic file, and your PHP has the
functionality built into it, you
Dave M G wrote:
PHP list,
I have many times set the value of a variable by declaring it in the
URL, like so:
http://www.domain.com/index.php?var=1
And then, to use the variable, all I have to do is use it in the script,
like so:
echo This is the value of the variable: . $var;
But, for
I am creating an array of sessions
$_SESSION['results'][]
There may be up to 7 and I need to know why do I always get the
notice'Undefined index: results in...'?
How do I define or initialise the array if it only gets set once the form
has been posted (an answer has been given) on the page.
Check the 5th and 6th fields. Something is in one of them. Because
based on your checks, it will work:
[php]
$first_array = array(
'first',
'second',
'third',
'',
'',
'');
foreach ($first_array as $value)
{
if (!empty($value))$second_array[] = $value;
}
Rory Browne wrote:
http://uk.php.net/manual/en/function.mime-content-type.php
Is this to protect against somebody trying to pass an mp3 off as a PDF, or
to stop people mistakenly uploading PDF's. If it's the latter, then mime
functions are probably okay. If the former, then you may want
2006/8/7, [EMAIL PROTECTED] [EMAIL PROTECTED]:
Hi to all!
I have a form with 6 text fields where visitor has to enter product serial
number (same type data). he has to enter AT LEAST ONE.
for ($i=0; $i6; $i++)
{
echo 'input type=text name=PSN['.$i.'] value='.$PSN[$i].'
size=25';
}
After
Ross wrote:
I am creating an array of sessions
$_SESSION['results'][]
always call session_start() before using $_SESSION
There may be up to 7 and I need to know why do I always get the
notice'Undefined index: results in...'?
How do I define or initialise the array if it only gets
Ok,
I am using a hosted server and php is installed from the linux distro. I
usually have all the stuff in a php file somewhere so I can just go back
./configure, etc. I can't seem to find the configure for php on this box so
I can recompile but I know it is there as I can use php and see the
blackwater dev wrote:
Ok,
I am using a hosted server and php is installed from the linux distro. I
usually have all the stuff in a php file somewhere so I can just go back
./configure, etc. I can't seem to find the configure for php on this
box so
I can recompile but I know it is there
Ok, doing that now and it's taking a while. I can do phpinfo but that tells
me the config line and where the ini files are, not necessarily where the
configure stuff is to recompile...correct?
On 8/7/06, Jochem Maas [EMAIL PROTECTED] wrote:
blackwater dev wrote:
Ok,
I am using a hosted
blackwater dev wrote:
Ok, doing that now and it's taking a while.
it might take forever. I made a thinko, it should have been:
php -i | grep configure
(it should be pretty much instantaneous)
I can do phpinfo but that
tells
me the config line and where the ini files are, not necessarily
hi..
will php allow a user to enter field on a form, and compute aresult based on
the field, without having to reload the entire form, or will i need ajax...
any good examples on how to accomplish this..
thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
[snip]
will php allow a user to enter field on a form, and compute aresult
based on
the field, without having to reload the entire form, or will i need
ajax...
[/snip]
You will only need JavaScript.
Remember, JavaScript is client-side, PHP is server-side.
--
PHP General Mailing List
On Mon, 2006-08-07 at 12:11 -0700, bruce wrote:
hi..
will php allow a user to enter field on a form, and compute aresult based on
the field, without having to reload the entire form, or will i need ajax...
any good examples on how to accomplish this..
You have 150 posts since February 5th
bruce wrote:
hi..
will php allow a user to enter field on a form, and compute aresult based on
the field, without having to reload the entire form, or will i need ajax...
any good examples on how to accomplish this..
thanks
PHP is executed on the server, so you cannot campute something
Robert, have you studied Neuron Networks?
-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 2:16 AM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: Re: [PHP] php/ajax..
On Mon, 2006-08-07 at 12:11 -0700, bruce wrote:
hi..
bruce wrote:
hi..
will php allow a user to enter field on a form, and compute aresult based on
the field, without having to reload the entire form, or will i need ajax...
any good examples on how to accomplish this..
thanks
PHP is a server-side language. Javascript is a client-side
On Mon, 2006-08-07 at 21:15 +0700, Peter Lauri wrote:
Robert, have you studied Neuron Networks?
I've touched on them. Though I'm sure we both know to which kind of
neuron I was referring :)
Cheers,
Rob.
-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent:
thanks for the reply...
that's pretty much what i had read/found out..
'ppreciate it..
-Original Message-
From: Adam Zey [mailto:[EMAIL PROTECTED]
Sent: Monday, August 07, 2006 12:04 PM
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Subject: [PHP] Re: php/ajax..
bruce wrote:
On Mon, August 7, 2006 2:44 am, Andy wrote:
The performance Issue that I asked was:
Is there a difference if apache sends the image or If I output it with
php
with readfile.
Yes.
How much of a difference it makes depends on YOUR hardware.
Test it and see is the only sensible answer we can
On Mon, August 7, 2006 2:37 am, David Dorward wrote:
Richard Lynch wrote:
?php
switch($_REQUEST['email']){
case '[EMAIL PROTECTED]':
case '[EMAIL PROTECTED]':
//Do nothing.
break;
default:
die(Hack attempt.);
break;
}
if (isset($_REQUEST['email'])){
$success =
On Sun, August 6, 2006 9:56 am, tedd wrote:
I posted this question on a js list, but didn't received an answer.
Maybe someone here might be able to provide some insight or direction.
In my ajax experiment monitoring states, namely:
http://xn--ovg.com/ajax_readystate
I can see the
On Sat, August 5, 2006 9:06 pm, Dave M G wrote:
While I'm only just learning about regular expressions in another
thread, I still seem to be finding exceptional situations which have
me
questioning the extent to which preg expressions can be implemented.
(The following contains UTF-8 encoded
Better yet, don't allow the user to enter a From address. Simply give
them subscribe and unsubscribe radio buttons, and make sure the
un/subscribe-ee gets a confirmation email. And certainly check your
input fields for newlines. :)
On 8/7/06, Richard Lynch [EMAIL PROTECTED] wrote:
On Mon,
On Sat, August 5, 2006 8:08 am, Ville Mattila wrote:
I have been thinking of making a simple web-based interface to control
my media center box (running debian linux). Being a bit enthustiatic,
I
thought I could use some generic tools for playing media files and
write
the whole UI by my own.
I'll bet your hosting environment has not installed the php sources.
If the server is shared with other clients, you'll probably need to
download the source and compile php in your user space and run it as a
CGI (if your host allows this configuration). Hopefully they have
some allowances for
On Mon, August 7, 2006 9:08 am, Sjef wrote:
Is it possible to recognize if a file for upload really is a pdf (like
the
function getimagesize retuns the file type of the image)?
It should be noted that getimagesize is also not fool-proof for the
same reasons as the PDF first-4 bytes == '%PDF'
On Mon, August 7, 2006 10:04 am, Ed Curtis wrote:
On Mon, 7 Aug 2006, Sjef wrote:
Is it possible to recognize if a file for upload really is a pdf
(like the
function getimagesize retuns the file type of the image)?
Thanxs,
Sjef
Yes it is.
$_FILES['{form_field_name}']['type'] is your
On Mon, August 7, 2006 8:13 am, Dave M G wrote:
I have many times set the value of a variable by declaring it in the
URL, like so:
http://www.domain.com/index.php?var=1
And then, to use the variable, all I have to do is use it in the
script,
like so:
echo This is the value of the
Hi,
I get strange output if I combine sprintf and mysql_real_escape_string. If I
do this the resulting into the database is \' not ' as I want.
mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1, '%s'),
mysql_real_escape_string( ' )));
Should this be like this? Do the sprintf
On Mon, August 7, 2006 7:52 am, [EMAIL PROTECTED] wrote:
ok this seem to work but how do I bring it back? This is what I have
so far.
?
$first[] = array('appple', 'pear', 'banana');
$second = serialize($first);
Store $second in the DB here.
It's just a big long-ass string at this point.
On Mon, August 7, 2006 6:48 am, Erik Gyepes wrote:
I'm trying to learn using PDO and PostgreSQL together a little bit and
I
have some problems with (I thinks, auto incrementing fields)
I have the following sample DB:
CREATE TABLE users (
uid SERIAL UNIQUE NOT NULL,
My PostgreSQL knowledge
Hello,
on 08/07/2006 04:11 PM bruce said the following:
will php allow a user to enter field on a form, and compute aresult based on
the field, without having to reload the entire form, or will i need ajax...
any good examples on how to accomplish this..
You may want to take a look at this
On Mon, August 7, 2006 7:21 am, blackwater dev wrote:
When I try to send email from my server as html, my yahoo account and
several of my user's email accounts mark it as spam. I can send a
normal
email via mail() just fine but when I try to to html, it's bad.
Yes.
Because most HTML
On Mon, August 7, 2006 12:35 pm, Peter Lauri wrote:
I get strange output if I combine sprintf and
mysql_real_escape_string. If I
do this the resulting into the database is \' not ' as I want.
mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1,
'%s'),
mysql_real_escape_string(
I should maybe add that the data actually comes from a form:
mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1,
'%s'), mysql_real_escape_string($_POST['formvalue'])));
And when I have ' in the field, it will insert \' into the database in pure
form. If I do this it will add just '
2006/8/7, Peter Lauri [EMAIL PROTECTED]:
I should maybe add that the data actually comes from a form:
mysql_query(sprintf(INSERT INTO table (value1, value2) VALUES (1,
'%s'), mysql_real_escape_string($_POST['formvalue'])));
And when I have ' in the field, it will insert \' into the database
[snip]My guess: magic_quotes_gpc is enabled where you're running the script.
Therefore slashes are already present in the data from the form post.[/snip]
Should I turn it off? Adding slashes and mysql_real_escape_string is not
exactly the same thing, correct?
/Peter
--
PHP General Mailing List
94 matches
Mail list logo