| | | | |
| |||||||
| PHP-Fortgeschrittene Arbeiten mit PHP ohne Einschränkungen |
|
| | LinkBack | Themen-Optionen | Thema bewerten |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| Der Code vom Formular: Code:
<form action="./adminnews.php?sessid=<?php echo $_SESSION["sessid"]; ?>" method="post" enctype="multipart/form-data" name="inhalt">
<tr>
<td> Titel
</td>
<td colspan="3"><input name="titel" type="text" value="<?php echo $edit->titel; ?>" maxlength="80" style="width:250px" >
</td>
</tr>
<tr>
<td valign="top" width="265px"> Text
<button type="button" value="Zeilenumbruch" onclick="insert_br('formular');" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;">Zeilenumbruch</button>
<button type="button" value="Fett" size="25" onclick="bbcode('b', 'formular');" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;"><big>Fett</big></button>
<button type="button" value="Kursiv" size="25" onclick="bbcode('i', 'formular');" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;">Kursiv</button>
<button type="button" value="Unterstrichen" size="25" onclick="bbcode('u', 'formular');" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;"><u>Unterstrichen</u></button>
<button type="button" value="Aufzählung" size="25" onclick="bbcode('li', 'formular');" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;">1,2,3,... Aufzählung</button>
<button type="button" value="Link" size="25" onclick="insert_link('formular');" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;">Link (URL)</button>
</td>
<td colspan="3" valign="top">
<textarea name="text" cols="" rows="10" maxlength="10000" style="width:250px" ><?php echo $edit->text; ?></textarea>
</td>
</tr>
<tr>
<td> Bild1
<?php
//Bilder bearbeiten
if(!empty($edit->img_inhalt))
{
echo '<u>aktuelle Datei</u>';
}
echo '
[max. 50 kb] [160 Pixel breit]</td><td colspan="3">';
echo '<input type="file" name="img_inhalt" size="20">';
if(!empty($edit->img_inhalt))
{
echo '<input name="del_img1" type="checkbox" value="true"></input> Bild löschen';
}
echo '</td></tr><tr><td>';
echo '<input type="hidden" name="haupt" value="'.$haupt.'">';
echo '<input type="hidden" name="unter" value="'.$unter.'">';
echo '<input type="hidden" name="id" value="';
if(!empty($edit->id))
{
echo $edit->id;
}
else
{
$id = "";
echo $id;
}
echo '"></td>';
echo '<td colspan="3"><button type="submit" value="senden" name="aendern" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;">senden</button>';
echo '<button name="reset" type="reset" style="width:140px; background-color:#FBB204; color:#FFFFFF; font-size:14px;">leeren</button>';
?>
</td>
</tr>
</form>
Code: if (isset ($aendern))
{
if($id != "")
{
//Bilder Upload
if ($img_inhalt != "")
{
if (filesize($img_inhalt) < 51200)
{
$imgart = strrchr($img_inhalt, ".");
$imgname = "inhalt_".$id.$imgart;
$ziel = "../inhalt_bilder/".$imgname;
if (!copy($img_inhalt, $ziel))
{
echo " Bild konnte nicht geladen werden.";
}
}
else
{
$imgname = "";
}
}
$sqlupdate = "UPDATE $tabelle SET titel = '$titel', text = '$text'";
if ($imgname != "")
{
$sqlupdate = $sqlupdate.", img_inhalt = '$imgname'";
}
$sqlupdate = $sqlupdate."WHERE id = '$id'";
$sqlaendern = send_sql($sqlupdate);
}
else
{
$sqlinsert = send_sql("INSERT INTO $tabelle ($navi_id, titel, text) VALUES ('$unter', '$titel', '$text')");
$sqlid = send_sql("SELECT * FROM $tabelle WHERE navi_id = '$unter'");
$id = mysql_fetch_object($sqlid, MYSQL_ASSOC);
if ($img_news != "")
{
if (filesize($img_news) < 51200)
{
$imgart = strrchr($img_news, ".");
$imgname = "news_".$id.$imgart;
$ziel = "../news_bilder/".$imgname;
if (!copy($img_news, $ziel))
{
echo " Bild konnte nicht geladen werden.";
}
}
else
{
$imgname = "";
}
$sqlimgupdate = send_sql("UPDATE $tabelle SET img_inhalt = '$imgname' WHERE navi_id = '$unter'");
}
}
}
Wir haben zu 2. schon verglichen aber nichts gefunden. Beim anderen Script sind ein paar Formularfelder weniger und für die grafik nur der variablenname anders, dort funktioniert es baer einwandfrei. P.S.: Ich habe die übergabe schon mit $_FILES[][] und mit $HTTP_POST_FILES[] versucht, geht beides ebenfals nicht. |
|
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [Erledigt] Firefox / IE - Probleme | HTML, Usability und Barrierefreiheit | 5 | 20.07.2009 17:04 | |
| Probleme bei Speicherung von serialize() Strings | Manni2k | PHP Tipps 2006 | 13 | 15.10.2006 15:06 |
| Probleme mit mbstring extension unter Debian | HStev | Server, Hosting und Workstations | 3 | 30.08.2006 20:55 |
| Probleme mit SSL und Dateiupload | Zauderer | PHP-Fortgeschrittene | 8 | 23.07.2006 00:54 |
| Probleme bei der Installation von Turck MMCache | tomx992 | PHP-Fortgeschrittene | 2 | 27.09.2005 20:31 |
| Probleme beim Datenupload zu meiner Datenbank | Datenbanken | 3 | 05.09.2005 19:47 | |
| Dateiupload Beispielcode funktioniert nicht | Anotherone | PHP Tipps 2005-2 | 3 | 27.08.2005 10:00 |
| Probleme bei Dateiupload | Fraylman | PHP Tipps 2005-2 | 3 | 09.08.2005 13:47 |
| [Erledigt] hilfe! probleme mit... | PHP Tipps 2005 | 4 | 12.04.2005 22:55 | |
| [Erledigt] CSV Größe macht Probleme mit php | PHP Tipps 2005 | 5 | 15.03.2005 21:29 | |
| Zwei Rechner ins Netz - Router - Hub - Probleme... | imported_Ben | Off-Topic Diskussionen | 37 | 13.01.2005 21:36 |
| [Erledigt] Probleme mit Dateiupload | PHP-Fortgeschrittene | 10 | 05.12.2004 14:13 | |
| [Erledigt] Technische Probleme mit Sessions | PHP-Fortgeschrittene | 4 | 18.11.2004 14:45 | |
| [Erledigt] Probleme mit Fremdsprachen | HTML, Usability und Barrierefreiheit | 2 | 21.09.2004 17:11 | |
| PHP Bilder in DB / Probleme bei Änderung | PHP-Fortgeschrittene | 1 | 05.06.2004 11:20 | |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.