xampp Php Problem / method="POST"

Alles, was PHP betrifft, kann hier besprochen werden.

xampp Php Problem / method="POST"

Postby Gipskopf » 21. October 2006 21:56

hi

ich habe mir zum erstenmal xampp installiert.

jetzt wollte ich ein PHP script schreiben und testen.

Aber schon am Anfang wunderte ich mich warum das script
in seiner grundlegensten form nicht geht.

irgendwie wird auf meinem localhost method="POST" nicht übergeben.
wenn ich das script auf meinem Webspace teste ,dann läuft es.

Was könnte das sein ??
Last edited by Gipskopf on 21. October 2006 21:59, edited 1 time in total.
Gipskopf
 
Posts: 6
Joined: 21. October 2006 21:39

Postby martinpre » 21. October 2006 21:59

rufst du die variablen per $_POST['xyz'] auf?
martinpre
 
Posts: 405
Joined: 22. May 2006 16:14
Location: Nähe Tulln / Österreich

Postby Gipskopf » 21. October 2006 22:00

Ja


Code: Select all
<?php 
  $url = $Post['Url'];
    echo "Deine Url <br />$Url <br />wurde erfolgreich eingetragen<br />";
   
   
  ?>
Gipskopf
 
Posts: 6
Joined: 21. October 2006 21:39

Postby martinpre » 21. October 2006 22:01

$_POST['xyz']
martinpre
 
Posts: 405
Joined: 22. May 2006 16:14
Location: Nähe Tulln / Österreich

Postby Gipskopf » 21. October 2006 22:08

hmm , es geht einfach nicht
Gipskopf
 
Posts: 6
Joined: 21. October 2006 21:39

Postby martinpre » 21. October 2006 22:11

auch nicht mit dem unterstrich?
martinpre
 
Posts: 405
Joined: 22. May 2006 16:14
Location: Nähe Tulln / Österreich

Postby Gipskopf » 21. October 2006 22:16

nein auch damit nicht
Gipskopf
 
Posts: 6
Joined: 21. October 2006 21:39

Postby Gipskopf » 21. October 2006 22:18

hier mal das ganze script , da ist kein Fehler drin ^^

Code: Select all
<html>
  <head>
  <title>Link Script</title>
  </head>
  <body>
     
<form action="Ausgabe.php" method="POST"><br><br><br>

 <center><b><i>Bitte geben sie hier <br /> die Url zu ihrer Seite ein:</i></b><br />
  <input type="text" name="Url" value="http://"><br>
  <input type="submit" name="Go" value="Eintragen"></center>


</form
      </body>
  </head>
</html>





und die Ausgabe


Code: Select all
<html>
  <head>
    <title>Link Script</title>
    </head>
  <body>
  <?php 
  $url = $_POST['Url'];
    echo "Deine Url <br />$Url <br />wurde erfolgreich eingetragen<br />";
   
   
  ?>
   
  </body>
</html>
Gipskopf
 
Posts: 6
Joined: 21. October 2006 21:39

Postby Wiedmann » 21. October 2006 22:34

Code: Select all
$url = $_POST['Url'];
echo "Deine Url <br />$Url <br />wurde erfolgreich eingetragen<br />";

da ist kein Fehler drin

Grundlagen zu PHP --> Variablen --> 1. Absatz --> 2. Satz:
http://de.php.net/manual/en/language.variables.php
("The variable name is case-sensitive.")
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Gipskopf » 21. October 2006 23:27

ok ^^
aber es geht trotzdem nicht .
Gipskopf
 
Posts: 6
Joined: 21. October 2006 21:39

Postby Wiedmann » 21. October 2006 23:56

Wenn es immer noch nicht geht, dann darfst nicht "ok" sagen (da du wohl doch noch nicht verstanden hast was der Fehler war...).

(Jedenfalls wenn man den einen Buchstaben im Script ändert, tut das Script.)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby newby » 22. October 2006 17:08

du hast die Varianle Url einmal groß, einmal klein geschrieben, dass würd ich mal ändern. Müsste dann eigendlich funtionieren!
newby
 
Posts: 105
Joined: 16. July 2006 10:53

Postby sari42 » 24. October 2006 15:46

Gipskopf wrote:^

nomen est omen ;)
sari42
 
Posts: 800
Joined: 27. November 2005 18:28


Return to PHP

Who is online

Users browsing this forum: No registered users and 8 guests