Page 1 of 1
not working form
Posted: Sun Sep 18, 2005 7:18 am
by the Netherlands
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
Posted: Sun Sep 18, 2005 7:21 am
by shiznatix
thats html, not php, thus putting it in <?php ?> tags is going to give it crazy errors, take away the tags
Posted: Sun Sep 18, 2005 8:35 am
by nickman013
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>
?>
Posted: Sun Sep 18, 2005 9:54 am
by the Netherlands
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.
Posted: Sun Sep 18, 2005 10:00 am
by John Cartwright
Start using
Code: Select all
tags to display code in the forums.
You are missing a quote in your code
Posted: Sun Sep 18, 2005 10:06 am
by the Netherlands
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.
Posted: Sun Sep 18, 2005 10:17 am
by jayshields
you forgot a double quote after </b> near the end of your code...
Posted: Sun Sep 18, 2005 10:21 am
by the Netherlands
jayshields wrote:you forgot a double quote after </b> near the end of your code...
How stupid of me, thanks for the help.
