0

I have a textbox on my form. I type in some text, then I submit the form, and it seems that my script doesn't see the text in the input element and treats it like empty:

<?php
$invname = $_POST['invname'];
if($invname == '') {print "You have not entered the name of your invention, please go back and try again.";}
...
?>

What, do you think, might cause it?

Here is the HTML:

<form id="form" action="page3_product.php" method="post">
				<input type="hidden" name="inventorid" value="<?php echo $inventorid; ?>" />
				<input type="hidden" name="firstname" value="<?php echo $firstname; ?>" />
				<input type="hidden" name="email" value="<?php echo $email; ?>" />

	

	<p>
		<label for="invname">1. What is the name of your invention?
		</label>
		<input type="text" name="invname" id="invname" />
	</p>
...
<a href = "page3_product.php"><img src = "img/submit_button.jpg" alt = "submit" /></a>
</form>

Edited by levsha: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by levsha
0

the reason is because you're not submitting the form in the first place , use an in put type submit to image instead

Edited by hashinclude: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.