0

Hi friend's I am getting syntax error. Plz help me.

https://code.sololearn.com/wWB9DOO66gk0/?ref=app

17th Jan 2018, 2:39 AM
jitendra maurya
jitendra maurya - avatar
6 Réponses
+ 10
You must put your html tags outside of the php code (meaning outside of "<?php ... ?>")
17th Jan 2018, 2:42 AM
Dapper Mink
Dapper Mink - avatar
+ 6
You're welcome, and good job! : )
17th Jan 2018, 8:50 AM
Ipang
+ 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?
17th Jan 2018, 4:51 AM
Ipang
+ 1
Thanks , Quentin and Ipang for your help.My code is working now☺
17th Jan 2018, 8:47 AM
jitendra maurya
jitendra maurya - avatar
0
@Quentin Januel. still I am getting error.
17th Jan 2018, 3:58 AM
jitendra maurya
jitendra maurya - avatar
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\
17th Jan 2018, 8:42 AM
jitendra maurya
jitendra maurya - avatar