How can I populate a Form field and hide it?

Aside from the issue of database access which will need to be dealt with, I suspect one of the issues you have is this. In your form input above you have

<input type="hidden" name="album_id" value="Album0">

But in your php code, you have:

$album_id = (int) mysql_real_escape_string( $_POST['album_id'] );

So that implies that the album_id field must be an integer (which would make sense), yet you set it to “Album0”. I must admit I don’t know how php deals with attempting to cast a text string to a number.

2 Likes