Einzelnen Beitrag anzeigen
  #1  
Alt 14.02.2005, 13:14:55
Antispy Antispy ist offline
Anfänger
 
Registriert seit: Feb 2005
Beiträge: 6
Profilfeld in Db eintragen

PHP-Code:
<?php
include "shared/class/class.config.php";
$conf_pass= new Config("shared/config/pass_conf.php");
include 
$conf_pass->pfad_ums_class;
$fa_ums= new fa_ums(0);
include 
"upconfig.php";

if(isset(
$del)) {
    foreach(
$onlytyp as $ausgabe) {
        if (
file_exists("$avatarname$ausgabe")) {
            
$existiert=1;
            
$existiertname="$avatarname$ausgabe";
        }
    }
    if (
$existiert) {
       if (@
unlink("$existiertname")) {
           
header("location: $PHP_SELF");
       }
    }

}



?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


<div align="center"><b><?=$ums_ERROR?></b></div>

<form action="profil.php?<?=SID?>" method="post">
<input type="hidden" name="profil" value="yes">
<input type="hidden" name="user_id" value="<?=$umsSystem->user_id?>">
<!--- ----------------------------------------------->

<div align="center"><b>
<? //Fehlermeldungen
while(list($key,$val)=@each($save_error)){
    echo "$val $key<br>";
}
?></b></div>

<table align="center" bgcolor="Black" width="300">
<tr>
        <td bgcolor="Silver"><b>Profil von <?=$u->nic?> </b></td>
</tr>
</table>


<table align="center" align="center" bgcolor="#e4e4e4" width="300">
<tr><td colspan="2"><b>Infos:</b></td></tr>
<tr><td>E-Mail:</td><td><a href=mailto:<?=$u->reg_mail?>><?=$u->reg_mail?></a></td></tr>
<tr><td>Logins:</td><td><?=$u->logins?></td></tr>
<tr><td>Letzte Anmeldung:</td><td><?=$u->last_login?></td></tr>
<tr><td>Hobbys: </td><td><?=$u->reg_hobby?></td></tr>
<tr><td>Guthaben: </td><td><?=$u->points?> €</td></tr>
<tr><td>Status: </td><td><?=$u->reg_status?></td></tr>

<tr><td colspan="2"><b>Login-Daten ändern:</b><input type="hidden" name="ums_check" value="pass=pass2"></td></tr>
<tr>
        <td>neues Passwort:</td>
        <td><input type="password" name="pass"></td>
</tr>
<tr>
        <td>Wiederholung:</td>
        <td><input type="password" name="pass2"></td>
</tr>
<tr>
        <td>Hobbys:</td>
        <td><input type="text" name="reg_hobby"></td>
</tr>
<tr>
        <td>E-Mail:</td>
        <td><input type="text" name="email" value="<?=$u->reg_mail?>"></td>
</tr>
<tr>
        <td>Avatar:</td>

        <td><?=$avatar_privat?></td>
</tr>
<tr>
        <td></td>
        <td><input type="Reset"><input type="submit" name="save" value="Speichern"></td>
</tr>
</table>
</form>

Das soll auf einer Page von mir ein Formular zum Ausfüllen seines eigenes Profiles sein. Jetzt habe ich in der tabelle ein neues Feld angelegt, was folgende Angaben hat:

feld: reg_hobby
typ: varchar(30)
Null: nein
der Rest ist nicht eingetragen.
Dann hab ich das noch in den Primärschlüssel übernommen und als "Fulltext" gesetzt.
Allerdings bleibt, wenn man das ausfüllt immer nur ein leeres Feld. Der speichert das nicht automatisch in der Db :(
Ich hoffe, dass ihr mir da helfen könnt, denn ich bin im Umgang mit mysql noch ein richtiger noob!
Mfg Antispy und viele Dank im voraus!
Mit Zitat antworten