Looking for some assistance / guidance --

Jeff Silberberg <[email protected]> Mon, 28 Jul 2014 20:45:06 -0400
Newsgroups gmane.comp.db.postgresql.php
Message-ID <CALWasQ=LmiZsZdJ1sLUT4jWrULSOLNsGS298yLkafKbEppbEHQ@mail.gmail.com>
--e89a8f502edccd975c04ff4a59c1
Content-Type: text/plain; charset=UTF-8

Good evening --

I have a Wordpress / HTML form that includes <select size="5" multiple
name=Keys[]"....>

The form calls a PHP CGI program and if I set it to phpinfo()  I see that
the array Keys is in the post data.  An I can do a $selectedKeys =
$_POST('Keys')  and walk through and echo out the array elements without a
problem.

My issues start when I attempt to pass the array of Keys to my PostgreSql
function with a parameter list of (web_Keys_ integer[], web_text_ text,
web_user_ text) ................

in my php I do a pg_connect, and then prepare a number of statements all of
which work but the last one.

    it is $return_cde = pg_prepare($conn, "SendKeys", 'select
web.sendKeys$1, $2, $3)');.

   and I try to execute this with

      $userKey=$_POST['Keys'];
      $userText=$_POST['msgText'] . " / " . $current_user->display_name;

      $return = pg_execute($conn, "SendKeys", array($userKey, $userText,
$current_user->display_name));

      Which returns and error --
function.pg-execute <http://dispatch.dapage.net/cgi-bin/function.pg-execute>]:
Query failed: ERROR: array value must start with "{" or dimension
information in */home/xxxxxxx/public_html/enterkey/cgi-bin/xxxxxxcgi.php*
on line *90*

      echo "User Keys " . gettype($userKey)."<br>\n";   confirms this is a
Array ..    An I have tried casting  $1::int[]  in the prepare with no
luck..

      I find a lot of hits on Google searches but no solutions..

      Hoping someone here can assist me with this issue..

=============

--e89a8f502edccd975c04ff4a59c1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div><div>Good evening -- <br></div><d=
iv><br></div>I have a Wordpress / HTML form that includes &lt;select size=
=3D&quot;5&quot; multiple name=3DKeys[]&quot;....&gt;<br><br></div>The form=
 calls a PHP CGI program and if I set it to phpinfo()=C2=A0 I see that the =
array Keys is in the post data.=C2=A0 An I can do a $selectedKeys =3D $_POS=
T(&#39;Keys&#39;)=C2=A0 and walk through and echo out the array elements wi=
thout a problem.=C2=A0 <br>
<br></div>My issues start when I attempt to pass the array of Keys to my Po=
stgreSql function with a parameter list of (web_Keys_ integer[], web_text_ =
text, web_user_ text) ................<br><br></div>in my php I do a pg_con=
nect, and then prepare a number of statements all of which work but the las=
t one.=C2=A0 <br>
<br></div>=C2=A0=C2=A0=C2=A0 it is $return_cde =3D pg_prepare($conn, &quot;=
SendKeys&quot;, &#39;select web.sendKeys$1, $2, $3)&#39;);.=C2=A0 <br><br><=
/div>=C2=A0=C2=A0 and I try to execute this with <br><br>=C2=A0=C2=A0 =C2=
=A0=C2=A0 $userKey=3D$_POST[&#39;Keys&#39;];<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 $userText=3D$_POST[&#39;msgText&#39;] . &quot; / &quot; . $current_user=
-&gt;display_name;<br>
<br>=C2=A0=C2=A0 =C2=A0=C2=A0 $return =3D pg_execute($conn, &quot;SendKeys&=
quot;, array($userKey, $userText, $current_user-&gt;display_name));<br clea=
r=3D"all"><div><div><div><div><br></div><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 Which returns and error -- <br><h2 style=3D"margin-left:40px">
<font><span style=3D"font-family:courier new,monospace"><a href=3D"http://d=
ispatch.dapage.net/cgi-bin/function.pg-execute">function.pg-execute</a>]: Q=
uery failed: ERROR:  array value must start with &quot;{&quot; or dimension=
 information in <b>/home/xxxxxxx/public_html/enterkey/cgi-bin/xxxxxxcgi.php=
</b> on line <b>90</b></span></font></h2>
</div><div><br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 echo &quot;User Keys &quot; .=
 gettype($userKey).&quot;&lt;br&gt;\n&quot;;=C2=A0=C2=A0 confirms this is a=
 Array ..=C2=A0=C2=A0=C2=A0 An I have tried casting=C2=A0 $1::int[]=C2=A0 i=
n the prepare with no luck.. <br><br></div><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 I find a lot of hits on Google searches but no solutions.. <br>
<br></div><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Hoping someone here can assis=
t me with this issue.. <br><br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br><=
/div><div><br><div><div><br>
</div></div></div></div></div></div></div>

--e89a8f502edccd975c04ff4a59c1--