Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Using POST data for form action parameter

$
0
0
I want to use the POST method from my form to open a file from a location on the website.

			<form name = "AudioQuery" action = "<?php echo trim($_POST['QueryResults']); ?>" method = "POST">
			<div align = "left">
			<fieldset>
			<legend>Search Results</legend>
			<select name = "QueryResults">
			<?php
			foreach ($Result as $row)
			{
				?>
				<Option Value = "
				<?php
					// Set Value
					echo($row["Location"]);
				?>
				">
				<?php
					// Set Alias
					echo("<P>" . $row["Title"] . "</P>"); 
				?>
				</Option>
				<?php
			}
			echo $text;
			?>
			</select>
			<br />
			<br />
			<input Type = "submit" name = "submit" value = "Submit" Align = "left"/>
			</fieldset>
			</div>
			</form>



I believe the problem is in the form tag and how I am assigning the Action value. The POST Value should contain the Location Value from the query. the Location is where the mp3 file is stored.

currently when submitted I get a Exception error

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>