Speedstick
Mitglied

Dabei seit: 03.03.08
Beiträge: 72
Fähigkeiten: WBB Lite 1 Anfänger Forenversion: Lite 1.0
 |
|
Hallo ich habe mein WbbLite um eine weitere PHP Datei erweitert so das User in ihrem UserCP eine Zusatz haben. Ich habe das ganze nicht in der UserCP eingebaut sondern eine extra Datei erstellt. Nun habe ich jetzt das Problem, das wenn ich den Eintrag editieren möchte die Felder leer sind und ich wirklich keine Ahnung habe wieso.
Problembeschreibung:
Felder bleiben beim Editieren leer, warum weiß ich nicht. Ich habe mir diese editfunktion angeschaut wie es in der UserCP gemacht worden ist.
Fehlermeldung:
/
Link zum Forum und Screenshot (KEINE Bilderhoster, per Dateianhang):
/
Was wurde zuletzt geändert oder eingebaut?
/
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
|
if($action=="edit") {
if(isset($_POST['send'])) {
if(isset($_POST['thread'])) $thread = trim($_POST['thread']);
if(isset($_POST['ort'])) $ort = trim($_POST['ort']);
if(isset($_POST['status'])) $status = trim($_POST['status']);
if(isset($_POST['icon'])) $icon = trim($_POST['icon']);
$db->query("UPDATE bb".$n."_userfacts
SET thread='".addslashes(htmlspecialchars($thread))."',
ort='".addslashes(htmlspecialchars($ort))."',
status='".intval($status)."',
icon='".addslashes(htmlspecialchars($icon))."'
WHERE userid = '$wbbuserdata[userid]'");
}
else {
$thread = $wbbuserdata['thread'];
$ort = $wbbuserdata['ort'];
$status = $wbbuserdata['status'];
$icon = $wbbuserdata['icon'];
if(isset($status)) $status[$status]=" selected";
}
eval("\$tpl->output(\"".$tpl->get("userfacts_edit")."\");");
exit();
} |
|
So sieht meine Teil aus der Editieren soll und so die Felder im Template dazu
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
|
<tr id="tablea" bgcolor="{tablecolora}">
<td width="70%"><normalfont><b>Thread</b></td>
<td><normalfont><input type="text" class="input" name="thread" value="$thread" maxlength="11"></font></td>
</tr>
<tr id="tableb" bgcolor="{tablecolorb}">
<td width="70%"><normalfont><b>Ort</b></td>
<td><normalfont><input type="text" class="input" name="ort" value="$ort" maxlength="150"></font></td>
</tr>
<tr bgcolor="{tabletitlecolor}" id="tabletitle">
<td colspan=2><smallfont color="{fontcolorsecond}"><b>» Weitere Information</b> (Diese Felder sind optional.)</font></td>
</tr>
<tr id="tablea" bgcolor="{tablecolora}">
<td><normalfont><b>Status</b></td>
<td><select name="status" class="one">
<option value="1"$status_1>Vergeben</option>
<option value="2"$status_2>Solo</option>
</select></td>
</tr>
<tr id="tableb" bgcolor="{tablecolorb}">
<td width="70%"><normalfont><b>Icon</b></td>
<td><normalfont><input type="text" class="input" name="icon" value="$icon" maxlength="500"></font></td>
</tr> |
|
Hab ich vielleicht etwas vergessen in dem PHP Teil?
LG
__________________
liebe Grüße
|
|
25.12.11 16:06 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Speedstick
Mitglied

Dabei seit: 03.03.08
Beiträge: 72
Fähigkeiten: WBB Lite 1 Anfänger Forenversion: Lite 1.0
Themenstarter
 |
|
Ach so also muss die so heißen, wie die Tabelle?
__________________
liebe Grüße
|
|
25.12.11 16:26 |
E-Mail
Finden
Als Freund hinzufügen
|
|
|