I have aske this once before with different peramiters and im not sure how to adjust the code to suit what I need it to do so once more here is the code
<?php
include 'conection.php';
$result = mysql_query("SELECT * FROM inventory")
or die(mysql_error());
echo "<table border = '1'>";
echo "<tr><th>ID</th><th>Year</th><th>Make</th><th>Model</th>
<th>Milage</th><th>Description</th></tr>";
//keeps getting the next row untill no more exist
while($row = mysql_fetch_array($result))
{
//print out the contents of each row
echo "<tr><td>";
echo $row['id'];
$refId = $row['id'];
echo "</td><td>";
echo $row['year'];
echo "</td><td>";
echo $row['make'];
echo "</td><td>";
echo $row['model'];
echo "</td><td>";
echo $row['mileage'];
echo "</td><td>";
echo $row['description'];
echo "</td><td>";
?>
<form action="picUploads.php" method="post"
enctype="multipart/form-data">
<input type="text" name="refID" value=<?php echo $refId; ?> /></td><td><input type="submit" name="submit" value="Select" />
<?php
echo "</td></tr>";
}
echo "</table>";
?>
it all works just fine here, shows the propper refId and everything, its when I click the select button that things go wrong. The values are visible for testing purposes and will be changed to a hidden field once everything works properly. The select button sends the page viewer here,
<?php
session_start();
include 'conection.php';
if(isset($_SESSION['user_id']))
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Photo Upload</title>
</head>
<body onUnload="window.addEventListener("unload", invalidateBackCache, true)>
<center><h1>UPLOAD PICTURES</h1></center>
<form action="upload.php" method="post"
enctype="multipart/form-data">
<input type="text" name="refID" value=<?php echo $_POST[$refId]; ?> /><br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br /><label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>
<?php
}else
{
echo "<br /><br /><br /><br />";
echo "<strong><center>"."You Are Not Authorized To view This Page......<a href='admin.php'>Please Login First !!</a>"."</center></strong>";
}
?>
I am trying to figure out how to pass just the selected vehicles id through but it seems that all of the pulled ids are passed through. Any help on this would be greatlu apreciated.