Parse error: parse error???
- CalumTurner
-
CalumTurner
- Member since: Jun. 25, 2006
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
Hello everyone
I'm creating a regestration area for my site, and I plan on making a log in area too. My problem is when i was uploading my code (the code is below) I encountered a problem. I went to the spicific URL and it said "Parse error: parse error, unexpected T_STRING in /home/www/genius1.awardspace.com/regester.
php on line 6"
I dont know what it wants me to edit, The code is below:
<?php
<form action="confirmreg.php" method="GET">
Enter a Password: <input type="text" name="pass" />
Enter a Username: <input type="text" name="user" />
Enter your name: <input type="text" name="name" />
Enter your age: <input type="text" name="age" />
Enter your email: <input type="text" name="email" />
Enter your country: <input type="text" name="country" />
<input type="submit" />
</form>
?>
Can someone plz help me!
-robokid
- JeremysFilms
-
JeremysFilms
- Member since: Feb. 18, 2005
- Offline.
-
- Forum Stats
- Member
- Level 18
- Blank Slate
First off, you put the HTML out there as expressions. If you want to make PHP output that HTML, you need to echo or print it. So echo the html you want to be outputted.
Examples:
echo 'Hey how are you';
echo '<form>
<input type="hidden" name="blah">
</form>';
- seel
-
seel
- Member since: Jun. 27, 2005
- Offline.
-
- Forum Stats
- Member
- Level 21
- Musician
Hmm.. You have some nasty syntax there, change the [input type="text" name="Password" /], use "password" as type instead of "text".. And then you should change GET to POST in form action.. And now to the main reason why it wont work: You have to remove the <?php and ?> tags, and use a normal HTML document, since the syntax you use is HTML code, not PHP..
- JeremysFilms
-
JeremysFilms
- Member since: Feb. 18, 2005
- Offline.
-
- Forum Stats
- Member
- Level 18
- Blank Slate
Sorry for double post, but also, you don't really need to use PHP to output that. You could just have it there then you PHP when you need it. Like this:
html is cool
dfjsldkfjlksdf
<?php
//omg php
?>
- CalumTurner
-
CalumTurner
- Member since: Jun. 25, 2006
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
thanks you guys, Im thinking of making the regestration questions in htlml, just because it would look more formal, but then at the bottom i would use php codes just to save the users information in the mysql database. thanks
-robokid
- DearonElensar
-
DearonElensar
- Member since: Jun. 10, 2002
- Offline.
-
- Forum Stats
- Member
- Level 18
- Blank Slate
i suggest you really look into php a bit more and learn about outputting html and things like that, and also look to things like security etc. because if i look at what you made your not ready to make a registration / member system...
- Zendra
-
Zendra
- Member since: Sep. 7, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (13,663)
- Block
-
- Forum Stats
- Member
- Level 51
- Blank Slate
At 7/8/06 01:25 PM, DearonElensar wrote: i suggest you really look into php a bit more and learn about outputting html and things like that, and also look to things like security etc. because if i look at what you made your not ready to make a registration / member system...
I totally agree. After reading your story on how your planning to do 'code' your member system, I really got a bad feeling about it.
You could start on W3Schools.com / PHP.

