Fehler bei Adressen mit ?link=---

PHP-Code:
PHP:
<?php 
echo '<form action="newComment.php?senden=1" method="post" name="entryComment">'; 
echo '<table border="0" cellspacing="0" cellpadding="0">'; 
echo '<tr>'; 
echo '<td><font size="1" face="Verdana,Helvetica,Arial,Geneva">Name:</font></td>'; 
echo '<td><input type="text" name="name" size="24"><input type="hidden" name="senden" value="1"></td>'; 
echo '</tr>'; 
echo '<tr>'; 
echo '<td>'; 
echo '</td>'; 
echo '<td><textarea name="text" rows="8" cols="55"></textarea></td>'; 
echo '</tr>'; 
echo '<tr>'; 
echo '<td>'; 
echo '</td>'; 
echo '<td align="right"><input type="submit" name="absenden" value="senden"></td>'; 
echo '</tr>'; 
echo '</table>'; 
echo '</form>'; 
include ("newssystem/config.inc.php"); 
if(isset($senden) or isset ($_GET[senden]) or isset ($_POST[senden])) { 
$id = 1; 
$datum = time(); 
$dataBase = "DB87590"; 
$connectIt = mysql_connect($dbserver,$nutzer,$passwort); 
mysql_select_db($dataBase); 
$insertIn = "INSERT INTO comments (name, text, zeit, newsId) VALUES ('$name', '$text', '$datum', '$id');"; 
$results = mysql_query($insertIn, $connectIt); 
if(isset($results) or isset($_GET[results]) or isset($_POST[results])) { 
echo "oki"; 
} 
} 
?>

Sorry war mein Fehler! hier jetzt nochmal
 
Zuletzt bearbeitet von einem Moderator:
ok, haste jetzt bestimmt übersehn, hatte geschrieben das es immernoch nicht geht.
Ich denke nicht das das problem die übertragung ist. Ohne include geht es ja. Nur sobald ich es in eine site include nicht. Hoffe du kannst mir helfen
EDIT: Kannst es vllt. auch einfach ma in eine andere PHP includen?
 
Zuletzt bearbeitet:
STOP!
kannst aufhörn, ich hab den Fehler
Code:
echo '<form action="index.php?link=readNews&id='.$id.'" method="post" name="entryComment">';
Das muss dahin
 
Hmm, gute Idee. Wolte sowieso später einbauen das nur die files die es aufm server gibt oder vllt. in einem array möglich sind, aber darauf wär ich nich gekommend as sich das dann immer wieder wieder holt. thx
 
Ich habbe es nun du hast mehrere Fehler gehabt

schau mal

http://h9755.serverkompetenz.net/other/index.php?link=newComment

1. Du musst nicht auf die newComme´nt headern sondern auf die index.php?link=newComment

Das ist in soweit klar oder

2.

Deine Inclusicon setzt das eine Formular in das andere
hierbei einfach den </form> aus index.php hochsetzten

und hier der fertige script:

PHP:
<html> 
<?php
$link=$_GET[link];
if(!isset($link)) { 
$link = "home"; 
} 
?> 
<head> 
<title>.:: DeMoehn.de <?php echo $link ?> ::.</title> 
        <csscriptdict import> 
            <script type="text/javascript" src="../../GeneratedItems/CSScriptLib.js"></script> 
        </csscriptdict> 
        <csactiondict> 
            <script type="text/javascript"><!-- 
var preloadFlag = true; 

// --></script> 
        </csactiondict> 
    </head>
<fon color=red><?php echo $link;?></font> 
<body bgcolor="#333333" text="black" link="black" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"> 
<form name="menue" action="index.php" method="post" enctype="multipart/form-data"> 
            <table border="0" cellspacing="0" cellpadding="0" align="center"> 
                <tr> 
                    <td align="center"><img src="myBanner.jpg" alt="" width="768" height="112"></td> 
                </tr> 
                <tr> 
                    <td align="center"> 
                        <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center"> 
                            <TR> 
                                <TD><a onmouseover="changeImages( /*CMP*/'Home',/*URL*/'bilder/over_03.gif');return true" onmouseout="changeImages( /*CMP*/'Home',/*URL*/'bilder/normal_03.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=home"><img SRC="bilder/normal_03.gif" name="Home" WIDTH=51 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'',/*URL*/'file:///OSX%20HD/Users/sebastian/Desktop/DeMoehn.de/Bilder/over_04.gif');return true" onmouseout="changeImages( /*CMP*/'',/*URL*/'file:///OSX%20HD/Users/sebastian/Desktop/DeMoehn.de/Bilder/normal_04.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=bilder"><img SRC="bilder/normal_04.gif" WIDTH=45 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'normal_05',/*URL*/'bilder/over_05.gif');return true" onmouseout="changeImages( /*CMP*/'normal_05',/*URL*/'bilder/normal_05.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=flash"><IMG SRC="bilder/normal_05.gif" name="normal_05" WIDTH=44 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'normal_06',/*URL*/'bilder/over_06.gif');return true" onmouseout="changeImages( /*CMP*/'normal_06',/*URL*/'bilder/normal_06.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=freunde"><IMG SRC="bilder/normal_06.gif" name="normal_06" WIDTH=60 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'normal_07',/*URL*/'bilder/over_07.gif');return true" onmouseout="changeImages( /*CMP*/'normal_07',/*URL*/'bilder/normal_07.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=upload"><IMG SRC="bilder/normal_07.gif" name="normal_07" WIDTH=57 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'normal_08',/*URL*/'bilder/over_08.gif');return true" onmouseout="changeImages( /*CMP*/'normal_08',/*URL*/'bilder/normal_08.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=scripte"><IMG SRC="bilder/normal_08.gif" name="normal_08" WIDTH=56 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'normal_09',/*URL*/'bilder/over_09.gif');return true" onmouseout="changeImages( /*CMP*/'normal_09',/*URL*/'bilder/normal_09.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=schule"><IMG SRC="bilder/normal_09.gif" name="normal_09" WIDTH=52 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'normal_10',/*URL*/'bilder/over_10.gif');return true" onmouseout="changeImages( /*CMP*/'normal_10',/*URL*/'bilder/normal_10.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=stuff"><IMG SRC="bilder/normal_10.gif" name="normal_10" WIDTH=46 HEIGHT=23 ALT="" border="0"></a></TD> 
                                <TD><a onmouseover="changeImages( /*CMP*/'normal_11',/*URL*/'bilder/over_11.gif');return true" onmouseout="changeImages( /*CMP*/'normal_11',/*URL*/'bilder/normal_11.gif');return true" href="http://www.demoehn.de/homepage/index.php?link=gaestebuch"><IMG SRC="bilder/normal_11.gif" name="normal_11" WIDTH=73 HEIGHT=23 ALT="" border="0"></a></TD> 
                            </TR> 
                        </TABLE> 
                    </td> 
                </tr> 
                <tr height="10"> 
                    <td height="10"><spacer size="10" type="vertical"></td> 
                </tr> 
                <tr> </form> 
                    <td> 
                        <div align="center"> 
                        <?php 
include ("$link.php"); 
?> 
                            </div> 
                    </td> 
                </tr> 
                <tr height="10"> 
                    <td align="center" height="10"><spacer size="10" type="vertical"></td> 
                </tr> 
                <tr> 
                    <td align="center"><object classid="clsid:-)27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="60" width="468"> 
                            <param name="movie" value="noelle_fullsize.swf"> 
                            <param name="quality" value="best"> 
                            <param name="play" value="true"> 
                            <embed height="60" pluginspage="http://www.macromedia.com/go/getflashplayer" src="noelle_fullsize.swf" type="application/x-shockwave-flash" width="468" quality="best" play="true"> 
                        </object></td> 
                </tr> 
            </table> 
        

</body> 

</html>


und

PHP:
<?php 
echo '<form action="index.php?link=newComment" method="post" name="entryComment">'; 
echo '<table border="0" cellspacing="0" cellpadding="0">'; 
echo '<tr>'; 
echo '<td><font size="1" face="Verdana,Helvetica,Arial,Geneva">Name:</font></td>'; 
echo '<td><input type="text" name="name" size="24"><input type="hidden" name="senden" value="1"></td>'; 
echo '</tr>'; 
echo '<tr>'; 
echo '<td>'; 
echo '</td>'; 
echo '<td><textarea name="text" rows="8" cols="55"></textarea></td>'; 
echo '</tr>'; 
echo '<tr>'; 
echo '<td>'; 
echo '</td>'; 
echo '<td align="right"><input type="submit" name="absenden" value="senden"></td>'; 
echo '</tr>'; 
echo '</table>'; 
echo '</form>'; 
@include ("newssystem/config.inc.php"); 
if(isset($senden) or isset ($_GET[senden]) or isset ($_POST[senden])) { 
$id = 1; 
$datum = time(); 
$dataBase = "DB87590"; 
$connectIt = mysql_connect($dbserver,$nutzer,$passwort); 
mysql_select_db($dataBase); 
$insertIn = "INSERT INTO comments (name, text, zeit, newsId) VALUES ('$name', '$text', '$datum', '$id');"; 
$results = mysql_query($insertIn, $connectIt); 
if(isset($results) or isset($_GET[results]) or isset($_POST[results])) { 
echo "oki"; 
} 
} 
?>

Grüsse Lukasz!
 
Zuletzt bearbeitet von einem Moderator:
Zurück