Jump to content

form not posting all variables


Q695

Recommended Posts

Why would the following:

<form id="creature_add" enctype="multipart/form-data" action="?page=105" method="post" name="FormName">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td colspan="2" align="center">Creature Add</td>
	</tr>
	<tr>
		<td colspan="2">Creature Name:
		<input type="text" name="creature_name" size="24" /></td>
	</tr>
	<tr>
		<td colspan="2" align="center">Creature Picture: 
				<p><input type="file" name="creature_image" size="16" /></p>
			</td>
	</tr>

	<tr>
		<td>Defense Rate
		<input type="text" name="def_rate" size="24" />
		</td>
		<td>Defense Rate Range
		<input type="text" name="def_rate_range" size="24" />
		</td>
	</tr>
	<tr>
		<td>Attack Rate
		<input type="text" name="att_rate" size="24" />
		</td>
		<td>Attack Rate Range
		<input type="text" name="att_rate_range" size="24" />
		</td>
	</tr>
	<tr>
		<td>Defense
		<input type="text" name="def" size="24" />
		</td>
		<td>Defense Range
		<input type="text" name="def_range" size="24" />
		</td>
	</tr>
	<tr>
		<td>Attack
		<input type="text" name="att" size="24" />
		</td>
		<td>Attack Range
		<input type="text" name="att_range" size="24" />
		</td>
	</tr>
	<tr>
		<td>Health
		<input type="text" name="health" size="24" />
		</td>
		<td>Health Range
		<input type="text" name="health_range" size="24" />
		</td>
	</tr>
	<tr>
			<td align="center" colspan="2"><input type="submit" name="submit" value="Submit" /></td>
		</tr>
</table>
</form>

print_r this string:

Array ( [creature_name] => dog [def_rate] => 1 [def_rate_range] => 2 [att_rate] => 3 [att_rate_range] => 4 [def] => 5 [def_range] => 6 [att] => 7 [att_range] => 8 [health] => 9 [health_range] => 10 [submit] => Submit )

 

As you can see the form isn't passing the file input type.

Link to comment
Share on other sites

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.