On Sun, 2 Feb 2003, Pat Johnston wrote:
> I've read that an include file in each of your pages with the lines below
> should do the trick for you with register_globals OFF..
>
> Not sure if this is a valid way to go though...
>
> extract($_SERVER);
> extract($_ENV);
> extract($_
i have also tried:
function retrieve_category()
{
$cat = mysql_query("SELECT category_id FROM category");
while ($current_row = mysql_fetch_row($cat))
{
$row = $current_row[0]; //changed here
if ($row == $id)
{
printf("%s\n",$current_row[0]);
}
I am trying to display the current database value as SELECTED in a combo
box. Any ideas why this isn't working. (ID is being sent)
Any help is appreciated..!
function retrieve_category()
{
$cat = mysql_query("SELECT category_id FROM category");
while ($current_row = mysql_fetch_row($cat))
{
I've read that an include file in each of your pages with the lines below
should do the trick for you with register_globals OFF..
Not sure if this is a valid way to go though...
Regards, Pat
"Davy Obdam" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hell
Hi
I've been learning to get through sessions as it appears to be the hardest
part of PHP I've come across.
I found that includes must be stated underneath that of a session_start()
for example otherwise a warning will appear that it can't start a session
because a header has already been sent (or
php-windows Digest 1 Feb 2003 23:14:30 - Issue 1567
Topics (messages 18288 through 18291):
Re: error - permissions?
18288 by: Stephen Edmonds
Re: Multiple MySQL Queries
18289 by: Stephen Edmonds
Re: Something like trim()
18290 by: Cam Dunstan
18291 by: Cam D
Yep, that`s better still - a nice succinct little one liner Jill.
I avoid the ereg_ function family like the plague myself but that`s my
problem, your solution is entirely correct.
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 01, 2003
Cybot, try this
function string_dryclean($dirtystring) {
$cleanstring = str_replace("\n", " ", $dirtystring);
$cleanstring = trim(str_replace("\t", " ", $cleanstring));
do {
$cleanstring = str_replace(" ", " ", $cleanstring);
} while (strpos($cleanstring, " ") > 0);
return $cleanstring;
}
Not that I know of. Try taking a look in the php manual (http://www.php.net)
for the MySQL Section. If you can find a method there, then use it.
Otherwise I believe you are better off doing each query one by one. On
another note, if you did do them all at the same time and something went
wrong it m
It probably means that your MySQL is not configured to allow for 'root' to
login. If you have phpMyAdmin, you can use it to login to your MySQL server
and set up the user.
Stephen
- Original Message -
From: "Pat Johnston" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, Februar
php-windows Digest 1 Feb 2003 10:56:14 - Issue 1566
Topics (messages 18280 through 18287):
ÃÙé¨Ñ¡ÁÑéÂ...âºÇì(ÍÕ¡¤ÃÑé§)
18280 by: Matrix
Apache 2.0.44; PHP 4.3.0; CGI implemented WinXP Home
18281 by: Shaggy
Something like trim()
18282 by: Cam Dunstan
18287 by
Or just
$cleanstring = ereg_replace("[ \t\n]+"," ",trim($dirtystring));
Jill
-Original Message-
From: Cam Dunstan [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 01, 2003 2:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Something like trim()
Cybot, try this
function
in MySQL client i can run multiple queries in a single statement like:
"CREATE TEMPORARY TABLE x (a CHAR(6), b FLOAT(12,4)); INSERT INTO x SELECT
a, sum(*blah*)..FROM y ; SELECT * FROM x INNER JOIN z ;"
but in PHP ";" is not allowed in function mysql_query().
Is there some workaround for run
> imo: tag isn't standard HTML..
well... you're wrong there... here's a little from the html-manual:
"Buttons created with the BUTTON element function just like buttons created
with the INPUT element, but
they offer richer rendering possibilities: the BUTTON element may have
content. For exampl
14 matches
Mail list logo