Parse error: parse error, unexpected T_CHARACTER, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/web13/html/guestbook/signgb.php(96) : eval()'d code on line 16
der code vom gästebuch template sieht sieht so aus:
- Code: Alles auswählen
function encrypt($string, $key) {
$result = '';
for($i=0; $i<strlen($string); $i++) {
$char = substr($string, $i, 1);
$keychar = substr($key, ($i % strlen($key))-1, 1);
$char = chr(ord($char)+ord($keychar));
$result.=$char;
}
return base64_encode($result);
}
$sicherheits_eingabe = encrypt($_POST["sicherheitscode"], "123456789");
$sicherheits_eingabe = str_replace("=", "", $sicherheits_eingabe);
<script language="Javascript" src="admin/lib/mycode.js"></script>
<table class="standard" cellspacing="1" cellpadding="4" width="100%">
<tr>
<td class="heads" colspan="3">Eintragen</td>
</tr>
<tr>
<form name="myform" method="post" action="include.php?path=guestbook/signgb.php">
<input type="hidden" name="mode" value="0" onFocus="mymode()" />
<input type="hidden" name="mode" value="0" onFocus="mymode()" />
<td class="left" width="15%">Autor</td>
<td class="right" width="35%">
<input type="text" size="30" name="gbook_autor" value="$gbook_autor" style="width:90%" /></td>
<td class="right" width="50%" rowspan="8" align="center">$sign_message</td>
</tr>
<tr>
<td class="left">Titel</td>
<td class="right">
<input type="text" size="30" name="gbook_title" value="$gbook_title" style="width:90%" />
</tr>
<tr>
<td class="left" nowrap>E-Mail-Adresse</td>
<td class="right">
<input type="text" size="30" name="gbook_email" value="$gbook_email" style="width:90%" /></td>
</tr>
<tr>
<td class="left" nowrap>E-Mail-Optionen</td>
<td class="right">
<input class="checkbox" type="checkbox" name="gbook_check" value="1" $check1 /> <font class="small">Im Gästebuch anzeigen</font>
$sign_comment
</td>
</tr>
<tr>
<td class="left">Homepage</td>
<td class="right">
<input type="text" size="30" name="gbook_hpage" value="$gbook_hpage" style="width:90%" /></td>
</tr>
<tr>
<td class="left">ICQ</td>
<td class="right">
<input type="text" size="10" name="gbook_icqnr" value="$gbook_icqnr" maxlength="10" /></td>
</tr>
<tr>
<td class="left">Code</td>
<td class="right">
<img src="captcha/captcha.php" border="0" title="sicherheitscode"></td>
</tr>
<tr>
<td class="left">Code Eingabe</td>
<td class="right">
<input type="text" name="sicherheitscode" size="4"></td>
</tr>
<tr>
<td class="left" valign="top">Text</td>
<td class="right" colspan="2">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="80%" valign="top" rowspan="2">
<textarea rows="12" name="content" cols="60" style="width:100%" wrap="soft" onFocus=myselection(this) onclick=myselection(this) onChange=myselection(this)>$gbook_text</textarea></td>
<td width="20%" valign="top">$sign_format</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="heads" colspan="3" align="center">
<input type="hidden" name="gbook_time" value="$gbook_time" />
<input type="hidden" name="gb_uid" value="$gb_uid" />
<input type="submit" name="action" value="$lang[preview]" />
<input type="hidden" name="preview" value="$lang[preview]" />
<input type="submit" name="action" value="$lang[save]" />
<input type="hidden" name="save" value="$lang[save]" /></td>
</tr>
</form>
</table>
Es gibt eine datei namens "mycode.js" die code enthält. schreibe ich es darein hat es denselben effekt als würde ich es draussen lassen.
Mich interessiert wo ich die abfrage einfügen soll da ich bis auf mycode.js sonst keine scriptdatei habe ind der ansatzweise funktionen aufgezeichnet sind. Ich bin kein php-progger. das was ich kann hab ich durch probieren und testen erlernt und das ist nicht viel.
wäre gut wenn jemand mir dabei helfen könnte das script einzufügen
mfg
