Edit report at https://bugs.php.net/bug.php?id=19451&edit=1
ID: 19451
User updated by: ikez2605 at gmail dot com
Reported by: ikez2605 at gmail dot com
Summary: Fucking Guestbook!, Please help me, It's very
important for me
Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Win 98 SE
PHP Version: 4.2.3
Block user comment: N
Private report: N
New Comment:
<a href=http://www.coach-bags-wholesale.net>coach outlet</a> coach outlet
NIykdWndzkpDIH <a href=http://www.coach-bags-wholesale.net>coach purses</a>
coach handbags TMfcrNwqhbhFCQ <a href=http://www.coach-bags-wholesale.net>coach
outlet store online</a> coach shoes
Previous Comments:
------------------------------------------------------------------------
[2002-09-17 07:40:46] [email protected]
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2002-09-17 07:37:10] kazworks at t-online dot de
.
------------------------------------------------------------------------
[2002-09-17 07:36:43] [email protected]
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.
------------------------------------------------------------------------
[2002-09-17 07:35:31] ikez2605 at gmail dot com
Look here, this is the sourcetext of my guestbook, but if i tried to use, there
is the notice:
Undefined variable 'message'
!Sorry for my bad English!
<?php
if(isset($GuestbookNew)){
//Das Formular der Datei guestbook_new.php wurde ausgefüllt und abgeschickt
//HTML- und PHP-Tags aus den Eingabefeldern entfernen
$name=strip_tags($name);
$email=strip_tags($email);
$homepage=strip_tags($homepage);
$eintrag=strip_tags($eintrag);
//Konvertiere Zeilenumbrüche in HTML-<br>-Umbrüche
$eintrag=nl2br($eintrag);
//Eingaben überprüfen
if(strlen($name)<3){
//Kein richtiger Name eingegeben
$error_msg="Bitte geben Sie Ihren Namen an";
}
if(strlen($eintrag)<3){
//Kein Eintrag vorgenommen
$error_msg.="<br>Bitte geben Sie auch etwas in das Gästebuch ein.";
}
if(ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,4})$",$email)){
//Mailadresse korrekt angegeben - Name entsprechend formatieren
$name="<a href=mailto:" . $email . ">" . $name . "</a>";
}
if(ereg("^([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,4})$",$homepage)){
//Es wurde auch eine Homepageadresse angegeben - entsprechende Formatierung
vornehmen
if(!ereg("^http:////",$homepage)){
//http:// fehlt in der Angabe der Adresse - hier ergänzen
$homepage="http://" . $homepage;
}
$hp_format="<br>Homepage: <a href=" . $homepage . " target='_new'>" .
$homepage . "</a>";
}
//Ende Eingaben überprüfen
if(isset($error_msg)){
//Fehlerhafte Angaben - Hinweis ausgeben und keinen Eintrag vornehmen
$message ="<br>Ihr Eintrag konnte leider nicht in unser Gästebuch
aufgenommen werden:<br>";
$message.=$error_msg;
$message.="<br>Klicken Sie auf <a
href=javascript:history.back(1)>zurück</a>.<br><br>";
}else{
//Neuen Gästebucheintrag vornehmen
//Neuen Gästebucheintrag formatieren
$new_entry ="<table width='400' border='0' cellspacing='1'
cellpadding='1'>\n";
$new_entry.=" <tr valign='top' >\n";
$new_entry.=" <td class='kleiner' width='300'>Name: " . $name .
$hp_format . "</td>\n";
$new_entry.=" <td class='kleiner' width='100'>" . date("d.m.Y H:i") .
"</td>\n";
$new_entry.=" </tr>\n";
$new_entry.=" <tr valign='top'>\n";
$new_entry.=" <td colspan='2' class='kleiner'>\n";
$new_entry.=" <p>" . $eintrag . "</p>\n";
$new_entry.=" </td>\n";
$new_entry.=" </tr>\n";
$new_entry.=" <tr>\n";
$new_entry.=" <td colspan='2'>\n";
$new_entry.=" <hr width='400' size='1' noshade>\n";
$new_entry.=" </td>\n";
$new_entry.=" </tr>\n";
$new_entry.="</table>\n";
$guestfile="guestbook_data.html";
//Zuerst alte Einträge auslesen
if(file_exists($guestfile)) {
$fp=fopen($guestfile,"r");
$guest_data=fread($fp,filesize($guestfile));
fclose($fp);
}
//Gästebucheinträge neu anlegen und den neuen an den Beginn schreiben
$fp=fopen($guestfile,"w");
flock($fp,1);
fputs($fp,$new_entry);
if(isset($guest_data)) fputs($fp,$guest_data);
flock($fp,3);
fclose($fp);
//Mail verschicken
$recipient="[email protected]";
$subject="Neuer Eintrag im Gaestebuch";
$header="From: [email protected]\n";
$mail_body="Neuer Eintrag im Gaestebuch";
mail($recipient,$subject,$mail_body,$header);
}
}
?>
<?php echo $message; ?>
<?php include("guestbook_data.html") ?>
<link rel="stylesheet" href="../../css/standard.css" type="text/css">
P.S If you want to help me, you will need the files guestbook_data.html and
guestbook_new.php,
guestbook_data.html is a empty .html-file,
and here is the source text of guestbook_new.php:
<link rel="stylesheet" href="../../css/standard.css" type="text/css">
<br>
<center><img src="../../imgs/gbuch.gif" border="0" alt=""></center>
<br>
<form action=guestbook_simple.php method=POST>
<table align="center">
<tr>
<td>
<font size="-2">Name :</font>
<br>
<font size="-2">E-Mail :</font>
<br>
<font size="-2">Homepage :</font>
</td>
<td>
<input value="intotzu" style="border:
none;background-color:#e7e7e7;font-size:7pt; font-family:tahoma;" type="text"
name="name" size="20" maxlength="50">
<br>
<input value="[email protected]" style="border:
none;background-color:#e7e7e7;font-size:7pt; font-family:tahoma;" type="text"
name="email" size="20" maxlength="50">
<br>
<input value="www.poe.de" style="border:
none;background-color:#e7e7e7;font-size:7pt; font-family:tahoma;" type="text"
name="homepage" size="30" maxlength="100">
</td>
</tr>
<tr>
<td colspan="2">
<font size="-2">Kommentar :</font><br><br><textarea style="border:
none;background-color:#e7e7e7;font-size:7pt; font-family:tahoma;"
name="eintrag" cols="66" rows="10" >itschoritly</textarea>
</td>
</tr>
<tr>
<td valign="bottom" align="center" colspan="2">
<input style="background-color:white; border: none; COLOR: black;
font-size:7pt; font-family:tahoma;" type="Submit" name="GuestbookNew"
value="Eintragen">
</td>
</tr>
</table>
</form>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=19451&edit=1