woran könnte das liegen das ein gästebuch eintrag 2 mal ausgeführt
wird? das Insert wird immer 2 mal gemacht und ich weiss nicht worans
liegt. Hat jemand dazu eine idee?
hier mal eine testausgabe
INSERT INTO cms_guestbook (id, time, name, email, homepage, wohnort,
icq, text, ip) VALUES ('0', '1200969242', 'sdfdsfsdf', ' ', 'http://',
'', '45772', 'dsfdsfds:O:O:O', '')INSERT INTO cms_guestbook (id, time,
name, email, homepage, wohnort, icq, text, ip) VALUES ('0',
'1200969242', 'sdfdsfsdf', ' ', 'http://', '', '45772',
'dsfdsfds:O:O:O', '')
und hier mal der phpcode
Alles anzeigen
Ich bin da echt ratlos
Gruss
Dragon
wird? das Insert wird immer 2 mal gemacht und ich weiss nicht worans
liegt. Hat jemand dazu eine idee?
hier mal eine testausgabe
INSERT INTO cms_guestbook (id, time, name, email, homepage, wohnort,
icq, text, ip) VALUES ('0', '1200969242', 'sdfdsfsdf', ' ', 'http://',
'', '45772', 'dsfdsfds:O:O:O', '')INSERT INTO cms_guestbook (id, time,
name, email, homepage, wohnort, icq, text, ip) VALUES ('0',
'1200969242', 'sdfdsfsdf', ' ', 'http://', '', '45772',
'dsfdsfds:O:O:O', '')
und hier mal der phpcode
Quellcode
- if(isset($_POST["guesbookadd"]))
- {
- $my_captcha->verify=$_POST['password'];
- $name=$_POST['name'];
- $kommentar=$_POST['kommentar'];
- $email=$_POST['email'];
- $homepage=$_POST['homepage'];
- $wohnort=$_POST['wohnort'];
- $icq=$_POST['icq'];
- $REMOTE=$REMOTE_ADDR;
- if ($homepage!="http://") { $homepage= "http://" . $homepage;}
- $tstamp=time();
- $error = false;
- $_POST['captcha']=((strlen($_POST['captcha'])==5) && (preg_match('/^[2-9]+$/', $_POST['captcha']))) ? $_POST['captcha'] : md5(time());
- $_POST['hash']=((strlen($_POST['hash'])==32) && (preg_match('/^[a-f0-9]+$/', $_POST['hash']))) ? $_POST['hash'] : md5(time());
- if (!file_exists(getcwd().'/captchatmp/'.$_POST['hash'].$_POST['captcha']))
- $error = true;
- if((!$_POST["name"] == "") && ($error==false))
- {
- $eintragen = "INSERT INTO cms_guestbook (id, time, name, email, homepage, wohnort, icq, text, ip)
- VALUES ('0', '$tstamp', '$name', '$email ', '$homepage', '$wohnort', '$icq', '$kommentar', '$REMOTE')";
- $result = mysql_query($eintragen);
- print_r ($eintragen);
- if ($result)
- //print_r ($eintragen);
- {
- $guestbookmsg= '<p style="color: green">Anlegen erfolgreich</left><p></p><b><meta http-equiv="refresh" content="11; URL=index.php?site=guestbook"></p>';
- }
- }
- else
- {
- $guestbookmsg= '<br><p style="color: red" class=\"bodytext\"><b>Fehler:<br /></b> Name und Kommentar und der Sicherheitscode müssen mindestens angegeben werden!<p class=\"bodytextsmall\"></left><p></p><b><meta http-equiv="refresh" content="3; URL=index.php?site=guestbook&post=add"></p>';
- }
- }
Ich bin da echt ratlos
Gruss
Dragon
Riek-Media.com - Webhosting riek-media.com