Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.