Ich versuche gerade eine eigene Extension mit Hilfe von PHP zu erweitern.
Dabei bin ich auf ein erstes Problem gestoßen
Wie ist es möglich mit PHP, durch ein Button-Feld, eine Variable an das eigene Script zu übergeben und das alles im TYPO3?
Ich habe es so versucht:
$content='
<form action= " <? $PHP_SELF ?> " method ="POST">
...
<input type ="submit" name = "submit" value ="senden">
<input type="hidden" name ="sent" value="1">
...
Als Fehlermeldung bekomme ich aber nach betätigen des Buttons :
Forbidden
You don´t have permisson to access /quickstart/> on this server
Wer kann mit bitte weiterhelfen
Danke
[quote="Bandit"]
$content='
<form action= " <? $PHP_SELF ?> " method ="POST">
...
<input type ="submit" name = "submit" value ="senden">
<input type="hidden" name ="sent" value="1">
Welchen HTML-Code erzeugt das denn bei Dir konkret? Schick doch mal einen Auszug aus dem Seitenquelltext (von <form> bis </form>)
CU
maxhb
Der HTML Code der diese Seite erzeugt wird schon korrekt angezeigt
nur nach drücken des Buttons den ich über diese HTML Befehle erstellt habe kommt die oben beschriebene Fehlermeldung
Forbidden usw...
Ich möchte aber das die gleiche Seite geöffnet wird und die Variable $sent übergeben wird.
Hi!
Bandit schriebDer HTML Code der diese Seite erzeugt wird schon korrekt angezeigt
Poste doch bitte trotzdem mal den HTML-Quellcode des Formulars, so wie erzeugt wird. Mir scheint die Formular-Action ist evtl. nicht korrekt.
CU
maxhb
[quote="maxhb"]
Also mein Quellcode lautet :
<form action= " <? $PHP_SELF ?>" method="POST">
<input type="radio" name="(array)frage">
Ist diese Antwort richtig???<br>
input type="radio" name ="frage[]">
oder diese Antwort???<br>
<br>
<input type="submit" name="submit" value="senden">
<input type="hidden" name="sent" value = "1">
</form>
Hilft Dir das weiter??
Danke
Gruß Bandit
Hallo maxhb
hier der Quelltext
Ich hoffe Du kannst damit was anfangen
Gruß Bandit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!--
This website is brought to you by Typo3 - get.content.right
Typo3 is a free open source Content Management Framework
created by Kasper Skaarhoej and licensed under GNU/GPL.
Information and contribution at http://www.typo3.com
-->
<STYLE TYPE="text/css">
<!--
/* default styles for extension "tx_mininews_pi1" */
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-title { font-weight:bold; }
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-teaser { margin-bottom:15px; }
.tx-mininews-pi1 .tx-mininews-pi1-fp_listrow P.tx-mininews-pi1-fp_listrowField-title { font-weight:bold; }
.tx-mininews-pi1 .tx-mininews-pi1-fp_listrow P.tx-mininews-pi1-fp_listrowField-teaser { margin-top:0px; margin-bottom:10px; }
.tx-mininews-pi1 .tx-mininews-pi1-singleView P.tx-mininews-pi1-singleViewField-teaser { font-style:italic; margin-top:5px; margin-bottom:10px; }
.tx-mininews-pi1 .tx-mininews-pi1-browsebox P SPAN.tx-mininews-pi1-browsebox-strong { font-weight:bold; }
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-teaser A { color:black; text-decoration:none; }
.tx-mininews-pi1 .tx-mininews-pi1-listrow P.tx-mininews-pi1-listrowField-teaser A:hover { color:black; text-decoration:none; }
/* default styles for extension "tx_1_pi1" */
.tx-1-pi1 H2 { margin-top: 0px; margin-bottom: 0px; }
-->
</STYLE>
<title>FC Bigfeet</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="Typo 3.3 CMS">
<script language="javascript">
<!--
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
var msie4 = (browserName == "Microsoft Internet Explorer" && browserVer >= 4);
if ((browserName == "Netscape" && browserVer >= 3) || msie4 || browserName=="Konqueror") {version = "n3";} else {version = "n2";}
function blurLink(theObject) {
if (msie4) {theObject.blur();}
}
// -->
</script>
</head><FRAMESET cols="170,*" border="0" framespacing="0" frameborder="NO">
<FRAME src="index.php?id=1&type=2" name="left" frameborder="NO" marginheight="0" marginwidth="0" noresize scrolling="NO">
<FRAME src="index.php?id=1&type=1" name="page" frameborder="NO" marginheight="0" marginwidth="0" noresize scrolling="AUTO">
</FRAMESET>
<noframes>
<body bgcolor="#FFFFFF">
</body>
</noframes>
</html>
Bandit schriebhier der Quelltext
Ich hoffe Du kannst damit was anfangen
Leider nicht. Hatte übersehen, dass Du ja Frames verwendest. Leider hast Du jetzt die Seite geschickt, die die frames aufruft...
Klick noch mal mit einem Rechtsklick in Deine Seite, aber direkt in das Formular. Schau dann in den Quelltetx, da solte irgendwo ein Frame-tag auftauchen, dann bist Du richtig....
Wir schaffen das noch 😉
CU
maxhb
P.S.: Es geht m eine der beiden Seiten "index.php?id=1&type=1" oder "index.php?id=1&type=2", nicht "index.php?id=1"...