Jump to content

Form Action - 404 Not Found Error


jmrothermel

Recommended Posts

Here is my code I wrote:

 

 <?
include("1header.php");
include("members.php");

$a = $_GET['action'];  

if($a == ''){
$id = $_GET['id'];

print "<br><br>Choose if this chinchilla is a breeder or a pet.<br><br><form action='/pet.php?action=set' method='post' enctype='multipart/form-data'>
	Choose an Option:<br>
<select name='status' size='1'>
<option value='breeder'>Breeder</option>
<option value='pet'>Pet</option>
</select>
<input type='hidden' name='id' value='$id'>
<input type='submit' value=' Set '></form>";

}


if($a == 'set'){
$id = $_POST['id'];
$pet = $_POST['status'];	

$update = mysql_query("UPDATE `pets` SET `pet`='$pet' WHERE `id`= '$id'");	
if($update) {


			print "<h2>Your Chinchilla's pet/breeding status has been set. </h2><p>
			  <a href='managepets.php'>Return to your pets</a> ";
		}
		else {
		 	print mysql_error();
		}
}
include("footer.php");
?>

 

Any time I click the "set" button it takes me to a page not found 404 Error.  Is there something Im not doing right in uploading the page/script?

Link to comment
https://forums.phpfreaks.com/topic/93714-form-action-404-not-found-error/
Share on other sites

you'll pick it up and hey I wasted 4/5 hours yesterday and in the end I had adblock on which was blocking the image, you just gotta laugh. But, I bet you won't forget about the difference between relative and absolute paths (absolute could also have the full http://www.etc.etc/ stuff in front)

you'll pick it up and hey I wasted 4/5 hours yesterday and in the end I had adblock on which was blocking the image, you just gotta laugh. But, I bet you won't forget about the difference between relative and absolute paths (absolute could also have the full http://www.etc.etc/ stuff in front)

Oof, ouch, that must have hurt!

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.