I am stumped yet again with another site that i own...
I have run into a problem with the while statement only showing 40 rows in a form. I use mySql to pull the data, and insert the values in to text input boxes. after 40 rows, it starts acting up.
If one of my users had over 40 entries in their account, the extra's are hidden for some reason on the page, but you can see them in the View Source.
Here is my code :
<script language="JavaScript">
function addone() {
document.songform.action = "actions.php?pmode=addone";
document.songform.submit();
}
function inorder() {
document.songform.action = "step2a.php";
document.songform.submit();
}
function create() {
document.songform.action = "step2.php";
document.songform.submit();
}
</script>
<form method="POST" name="songform">
<?
$i=0;
$sql = mysql_query("SELECT * FROM images WHERE mid = '$mid'");
while($file = mysql_fetch_object($sql)){
$i++;
?>
<font color="white"><center>
<b>URL <? echo $i; ?> :<input type="text" name="fileurl[]" style="width: 410" value="<? echo $file->filename; ?>"><br>
<b>Song Name : <input type="text" name="songname[]" width="20" value="<? echo $file->songname; ?>"> <b>Band Name : <input type="text" name="bandname[]" width="20" value="<? echo $file->bandname; ?>">
<br><br>
<? } ?>
<font color="white"><center>
<b>URL <? echo $i + 1; ?> : <input type="text" name="fileurl[]" style="width: 410" value=""><br>
<b>Song Name : <input type="text" name="songname[]" width="20" value="">
<b>Band Name : <input type="text" name="bandname[]" width="20" value="">
<br><br>
<input type="button" onClick="addone()" value="Add another song">
<input type="button" onClick="inorder()" value="Put Playlist In Order">
<input type="button" onClick="create()" value="Create Playlist">
</form>
all works well up to the 40'th row. After that, it will still show the input box, but it will be blank. If i push one letter while in that text field, it will show what is supposed to be there. This happens in IE or FireFox.
if there are 42 rows, it will only show 42 input areas, and will not give me the extra one to add one more to the database.
any ideas?