Mysmilies.net die Smilies Datenbank

Script oder Datei finden :

 
-Startseite
-Newsarchiv
-Newsletter
-Mein Dreamcodes
-Scripte
-eBooks
-Online Speicher
-Datenbanken
-Webseiten
-Trickfilm
-Web Grafiken
-Bildbearbeiter
-Browser
-EMail Software
-Ftp Clienten
-Betriebssysteme
-Texteditoren
-Wampserver
-Office Pakete
-Antivirus
-System Cleaner
-Recovery Tools
-Php Schnipsel
-Ajax Schnipsel
-VB Schnipsel
-Tutorials
-Workshops
-Webkatalog
-Leserforum
-Erweiterte Suche
-Sitemap
-Impressum
-neuste Downloads

1. Selfphp (1733)
2. Xampp OS X (1628)
3. Xampp Linux (1621)
4. Xampp Windows (1634)

-neuste Tutorials

1. Samsung S20 rooten (1383)
2. Gratis USA Nummer (14803)
3. RAID (13832)
4. Text auf Grafik (14502)


Forum

Moderator: Q
Kategorie: Scripte von A bis Z
Schreibrechte ab: registrierter Benutzer
Beschreibung: Ideen, Vorschläge und Probleme rund um ein Script werdet Ihr hier los

Autor: Skoddi
Thema: Variabele wird nicht übergeben
Themen Nummer: 1377

 

Forum Scripte von A bis Z Variabele wird nicht übergeben
 

Forum Thema:

Variabele wird nicht übergeben

Username:
Skoddi
geschrieben am 03.02.2004
um 03:11 Uhr

hi ,

ich habe ein kleines problem mit der übergabe einer variabelen aus einem hiddenfield.

Hier ersteinmal der code:

datei bestellung.php

<?php require_once('../Connections/werft.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE bestellung SET status=%s, best_id=%s WHERE id=%s",
GetSQLValueString($_POST['status'], "text"),
GetSQLValueString($_POST['bestellcode'], "text"),
GetSQLValueString($_POST['user'], "text"));

mysql_select_db($database_werft, $werft);
$Result1 = mysql_query($updateSQL, $werft) or die(mysql_error());

$updateGoTo = "sendmail.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}

mysql_select_db($database_werft, $werft);
$query_Recordset1 = "SELECT * FROM bestellung ORDER BY id ASC";
$Recordset1 = mysql_query($query_Recordset1, $werft) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Unbenanntes Dokument</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-image: url();
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.Stil1 {color: #CCCCCC}
body,td,th {
color: #CCCCCC;
}
.Stil3 {font-size: small}
.Stil4 {color: #CCCCCC; font-size: small; }
-->
</style>
<link href="hallo.css" rel="stylesheet" type="text/css">
<link href="../hallo.css" rel="stylesheet" type="text/css">
</head>

<body>
<div align="left">
<table width="80%" border="0" align="center" class="Stil4">
<tr>
<td width="90%" height="221" valign="top"><table width="95%" border="1" align="center" bordercolor="#666666" class="Stil4">
<tr>
<td height="19"><p align="center" class="Stil4">..:: <a href="bestellung.php">Bestellungen</a> :: <a href="schiffe.php">Schiffe</a> :: <a href="news.php">news</a> :: <a href="agb.php">agb</a> :: <a href="info.php">info</a> ::..</p> </td>
</tr>
</table>
<?php do { ?>
<form name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="95%" border="0" align="center" bordercolor="#666666">
<tr>
<td height="19"><div align="right">Zeit : </div></td>
<td><?php echo $row_Recordset1['b_zeit']; ?></td>
</tr>
<tr>
<td height="19"><div align="right">Auftraggeber : </div></td>
<td> [ <?php echo $row_Recordset1['alli']; ?>]<?php echo $row_Recordset1['ig_nick']; ?>(<?php echo $row_Recordset1['ek_gala']; ?>x<?php echo $row_Recordset1['ek_sys']; ?>x<?php echo $row_Recordset1['ek_plan']; ?>)</td>
</tr>
<tr>
<td height="19"><div align="right">Bestellung : </div></td>
<td><?php echo $row_Recordset1['bestellung']; ?></td>
</tr>
<tr>
<td height="19"><div align="right">Liefern an : </div></td>
<td><?php echo $row_Recordset1['lk_gala']; ?>x<?php echo $row_Recordset1['lk_sys']; ?>x<?php echo $row_Recordset1['lk_plan']; ?></td>
</tr>
<tr>
<td height="19"><div align="right">Lieferzeit : </div></td>
<td><?php echo $row_Recordset1['l_zeit']; ?></td>
</tr>
<tr>
<td height="19"><div align="right">Status : </div></td>
<td><?php
if($row_Recordset1['status'] == 0)
{
echo "Neu";
}
elseif($row_Recordset1['status'] == 1)
{
echo "Bearbeitung";
}
elseif($row_Recordset1['status'] == 2)
{
echo "Produktion";
}
elseif($row_Recordset1['status'] == 3)
{
echo "Auslieferung";
}?>
<? $row_Recordset1['status'] = $row_Recordset1['status'] + 1; ?>
<input name="status" type="hidden" id="status" value="<?php echo $row_Recordset1['status']; ?>"></td>
</tr>
<tr>
<td height="19" colspan="2"><div align="center">
<input name="bestellcode" type="hidden" id="bestellcode" value="<?php echo $row_Recordset1['best_id']; ?>">
<input name="user" type="hidden" id="user" value="<?php echo $row_Recordset1['id']; ?>">

<input type="submit" name="Submit" value="Update">
</div></td>
</tr>
<tr>
<td height="19" colspan="2"><hr></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
</form>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> <br></td>
</tr>
</table>
<p class="Stil1">&nbsp;</p>
</div>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

hie soll $row_Recordset1['status'] um eins erhöht werden und in die DB eingetragen werden
da funktionirt auch soweit

was nur beim update nicht geschiet , ist, das der wert vom hiddenfild user mit in die datei sendmail.php übergeben wird.

datei sendmail.php

<?php require_once('../Connections/werft.php'); ?>
<?php
$colname_Recordset1 = "1";
if (isset($_POST['user'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_POST['user'] : addslashes($_POST['user']);
}
mysql_select_db($database_werft, $werft);
$query_Recordset1 = sprintf("SELECT * FROM bestellung WHERE id = %s ORDER BY id ASC", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $werft) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Unbenanntes Dokument</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-image: url();
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.Stil1 {color: #CCCCCC}
body,td,th {
color: #CCCCCC;
}
.Stil3 {font-size: small}
.Stil4 {color: #CCCCCC; font-size: small; }
-->
</style>
<link href="hallo.css" rel="stylesheet" type="text/css">
<link href="../hallo.css" rel="stylesheet" type="text/css">
</head>

<body>
<div align="left">
<table width="80%" border="0" align="center" class="Stil4">
<tr>
<td width="90%" height="221" valign="top"><table width="95%" border="1" align="center" bordercolor="#666666" class="Stil4">
<tr>
<td height="19"><p align="center" class="Stil4">..:: <a href="bestellung.php">Bestellungen</a> :: <a href="schiffe.php">Schiffe</a> :: <a href="news.php">news</a> :: <a href="agb.php">agb</a> :: <a href="info.php">info</a> ::..</p> </td>
</tr>
</table>
<br>
<table width="95%" border="1" align="center" bordercolor="#666666">
<tr>
<td><div align="left">
<blockquote>
<p align="center">Bestellung mit ID &nbsp;<?php echo $row_Recordset1['id']; ?>
ge&auml;ndert <br>
Status ist jetzt <?php
if($row_Recordset1['status'] == 0)
{
echo "Neu";
}
elseif($row_Recordset1['status'] == 1)
{
echo "Bearbeitung";
}
elseif($row_Recordset1['status'] == 2)
{
echo "Produktion";
}
elseif($row_Recordset1['status'] == 3)
{
echo "Auslieferung";
}?>
. <?
$texta = "Hallo , Deine Bestellung ist jetzt in Bearbeitung.";
$textb = "Hallo , Deine Bestellten Schiffe sind gerade in Produktion gegangen.";
$textc = "Hallo , Deine Bestellten Schiffe befinden sich im Anflug auf deinen Planeten.";
$betreff = "Deine Bestellung";

if($row_Recordset1['status'] == "1")
{
mail($row_Recordset1['e_mail'], $betreff, $texta, "From: Lord Lucky <lord-lucky@vortex-xw.de>");
}
elseif($row_Recordset1['status'] == "2")
{
mail($row_Recordset1['e_mail'], $betreff, $textb, "From: Lord Lucky <lord-lucky@vortex-xw.de>");
}
elseif($row_Recordset1['status'] == "3")
{
mail($row_Recordset1['e_mail'], $betreff, $textc, "From: Lord Lucky <lord-lucky@vortex-xw.de>");
}
?>
</p>
<p align="center">&nbsp;</p>
</blockquote>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<p class="Stil1">&nbsp;</p>
</div>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>


wäre super wenn einer dafür eine lösung wüsste

mfg Skoddi

[Antworten]

 
 

Forum Thema:

> Variabele

Username:
Q
geschrieben am 13.02.2004
um 21:18 Uhr

Schick uns mal das Prob per Mail für diesen Fall

[Antworten]

 
 
-Live Statistik
Datum: 28.04.2024
Uhrzeit: 02:29 Uhr
Online: 6 User
User heute: 919
User allgem.: 33751941

Eingeloggt als Gast
-Download des Monats
-
-unsere Monats Umfrage
Welche Serie ist besser?

The Blacklist
House of the Dragon
Die Ringe der Macht
The Sandman
Manifest

-unsere Bestseller