will not have any slashes embedded in normal
> circumstances, so there is no reason to stripslashes() any data coming from
> a database column...
>
> Rich
> -Original Message-
> From: Dash McElroy [mailto:dash.php@;westonefcu.org]
> Sent: 08 November 2002 16:53
> To:
Elroy [mailto:dash.php@;westonefcu.org]
Sent: 08 November 2002 16:53
To: 'Zeus'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] mysql_fetch_array problem
Zeus,
2 notes:
1. Data you insert into a database should be addslashes($varname) first (or
another encoding) to protect against MySQL injection vulnerab
Zeus,
2 notes:
1. Data you insert into a database should be addslashes($varname) first (or
another encoding) to protect against MySQL injection vulnerabilities. A nice
stripslashes($varname) on the way out gets rid of the slashes. You could
also use urlencode($varname) and urldecode($varname). He
Look at the line number indicated by the error. A parse error has nothing to do with
the mysql functions. Your code looks fine. What did you leave out with the ...'s?
By the way, an easier way to do what you're doing here is:
$res = mysql_query($query);
while ($arr = mysql_fetch_array($res))
Thats it, I used the array solution which means I can directly call the
specific variable outside the while loop. thanks again.
Andrew
-Original Message-
From: Michael Rudel [mailto:[EMAIL PROTECTED]]
Sent: 18 July 2001 16:15
To: 'Andrew.Martin'
Subject: RE: [PHP-WIN] mysql_f
So you have all these values stored in $variable_row[id], right?
Assuming that's what you're saying, do this:
for ($i=0; $i
> I'm using this function to check the value of specific fileds per row in the
> database.
> such as
> $query = "SELECT * FROM $dbn WHERE status = 4";
> $result = mysql