| | | | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| Danke hat super gefunzt... für alle die interessiert an einem datei und link upload script sind hier die quelltexte config.php Code: <? $server = "localhost"; $user = "dbuser"; $pass = "dbpassword"; $datenbank = "dbname"; ?> Code: <html>
<head>
<title>Linkbase</title>
</head>
<body>
<form action="link.php" method="post">
<table align="center">
<tr>
<td>Kurze Erklärung Zum Link:</td><td><textarea type="text" name="namee" cols="15" rows="3"></textarea></td>
</tr>
<tr>
<td>Ziel URL:</td><td><input type="text" name="urle" value="http://"></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" name="submit"></td>
</tr>
</table>
</form>
<form method="POST" action="link.php" enctype="multipart/form-Daten">
<table align="center" border="1">
<tr>
<td>Laden Sie diese Datei herauf:</td>
<td><input name="benutzerdatei" type="FILE" size="24"></td>
<td><input type="SUBMIT" value="Datei senden" name="loadit"></td>
</tr>
<tr>
<td>Kurze Erklärung Zum Link:</td><td><textarea type="text" name="namee" cols="15" rows="3"></textarea></td>
</tr>
</table>
</form>
</body>
</html>
<?
$uploaddir = "/home/m4c4br3/public_html/pearce/klasse1/"; //muss abgeändert werden
$linkpath = "http://linux-server/~m4c4br3/pearce/klasse1/"; //muss abgeändert werden
if($submit){
include("config.php");
$db = mysql_connect($server,$user,$pass);
$res = mysql_db_query("$datenbank","insert links (name, url) values ('$namee', '$urle')");
}
else
{
if($loadit){
include("config.php");
$ergebnis = move_uploaded_file($HTTP_POST_FILES["benutzerdatei"]["tmp_name"], $uploaddir . $_FILES["benutzerdatei"]["name"]);
$db = mysql_connect($server,$user,$pass);
$res = mysql_db_query("$datenbank","insert links (name, url) values (\"$namee\", \"$linkpath" .$_FILES["benutzerdatei"]["name"]."\");");
}
}
?>
<?php
include("config.php");
$db = mysql_connect($server,$user,$pass);
?>
<div align="center">
<form action="link.php" method="post">
ZU BEACHTEN: bitte immer nur EINEN link auswählen und löschen</p>
<table cellspacing="0" cellpadding="0" border bordercolor="#000000" width="500">
<tr>
<th width="100">Auswahl</th>
<th width="200">Erklärung</th>
<th width="200">URL</th>
</tr>
<?
include("config.php");
$resb=mysql_db_query("$datenbank","select * from links");
$num = mysql_num_rows($resb);
for ($i=0; $i<$num; $i++)
{
$name = mysql_result($resb, $i, "name");
$url = mysql_result($resb, $i, "url");
?>
<tr>
<td><input type="Checkbox" name="as" value="<? echo"$url"; ?>"></td>
<td><? echo"$name"; ?></td>
<td><? echo"$url"; ?></td>
</tr>
<?
}
?>
<tr>
<td align="center" colspan="3">
<input type="submit" value="Loeschen" name="loeschen">
</td>
</tr>
</table>
</form>
<?
if($loeschen){
include("config.php");
mysql_connect($server,$user,$pass);
mysql_db_query("$datenbank", "delete from links where url='$as' ");
}
?>
</div>
Code: <html>
<head>
<title>Unbenannt</title>
<style type="text/css">
table { border-color:#000000 ; }
body { background:#ffffff ;
color:#000000 ; }
a { color:#000000 ; }
a:active { color:#000000 ; }
a:link { color:#000000 ; }
a:visited { color:#000000 ; }
</style>
</head>
<body alink="#839BB4" vlink="#839BB4">
<table width="80%" align="center" border="1" cellpadding="0" cellspacing="0">
<tr>
<th>Kurze Erklärung Zum Link</th><th width="20%">Link</th>
</tr>
<?
include("config.php");
$db = mysql_connect($server,$user,$pass);
$resa=mysql_db_query("$datenbank","select * from links");
$num = mysql_num_rows($resa);
for ($i=0; $i<$num; $i++)
{
$name = mysql_result($resa, $i, "name");
$url = mysql_result($resa, $i, "url");
?>
<tr>
<th><? echo"$name"; ?></th><th>">Visit</th>
</tr>
<?
}
?>
</table>
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| MySQL Fehler nach Änderung einer PHP Datei | mark007q | Datenbanken | 2 | 09.05.2006 23:56 |
| Datei Upload Frage | imagica | PHP Tipps 2006 | 3 | 17.01.2006 09:10 |
| probleme mit rechten => datei upload | ph!l | PHP Tipps 2005-2 | 5 | 29.09.2005 10:12 |
| Datei nach Upload umbennen | PHP Tipps 2005-2 | 6 | 03.08.2005 16:05 | |
| Fehler bei var übergabe in include datei | JEGO | PHP Tipps 2005-2 | 9 | 16.06.2005 15:28 |
| Datei Upload in DB nur bis 1 MB möglich | PHP Tipps 2005-2 | 18 | 07.06.2005 16:03 | |
| Geld zu verdienen - Formular für Datei upload | Beitragsarchiv | 5 | 21.01.2005 08:06 | |
| Datei beim Upload verschieben? | PHP Tipps 2004-2 | 8 | 15.12.2004 21:16 | |
| fehler bei der index datei ! wichtig ! | PHP Tipps 2004-2 | 1 | 30.11.2004 09:11 | |
| array_push nur in begrenzter Anzahl ausführen ? | PHP Tipps 2004 | 2 | 07.09.2004 09:05 | |
| [Erledigt] Problem mit Datei Upload | Server, Hosting und Workstations | 6 | 06.09.2004 04:58 | |
| Fehler bei Standard-Script Datei hochladen... | PHP Tipps 2004 | 1 | 02.09.2004 11:53 | |
| datei upload => datei anzeigen | PHP Tipps 2004 | 16 | 05.08.2004 02:02 | |
| fehler in einer php datei!!! | PHP Tipps 2004 | 1 | 14.07.2004 07:43 | |
| datei upload + Fehler #2 | PHP Tipps 2004 | 1 | 03.06.2004 12:49 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| linkuploadscript |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.