Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Simble Question

Status
Not open for further replies.
Hi,

It's because you are using [ and ] for a variable name which is not allowed. Variables can only be letters, numbers or an _

Rename your variable and it will work.

Hope this helps!

Nate

mainframe.gif

 
I don't know exactly how to pass an array via HTTP_GET but you can use cookies. Do you call this URL from another script or do you type it directly to the browser? If you call it from another script, then you can use this:

In the first script (on the top of script):
Code:
<?php
  setcookie(&quot;A[1][2]&quot;,&quot;yes&quot;,time()+300);
  header(&quot;Location: [URL unfurl="true"]http://localhost/jurek/www.geomar.biz/PHP/listing8-8.php?go=1[/URL]
&quot;); ?>

An then in your script listing8-8.php you will have acces to the variables $go and $A[1][2].

If you need to type it directly, this won't help you.. I will try to find out how to pass an array through the GET method.
 
Sorry, the code is:
Code:
<?php
  setcookie(&quot;A[1][2]&quot;,&quot;yes&quot;,time()+300);
  header(&quot;Location: [URL unfurl="true"]http://localhost/jurek/www.geomar.biz/PHP/listing8-8.php?go=1&quot;);[/URL]
&quot;); ?>
 
sh*t, please ignore the additional &quot;); before the ?> sign, it shouldn't be there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top