I am uploading a comment and subject that is being given to a php file from an HTML form. But I would like to store the name of a file link; the name of the file is $ran2 and is being generated in the php file. Comment:
<tr>
<td><input type="submit" name="submit" value="upload"></td>
</tr>
</table>
<?php
$ran2 = rand () ;
$insert = "INSERT INTO images (image, comment, subject)
VALUES ('".$_POST[$ran2]"', '".$_POST['text']."','".$_POST['subject']."')";
$add_member = mysql_query($insert);
?>
With $_POST[$ran2] I am storing nopthing in the database and would like to store the string $ran2.