PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
the Netherlands
Forum Newbie
Posts: 5 Joined: Sun Sep 18, 2005 7:13 am
Post
by the Netherlands » Sun Sep 18, 2005 7:18 am
Oke, something seems to be wrong with this form but I can't see what can any one help me on this?
<?php
<form name="formulier1" action="formulier1.php" method="get">
Piet: <input type=text name=voornaam><br><br>
Franken: <input type=text name=achternaam><br><br>
<input type=submit name=verzenden>
</form>
?>
Names are in dutch I get the following faul reply.
Parse error: parse error in C:\Program Files\xampp\htdocs\test.php on line 2
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Sun Sep 18, 2005 7:21 am
thats html, not php, thus putting it in <?php ?> tags is going to give it crazy errors, take away the tags
nickman013
Forum Regular
Posts: 764 Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York
Post
by nickman013 » Sun Sep 18, 2005 8:35 am
try this out. i just put the correct tags in...
Code: Select all
<?php
<html>
<form name="formulier1" action="formulier1.php" method="<? get ?>">
Piet: <input type=text name=voornaam><br><br>
Franken: <input type=text name=achternaam><br><br>
<input type=submit name=verzenden>
</form>
</html>
?>
the Netherlands
Forum Newbie
Posts: 5 Joined: Sun Sep 18, 2005 7:13 am
Post
by the Netherlands » Sun Sep 18, 2005 9:54 am
It worked on the way shiznatix said, but now I face a new problem I get the following error:
Parse error: parse error in C:\Program Files\xampp\htdocs\test.php on line 12
This is the code I don't understand how there can be something wrong on line 12 couse there is no line 12.
<form name="formulier1" action="test.php" method="get">
<u>Voornaam</u>: <input type=text name=voornaam><br><br>
<b>Achternaam</b>: <input type=text name=achternaam><br><br>
<input type=submit name=verzenden>
</form>
<?php
if(isset($_GET['verzenden'])){
echo "<b>Welkom " . $_GET['voornaam'] . " " . $_GET['achternaam']
. "</b>;
}
?>
The first part should display the form and works the last part should display "Welcome and display the voornaam and achternaam" but that part seems to couse trouble in a way.
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sun Sep 18, 2005 10:00 am
Start using
Code: Select all
tags to display code in the forums.
You are missing a quote in your code
the Netherlands
Forum Newbie
Posts: 5 Joined: Sun Sep 18, 2005 7:13 am
Post
by the Netherlands » Sun Sep 18, 2005 10:06 am
Jcart wrote: Start using
Code: Select all
tags to display code in the forums.
You are missing a quote in your code [/quote]
I don't get what you mean, I'm trying to get that form to work on my localhost but it refuses. I got XAMPP instlled and everything running so it should display the form but I get the error I menioned.
jayshields
DevNet Resident
Posts: 1912 Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England
Post
by jayshields » Sun Sep 18, 2005 10:17 am
you forgot a double quote after </b> near the end of your code...
the Netherlands
Forum Newbie
Posts: 5 Joined: Sun Sep 18, 2005 7:13 am
Post
by the Netherlands » Sun Sep 18, 2005 10:21 am
jayshields wrote: you forgot a double quote after </b> near the end of your code...
How stupid of me, thanks for the help.