From: Kelvin Varst <kelvin@varst.dk>
To: Postgresql PHP <pgsql-php@postgresql.org>
Subject: Arrays and PHP 4.2
Date: Sun, 10 Nov 2002 17:50:55 +0100
Message-ID: <1036946771.8687@mail4.wannafind.dk> (raw)
Hi,
I have an old site that I upgrade to PHP 4.2, with the new way of tranfering
variables to the next page. It all almost works them i replace $id with
$_GET[id]. But on one page I use an array (new[]), and that worked ok, like:
In a for-loop
print "<td><input type=\"text\" name=\"new[$col_count]\" value=\"" .
$data->$temp . "\" size=\"64\" maxlength=\"" . $name->kolonne_bredde . "\"
/></td>";
then I send the array new[] to the next page, and access the data like:
In a for-loop
$temp = $temp . ", {$names[$n]} = '" . $new[$n] . "'";
wich is building a string to a Postgres query, then it worked on PHP 4.1. I
have changed the line to:
$temp = $temp . ", {$names[$n]} = '" . $_GET[new[$n]] . "'";
wich is not working. What am I doing wrong, it is only a problem on the
array, single variables works.
Kelvin :-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: kelvin@varst.dk
Subject: Re: Arrays and PHP 4.2
In-Reply-To: <1036946771.8687@mail4.wannafind.dk>
References: <1036946771.8687@mail4.wannafind.dk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox