[PHP] Hidden Input, value=array

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

Tree

Established Member
Impact
9
I need to have a hidden field be the value of an array. Right now I have
PHP:
<input type='hidden' name='location[]' value='<?=$_POST['location']?>'>

But it just returns
Code:
<input type='hidden' name='location[]' value='Array'>

How can I make it so there are actual values?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
use <?=explode("|",$_POST['location'])?> instead? then, implode it when its inputted.
 
0
Close
Awesome. That worked! :)

Now how can I make it so that when a link is opened, it pops up and scrollbars are there? This is the code I have so far, and the scrollbars don't work:

Code:
<SCRIPT LANGUAGE=\"JavaScript\">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval(\"page\" + id + \" = window.open(URL, '\" + id + \"', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=500,height=400');\");
}
// End -->
</SCRIPT>
Not sure why the forums are showing menubar as men ubar, but in the code it's all together.
To call it:
Code:
<a href="javascript:popUp('FAQ.php?what=CC')">Country Codes</a>
 
0
Close
What is the html code on FAQ.php?what=CC?
 
0
Close
Here's the whole of the script:

PHP:
<?
echo "<html><head><title>Explanation of Country Codes</title></head>";
require_once("functions.inc.php");
switch ($_GET['what']) {
	case CC:
		echo "<table cellpadding='2'>";
		foreach ($func_country_array as $key => $value)
		{
			if ($key == "BLANK") 
			{
				continue;
			}
			if ($key == "ALL") 
			{
				echo "<tr>
				<td>";
				echo "ALL";
				echo "</td>
				<td>";nbsp(7);echo "</td><td>";
				echo "All Countries
				</td>
				</tr>
				";
				continue;
			}
			echo "<tr>
				<td>";
			echo $key;
			echo "</td>
			<td>";nbsp(7);echo "</td><td>";
			echo ucwords(strtolower($func_country_array[$key]))."
			</td>
			</tr>
			";
		}
		break;

	default:
	die("ARG! You didn't say the password!");
		break;
}
echo "</html>";
?>
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back