php fel, hälp me!
php fel, hälp me!
jag följde eran "php skola" och jag kom fram till post böset, men jag fick de inte att funka
Index.php
|
V
<form method="post" action="mottagare.php">
<input type="text" name="skickat">
<input type="submit" value="Skicka">
</form>
sedan när den kommer till mottagare.php så visas inte variabeln alls! :(
<?php
$mottaget = $_POST["skickat"];
echo $mottaget;
?>
kan nån se nått fel? hälp me för fadderullan
Index.php
|
V
<form method="post" action="mottagare.php">
<input type="text" name="skickat">
<input type="submit" value="Skicka">
</form>
sedan när den kommer till mottagare.php så visas inte variabeln alls! :(
<?php
$mottaget = $_POST["skickat"];
echo $mottaget;
?>
kan nån se nått fel? hälp me för fadderullan
edit:
nej vänta lite nu. tänkte helt fel.
nej vänta lite nu. tänkte helt fel.
Grundare av webbyrån We made you look http://wemadeyoulook.at
Har du provat med apostrofer istället för citattecken? Alltså:
$mottaget = $_POST['skickat'];
istället för:
$mottaget = $_POST["skickat"];
$mottaget = $_POST['skickat'];
istället för:
$mottaget = $_POST["skickat"];
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
Får du något felmeddelande utskrivet i html-koden i mottagare.php?
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
När register_globals är Off går det bara att "samla in" POST/GET/SESSION/etc-variabler genom deras arrayer ($_POST/$_GET/$_SESSION/etc). När register_globals är On är det skit samma.Hein wrote:jasså?fredrik wrote:Hans kod ska fungera oavsett vad register_globals är inställt på.
Alltså fungerar hans kod oavsett vad register_globals är inställt på.
http://se.php.net/register_globals
- Niklas Berggren
- Hedersbit
- Posts: 3524
- Joined: 2002-03-08 17:53:04
- Location: Göteborg (Skövde)
- Contact:
Nämen... nån har faktiskt tittat på det hela :P
Ett snabbt test; byt ut $_POST["skickat"] mot $_GET["skickat"]
Surfa sedan in på http://ditt.hostname/mottagare.php?skic ... meddelande
Nåt resultat då?
Ett snabbt test; byt ut $_POST["skickat"] mot $_GET["skickat"]
Surfa sedan in på http://ditt.hostname/mottagare.php?skic ... meddelande
Nåt resultat då?
"How about the government sticks to courts, police, defense and corruption and leave compassion to the people who have it?" - Penn Jillette.
- Niklas Berggren
- Hedersbit
- Posts: 3524
- Joined: 2002-03-08 17:53:04
- Location: Göteborg (Skövde)
- Contact:
Här är dokumentationen till hur man installerar det på alla möjliga system. Det vanligaste är nog Unix/Linux och därmed förmodligen det som är lättast att få hjälp med.
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.