Jump to content



Recommended Posts

Hello forum!I am having problem with my website www.planet.zix.se/video/I am using this code:

<form action="upload_file.php" method="post"enctype="multipart/form-data">  <label for="file">Filename:</label>  <br />  <input type="file" name="file" id="file">  <br  />  <label for="world">World:</label>  <br />  <input type="world" name="world">  <br />  <input type="submit" name="submit" value="Submit" /></form>

and in the upload_file.php the $_POST["world"] worksbut little bit down on the index.php I use

if($file[0]!='.') echo 'Video: <a href="video.php?video='.urlencode($file).'">' . $file . ' </a>';	echo "World:" . $_POST["world"] . "<br />";

and it will show "World:" but not the value :)anybody know how I could fix this?

Link to comment
Share on other sites

Well, you can only use the $_POST array on the page that the data gets posted to. So, if you post the data to upload_file.php, you will not be able to access that POST data from any subsequent pages. You could pass in on in a querystring value, or use sessions. A bit more code would help us help you more specifically.P.S. there is no such thing as an input with type="world" - try input type="text" (but that shouldn't be causing a problem as the browser will default to type="text")

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...