Jump to content

[SOLVED] Form trying to find file name the includes query paramters?


kernelgpf

Recommended Posts

When you click the button on this form, it attempts to use the query parameters on the end and add it as part of the file name.

 

My form: <form method=post action=messages2.php?action=delete>

 

The error: The requested URL /messages2.php?action=delete does not exist on OS. Please try again.

 

It doesn't do this on other forms, I've never come across this before.

Looks fine to me, and works on my local machine.  Although, you should put quotes around attribute values.

 

Are you sure messages2.php is in the same directory you're calling that form from?  Can we see more of the code?

$sql="SELECT id,Sender,Subject,Message,date,new,Playername FROM messages WHERE Recipient='$id' order by id desc ";
$result=mysql_query($sql);
$msgs=mysql_num_rows($result);


//and new='yes'
if($msgs == "0"){

print "<tr><td colspan='5' style='background-color:#b3a889;'><BR><BR><BR><BR><BR><BR><BR><BR><center><font size='5pt' face='comic sans ms'>No Messages.</font><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></td></tr>";

}
print "<form method=post action=messages2.php?action=delete>";
for($i=0;$i<$msgs;$i++)
{	
$r=mysql_fetch_array($result);
$mid=$r["id"];
$Sender=$r["Sender"];
$Subject=$r["Subject"];
$Message=$r["Message"];
$Date=$r["date"];
$New=$r["new"];
$Playername=$r["Playername"];

if($New == "no"){$rou="<font color='#339966'>Read</font>";}
if($New == "yes"){$rou="<font color='#1569C7'>*Unread*";}
if(empty($Subject)){$Subject="No Subject";}

//Sunday 6/18/2008 2:38pm
//$Date=str_replace(D n/j/y g:ia,$Date);

  echo "

<tr class='msg' class='scrollContent' onMouseOver=this.className='highlight' onMouseOut=this.className='msg'>

<td width='18'><INPUT type='checkbox' value='$mid' name='delMsg[]'></td> 
<td width='225'><b><a class='mailbox2' href=player_individual.php?id=$Sender>$Playername</a></b></td>
<td width='195'><b><a class='mailbox3' href='message_viewindividual.php?id=$mid'>$Subject</a></b></td>
<td width='195'><i>$Date</i></td>
<td><center><b>$rou</b></center></td>
</tr>
  ";
}
?>


</table>
</CENTER>
</td></tr>
<CENTER>
</tbody>
</table></CENTER></div>

<BR>

<a href="message_compose.php"> Compose a Message </a> | <input type='submit' name='massdelete' value='Delete Selection'></form>

The code is not mine, just trying to fix it. It worked previously.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.