Arrays and PHP 4.2

From: "Kelvin Varst" <kelvin(at)varst(dot)dk>
To: "Postgresql PHP" <pgsql-php(at)postgresql(dot)org>
Subject: Arrays and PHP 4.2
Date: 2002-11-10 16:50:55
Message-ID: 1036946771.8687@mail4.wannafind.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php


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 :-)

Browse pgsql-php by date

  From Date Subject
Next Message Cornelia Boenigk 2002-11-10 18:42:07 Re: Arrays and PHP 4.2
Previous Message Zavier Sheran 2002-11-10 15:36:27 Backing up the database via browser