Dynadot โ€” .com Registration $8.99

[PHP] Hidden Input, value=array

Spaceship Spaceship
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
use <?=explode("|",$_POST['location'])?> instead? then, implode it when its inputted.
 
0
•••
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
•••
What is the html code on FAQ.php?what=CC?
 
0
•••
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
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back