// session + include
session_start();
include ("varas.php");
$yo="Weiter";
$nope="Nein";
//mysql varas
$MYSQLserver="SERVA";
$MYSQLlogin="l0gin";
$MYSQLpass="pAsS";
// mysql befehle
$sql_befehlc="SELECT `name`,`url`,`kate`,`desc` FROM `link` WHERE `id`='$bearbeiten'";
$sql_befehld="UPDATE link SET name='$name_i', url='$url_i', kate='$kate_i', `desc='$desc_i' WHERE id='$id_i'";
$db=mysql_connect ($MYSQLserver,$MYSQLlogin,$MYSQLpass);
$take=mysql_db_query(shydevil_de,$sql_befehlc,$db);
// here we go !
switch ($Buttona)
{
case $nope:
header('Location: admintwo.php');
break;
case $yo:
mysql_db_query(shydevil_de,$sql_befehld,$db);
mysql_close ($db);
header('Location: linkout.php');
break;
default:
print "<html><head><title>shydevil.de></title></head><body bgcolor='#cccccc' style=\"background-image:url(round.gif);background-color:#666666;background-repeat:no-repeat;background-attachment:fixed;\"><form name=\"forma\" method=\"post\" action=\"$PHP_SELF\">";
while ($satz=mysql_fetch_row($take)) {
print "<input type=\"hidden\" name=\"id_i\" value=\"".$bearbeiten."\">";
print "Name:<br><input type=\"Text\" name=\"name_i\" size=\"30\" value=\"".$satz[0]."\"><br>";
print "Kategorie:<br><input type=\"Text\" name=\"kate_i\" size=\"30\" value=\"".$satz[2]."\"><br>";
print "<br>Beschreibung:<br><textarea wrap='virtual' name='desc_i' cols='50' rows='15'>".$satz[3]."</textarea>";
print "<br>URL:<br><input type=\"Text\" name=\"url_i\" size=\"30\" value=\"".$satz[1]."\"><br>";
print "<b>Weitermachen ? </b>";
print "<br><input type=\"submit\" name='Buttona' value=\"Nein\">";
print "<input type=\"submit\" name='Buttona' value=\"Weiter\">";
}
}
?>