Hi everybody, im linkcool, im new here and i have a little problem.
I've been making some php for about 2 weeks now and i got a problem with a form and a $_POST.
here is the upload.php file, it gets redirected into uploadverify.php
<?php
session_start();
if(!session_is_registered(username))
{
session_register("wrongpage");
$_SESSION['wrongpage'] = "Sorry you are not logged in so you can't visit this page: Upload.php <br/>";
header("location:login.php");
}
else{}
echo '<table border="0"><tr><td width="500"> </td><td><a href="logout.php">Logout!</a></td></t></table><br/ >';
echo "All kind of files are supported <br/><br/>";
?>
<table>
<form action="UploadVerify.php" method="post" enctype="multipart/form-data">
<tr>
<label for="file"><td width="200">Filename:</td></label>
<td><input type="file" name="file" id="file" /></td>
</tr>
<tr>
<td>Description: (optionnal)</td><td><input type="text" name="description" /></td>
</tr>
<tr>
<td>
Album: </td>
<td>
<input type="text" name="something1" />
</td>
</tr>
<tr>
<td></td><td><input type="submit" name="submit" value="Upload!" /></td>
</tr>
</form>
</table>
<?php
echo 'New feature!:<br/>';
echo '<a href="view.php">View all YOUR uploaded images</a>'
?>
It is a form where the user uploads a file and write something in the description textbox and something in the "something1" textbox(it was "album" before).
So when the user click: upload!, it makes the uploadverify.php action. In there, the user can see the description as he writen it in the textbox, but the album dont show up. And they are both same input.
I tryed the var_dump($_POST['something1']) and it does not return it as NULL, it returns as:
string(0) ""
.
So does anyone know how to make the $_POST['something1'] have it's value? because it returns empty...
And why the $_POST['description'] does not return empty?
thank you,
linkcool