0

Here is my php:

<?php
$confirm = $_POST['confirm'];

if(($_POST['confirm'] == 'Y') {header("Location: http://mysite.com/sage/page1.php");}
else {header("Location: http://mysite.com/sage/disagree.html");}
?>

Here is the HTML:

<form id="form" action="terms_redirect.php" method="post">
	<table id = "radio">
		<tr>
			<td>
				<input type="radio" id="agree" name="confirm" value="Y" />
			</td>
			<td>
				<label for="agree">I have read and agree to the Terms and Conditions</label>
			</td>	
		</tr>		
		
		<tr> 
			<td>
				<input type="radio" id="disagree" name="confirm" value="N" />
			</td>
			<td>
				<label for="disagree">I disagree</label>
			</td>	
		</tr>		
		
		
	</table>
	
	<INPUT type="image" name="submit" id = "button" img src = "img/btn.gif" alt = "submit" />
		
</form>

This is the error I get:

Parse error: syntax error, unexpected '{' in /home/mysite.com/sage/terms_redirect.php on line 5

Can you see what's wrong with the code?
Thank you!

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

You're welcome;
I never understood why php loves isset that much. As time goes by, you start to blindly put it in!

0

You're welcome;
I never understood why php loves isset that much. As time goes by, you start to blindly put it in!

Yes, exactly. Logically, it shouldn't matter and is rather redundant in cases like this one.

This question has already been answered. 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.