php _POST - Help?

Gestart doorKqownzkq3 reacties33 weergaven

4 berichten · pagina 1 van 1

Kqownzkq

Lid · Topicstarter

Berichten
200
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nou mijn site protesteert ik doe:

<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />


Zou Naam + Leeftijd Weergeven

Dan Welcome

Welcome [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"fname"[/COLOR][COLOR= #007700]];[/COLOR] ?>!<br />
You are [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"age"[/COLOR][COLOR= #007700]];[/COLOR] ?> years old.


alleen de probleem is ik krijg de Naam en Age niet.

ik heb ook al geprobeerd met $_GET en $_REQUEST maar Levert Niets Op.

test was van hier gehaald: http://www.w3schools.com/PHP/php_post.asp

mn test: animefan.nl/test.html

//modedit: topic titel iets duidelijker gemaakt
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik heb m net getest en zo werkt het:

Welcome [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"fname"[/COLOR][COLOR= #007700]];[/COLOR] ?>!<br />
You are [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"age"[/COLOR][COLOR= #007700]];[/COLOR] ?> years old.
0
Berichten
15.303
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je moet het bestand als .php opslaan, niet als .html.
0
Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
maak het bestand php
dus test.php

het formulier zo:

0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren