kernelgpf Posted May 12, 2009 Share Posted May 12, 2009 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. Link to comment https://forums.phpfreaks.com/topic/157759-solved-form-trying-to-find-file-name-the-includes-query-paramters/ Share on other sites More sharing options...
Maq Posted May 12, 2009 Share Posted May 12, 2009 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? Link to comment https://forums.phpfreaks.com/topic/157759-solved-form-trying-to-find-file-name-the-includes-query-paramters/#findComment-832105 Share on other sites More sharing options...
kernelgpf Posted May 12, 2009 Author Share Posted May 12, 2009 $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. Link to comment https://forums.phpfreaks.com/topic/157759-solved-form-trying-to-find-file-name-the-includes-query-paramters/#findComment-832110 Share on other sites More sharing options...
Maq Posted May 12, 2009 Share Posted May 12, 2009 Looks fine. Are you sure messages2.php is in the same dir as this script? Link to comment https://forums.phpfreaks.com/topic/157759-solved-form-trying-to-find-file-name-the-includes-query-paramters/#findComment-832116 Share on other sites More sharing options...
kernelgpf Posted May 12, 2009 Author Share Posted May 12, 2009 Yeah. I added quotes also, did not fix it. Link to comment https://forums.phpfreaks.com/topic/157759-solved-form-trying-to-find-file-name-the-includes-query-paramters/#findComment-832118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.