0
Hi friend's I am getting syntax error. Plz help me.
6 Respostas
+ 10
You must put your html tags outside of the php code (meaning outside of "<?php ... ?>")
+ 6
You're welcome, and good job! : )
+ 5
@jitendra maurya,
This is how it should be done, as @QuentinJanuel suggested:
<html>
<body>
<form action="my.php" method="post">
<p>Name: <input type="text" name="name" /></p>
<p><input type="submit" name="submit" value="Submit" /></p>
</form>
<?php
// Your php code here, I moved the form out
// of php code block
?>
<body>
</html>
I still see the html block inside PHP block in your code, can you explain what error you get after moving the HTML out of PHP block?
+ 1
Thanks , Quentin and Ipang for your help.My code is working now☺
0
@Quentin Januel. still I am getting error.
0
@Ipang I am getting this error
Parse error: syntax error, unexpected '<', expecting end of file in ..\Playground\ PHP Parse error: syntax error, unexpected '<', expecting end of file in ..\Playground\