Page 1 of 1

Echo Posted Value

Posted: Mon May 23, 2011 5:01 pm
by unemployment
After I post the industry value I want it to be echoed back out to the user that that is what they selected. Any way to do this without storing the data?
$isset = isset($_POST['industry']);
			
			foreach ($industries as $industry)
			{
				if (isset($isset) && $industry['industry_id'] == $isset)
				{
					echo "<option value=\"{$industry['industry_id'] }\" selected=\"selected\">${industry['industry']}</option>\n";
				}
				else
				{
					echo "<option value=\"{$industry['industry_id'] }\">${industry['industry']}</option>\n";
				}
			}

Re: Echo Posted Value

Posted: Mon May 23, 2011 5:55 pm
by jacek
isset($isset)
should be
$isset
Other than that not really sure what you mean :?

Re: Echo Posted Value

Posted: Mon May 23, 2011 6:01 pm
by unemployment
Fixed. I was using GET not POST :(

Re: Echo Posted Value

Posted: Mon May 23, 2011 7:48 pm
by jacek
unemployment wrote:Fixed. I was using GET not POST :(
ah :lol:

Well at least its working :)