| | | | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| Es geht mir in erster Linie darum wie ich zu meinem Ziel kommen kann. Und daher möchte ich wissen ob es mit setcookie oder einer Session ect. irgendwie möglich ist. Beim Cookie setzen ist mir jedenfalls etwas aufgefallen Code: Inhalt von Cookie.php:
<?
setcookie("name", "Hello World!");
echo $name;
?>
weiter
Inhalt von cookie2.php:
<? echo $name; ?>
http://www.euroschocker.de/index.php?site=Cookie http://www.euroschocker.de/Cookie.php |
| | |
| Gast
Beiträge: n/a
| Sers @ all Ich komme zur Zeit net weiter. Liegt wohl am Wetter *FG*. Wenn ich nun die Menge ändern möchte hab ich komischerweise nur bei dem letztem Artikel die Möglichkeit diese zu ändern. Und anstatt dann den Preis zu ändern wird dann nur der Gesamtwert * 2 genohmen. Unten ist der Code, aber hier einmal zum testen der Link: http://www.euroschocker.de/index.php?site=Warenkorb Code: <form action="" method="post">
<table width=90% align=center>
<td background="JPG/EW.jpg">
<table border=0 cellspacing=2 cellpadding=4 width=100% align=center>
<tr>
<td class="topic" width=10%> Menge</td>
<td class="topic" width=20%> Artikel-Nr.</td>
<td class="topic" width=40%> Artikel-Bezeichnung</td>
<td class="topic" width=20%> Preis €</td>
</tr>
<?
if (!isset($Menge)){
$Menge = 1;
}
include ("db.php");
$query = "SELECT * FROM Shop Order by idArtikel LIMIT 6";
$result = mysql_query($query);
while ($line = mysql_fetch_array($result)) {
$Einzelpreis = $Menge * $line[Preis];
$Gesamt = $Gesamt + $Einzelpreis;
?>
<tr>
<td width="10%" valign="top"><input type="text" name="Menge" size="2" maxlength="2" value="<? echo $Menge ?>"></td>
<td width="20%" valign="top"><?=($line[idArtikel])?></td>
<td width="40%" valign="top"><?=($line[Info])?></td>
<td width="20%" valign="top"><?=($line[Preis])?></td>
</tr>
<?PHP
}
mysql_free_result($result);
mysql_close();
?>
<tr>
<td width="70%" valign="top" align="right" colspan="3">MwSt:</td>
<td width="20%" valign="top">16%</td>
</tr>
<tr>
<td width="70%" valign="top" align="right" colspan="3">Gesamt:</td>
<td width="20%" valign="top"><? $Gesamt=$Gesamt+($Gesamt*0.16); echo $Gesamt;?></td>
</tr>
<tr>
<td width="10%" valign="top"></td>
<td width="20%" valign="top"></td>
<td width="40%" valign="top"></td>
<td width="20%" valign="top"></td>
</tr>
<tr>
<td width="10%" valign="top"></td>
<td width="20%" valign="top"></td>
<td width="40%" valign="top"></td>
<td width="20%" valign="top"></td>
</tr>
</table>
</td>
</table>
<center><input type="submit" value="Neu Berechnen"><input type="reset" value="Cancle"></center>
</form>
</p>
Bestellung absenden |
| | |
| Gast
Beiträge: n/a
| <input type="text" name="Menge" ..............> Du gibst jedem Feld den gleichen Namen, das kann ja auch nicht gehen. 16.14. Warum soll ich nicht SELECT * schreiben? http://www.dclp-faq.de/q/q-sql-select.html Gruß phpfan |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Warenkorb unregistrierter User | Exon | PHP Tipps 2007 | 3 | 25.05.2007 19:15 |
| Problem mit Warenkorb (Session/Array) | Charly Shop Sui | PHP Tipps 2006 | 5 | 30.08.2006 15:14 |
| Query was empty bei Warenkorb | Shalina | PHP Tipps 2006 | 12 | 10.06.2006 00:45 |
| [Erledigt] Warenkorb Alternative | PHP-Fortgeschrittene | 28 | 18.04.2006 14:19 | |
| warenkorb Artikelanzahl verringern | Mach!N3 | PHP Tipps 2006 | 59 | 30.03.2006 08:09 |
| warenkorb & mysql | Mach!N3 | PHP Tipps 2006 | 16 | 27.03.2006 21:18 |
| neuen Warenkorb erstellen | PHP Tipps 2005 | 2 | 15.05.2005 14:10 | |
| warenkorb oder shop system | PHP Tipps 2005 | 4 | 15.01.2005 19:51 | |
| Warenkorb in PHP realisieren | PHP-Fortgeschrittene | 8 | 11.12.2004 11:31 | |
| [Erledigt] Hilfe - Problem mit Warenkorb | PHP Tipps 2004 | 1 | 26.11.2004 11:32 | |
| einfacher warenkorb | Beitragsarchiv | 3 | 23.11.2004 16:24 | |
| anleitung für warenkorb | bratwurstschorsch | PHP Tipps 2004 | 1 | 25.10.2004 21:59 |
| WARENKORB - Artikelmenge aktualisieren | PHP Tipps 2004 | 6 | 18.10.2004 13:14 | |
| Artikelsuche - Warenkorb | PHP Tipps 2004 | 9 | 12.10.2004 12:48 | |
| Problem mit Warenkorb | PHP Tipps 2004 | 6 | 25.06.2004 00:54 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| warenkorb programmieren, php cookie warenkorb programmieren, euroschocker, php mini shop |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.