Echo Posted Value

Ask about a PHP problem here.
Post Reply
unemployment
Posts: 165
Joined: Fri May 06, 2011 5:02 pm

Echo Posted Value

Post 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";
				}
			}
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Echo Posted Value

Post by jacek »

isset($isset)
should be
$isset
Other than that not really sure what you mean :?
Image
unemployment
Posts: 165
Joined: Fri May 06, 2011 5:02 pm

Re: Echo Posted Value

Post by unemployment »

Fixed. I was using GET not POST :(
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Echo Posted Value

Post by jacek »

unemployment wrote:Fixed. I was using GET not POST :(
ah :lol:

Well at least its working :)
Image
Post Reply