Problem getting param from select dropdown


am getting error when trying to get param from select dropdown:

form code:

<form action="dd_test.php" method="post">
	<select name="count">
		<option selectd="selected" value="">25</option>
		<option value="35">35</option>
		<option value="65">65</option>


$countR = $_POST['count'];

get error…

test Notice: Undefined index: count in /Library/WebServer/Documents/tw/dd_test.php on line 7

what on earth is the problem here…

thank you…


oh brother… I just figured it out… sorry…

but this thing is still causing me a problem…

this is for a Twitter Search API thing…

if I add this one line

$countR = $_POST['count']

to my PHP code the search doesn’t work… i.e., I don’t get any results, don’t get any errors…ajax requests just hangs…
(whether I use “GET” or “POST”… form is action “post”, but am using getJSON() method… which I assume by default is method “GET”???

I don’t want to use method “GET” for the search because then search term appears as a param in url, and when they search for a another term the param in the url doesn’t change (and I don’t want to have to reload the page every time they run a new search…)

now why is this is simple line

$countR = $_POST['count']

causing the search to not work?

again, relevant form code is:

<form action="" method="post">
	show <select name="count">
		<option selectd="selected" value="25">25</option>
		<option value="35">35</option>
		<option value="65">65</option>
	</select> tweets 

thank you…


That error is just saying that index ‘count’ is not set (when you’ve not submitted the form) so you should check that it is set before using it.

$countR = (isset($_POST['count']) ? "{$_POST['count']}" : '');