Login | Register | FAQ
Anonymous

visitors post

+ Post a reply

4 posts Page 1 of 1


visitors post

by crazyred » Wed Sep 07, 2011 2:05 am

ok im mew to php and all but i was looking at lessons 11 and 12 and i tried to test something out i wrote this code:

<html>
<head>
<title>testforum</title>
</head>
<body>
<?php
<form method="post" action="mainpage">
<p>Username: <input type="text" name="subject" /></p>
<p>Password: <input type="text" name="post" /></p>
<p><input type="submit" value="submit" /></p>
</form>
</html>

Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\visitorspost.php on line 7
if im just completely wrong sorry. if im missing something in lesson 11 and 12 please explain
User avatar

crazyred

  • Posts: 8
  • Joined: Sun Sep 04, 2011 9:00 pm

Re: visitors post

by HTML.net » Wed Sep 07, 2011 7:36 am

Your code is pure HTML (no PHP). Just remove "<?php" and everything should work.

- Andreas, HTML.net
User avatar

HTML.net
Site Admin

  • Posts: 1194
  • Joined: Sat Sep 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: visitors post

by crazyred » Wed Sep 07, 2011 10:42 pm

thanks so muckd cant beleive i missed that especialy when the title for lesson 11 is "AN HTML page with a form"
thanks your a great help.
User avatar

crazyred

  • Posts: 8
  • Joined: Sun Sep 04, 2011 9:00 pm

Re: visitors post

by cyberlinkswm » Tue Sep 20, 2011 1:19 pm

crazyred wrote:ok im mew to php and all but i was looking at lessons 11 and 12 and i tried to test something out i wrote this code:

<html>
<head>
<title>testforum</title>
</head>
<body>
<?php
<form method="post" action="mainpage">
<p>Username: <input type="text" name="subject" /></p>
<p>Password: <input type="text" name="post" /></p>
<p><input type="submit" value="submit" /></p>
</form>
</html>

Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\visitorspost.php on line 7
if im just completely wrong sorry. if im missing something in lesson 11 and 12 please explain


this is very good post
User avatar

cyberlinkswm

  • Posts: 1
  • Joined: Tue Sep 20, 2011 1:11 pm
  • Location: India


+ Post a reply

Page 1 of 1