<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Pass $_post Variables Without Forms</title>
	<atom:link href="http://www.gizzmoasus.co.uk/01/pass-_post-variables-without-forms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gizzmoasus.co.uk/01/pass-_post-variables-without-forms/</link>
	<description>GizzmoAsus' Lil place of the net</description>
	<lastBuildDate>Sun, 29 Jun 2008 14:08:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: GizzmoAsus</title>
		<link>http://www.gizzmoasus.co.uk/01/pass-_post-variables-without-forms/comment-page-1/#comment-585</link>
		<dc:creator>GizzmoAsus</dc:creator>
		<pubDate>Sun, 29 Jun 2008 14:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.gizzmoasus.co.uk/blog/?p=38#comment-585</guid>
		<description>You are indeed correct the array does need the ; at the end of it. The other thing I forgot to add into it was the &gt; signs which are used to assign the values to the keys.

So the context array should look like:
$context = array (
    &#039;test1&#039; =&gt; $test1,
    &#039;test2&#039; =&gt; $test2,
    &#039;test3&#039; =&gt; $test3
);

But you can also define it in the following way.
$context[&#039;test1&#039;] = $test1;
$context[&#039;test2&#039;] = $test2;
$context[&#039;test3&#039;] = $test3;

The quotes around the values denotes that the values are strings if you are using variables then you don&#039;t need the quotes. So your variable declarations need to be:
$test1 = &#039;test1&#039;;
$test2 = &#039;test2&#039;;
$test3 = &#039;test3&#039;;

&lt;a target=&quot;_blank&quot; href=&quot;http://uk3.php.net/manual/en/function.array.php&quot; rel=&quot;nofollow&quot;&gt;PHP.net&lt;/a&gt; offers some good documentation on arrays that you might find useful
</description>
		<content:encoded><![CDATA[<p>You are indeed correct the array does need the ; at the end of it. The other thing I forgot to add into it was the > signs which are used to assign the values to the keys.</p>
<p>So the context array should look like:<br />
$context = array (<br />
    &#8216;test1&#8242; => $test1,<br />
    &#8216;test2&#8242; => $test2,<br />
    &#8216;test3&#8242; => $test3<br />
);</p>
<p>But you can also define it in the following way.<br />
$context['test1'] = $test1;<br />
$context['test2'] = $test2;<br />
$context['test3'] = $test3;</p>
<p>The quotes around the values denotes that the values are strings if you are using variables then you don&#8217;t need the quotes. So your variable declarations need to be:<br />
$test1 = &#8216;test1&#8242;;<br />
$test2 = &#8216;test2&#8242;;<br />
$test3 = &#8216;test3&#8242;;</p>
<p><a target="_blank" href="http://uk3.php.net/manual/en/function.array.php" rel="nofollow">PHP.net</a> offers some good documentation on arrays that you might find useful</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tyllee</title>
		<link>http://www.gizzmoasus.co.uk/01/pass-_post-variables-without-forms/comment-page-1/#comment-584</link>
		<dc:creator>tyllee</dc:creator>
		<pubDate>Sun, 29 Jun 2008 09:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.gizzmoasus.co.uk/blog/?p=38#comment-584</guid>
		<description>&gt;$context = array(
&gt;        &#039;post_variable1&#039; = &#039;post_value1&#039;,
&gt;       &#039;post_variable2&#039; = &#039;post_value2&#039;,
&gt;        &#039;post_variable3&#039; = &#039;post_value3&#039;
&gt;)

Is this realy correct? Shouldn&#039;t there be a ; in the end? When I&#039;m running the code it complains about =. 

error msg: Parse error: syntax error, unexpected &#039;=&#039;, expecting &#039;)&#039;

I&#039;ve tryed to put &quot;&quot; around the array elements like this. &quot;&#039;post_variable1&#039; = &#039;post_value1&#039;&quot;, This makes it run  but stops whith this 

error msg: Parse error: syntax error, unexpected T_VARIABLE  poiting to the line where I have $something = sendPost($URL, $context)


my code
________________________________
start
.....

include &quot;../scripts/sendPost.php&quot;;

$test1=test1
$test2=test2
$test3=test3

$context = array ( 
	&quot;&#039;test1&#039; = $test1&quot;,
        &quot;&#039;test2&#039; = $test2&quot;,
        &quot;&#039;test3&#039; = $test3&quot;
);


$URL=&quot;127.0.0.1/print.php&quot;

$something = sendPost($URL, $context)

....
end
________________</description>
		<content:encoded><![CDATA[<p>&gt;$context = array(<br />
&gt;        &#8216;post_variable1&#8242; = &#8216;post_value1&#8242;,<br />
&gt;       &#8216;post_variable2&#8242; = &#8216;post_value2&#8242;,<br />
&gt;        &#8216;post_variable3&#8242; = &#8216;post_value3&#8242;<br />
&gt;)</p>
<p>Is this realy correct? Shouldn&#8217;t there be a ; in the end? When I&#8217;m running the code it complains about =. </p>
<p>error msg: Parse error: syntax error, unexpected &#8216;=&#8217;, expecting &#8216;)&#8217;</p>
<p>I&#8217;ve tryed to put &#8220;&#8221; around the array elements like this. &#8220;&#8216;post_variable1&#8242; = &#8216;post_value1&#8242;&#8221;, This makes it run  but stops whith this </p>
<p>error msg: Parse error: syntax error, unexpected T_VARIABLE  poiting to the line where I have $something = sendPost($URL, $context)</p>
<p>my code<br />
________________________________<br />
start<br />
&#8230;..</p>
<p>include &#8220;../scripts/sendPost.php&#8221;;</p>
<p>$test1=test1<br />
$test2=test2<br />
$test3=test3</p>
<p>$context = array (<br />
	&#8220;&#8216;test1&#8242; = $test1&#8243;,<br />
        &#8220;&#8216;test2&#8242; = $test2&#8243;,<br />
        &#8220;&#8216;test3&#8242; = $test3&#8243;<br />
);</p>
<p>$URL=&#8221;127.0.0.1/print.php&#8221;</p>
<p>$something = sendPost($URL, $context)</p>
<p>&#8230;.<br />
end<br />
________________</p>
]]></content:encoded>
	</item>
</channel>
</rss>
