Gegen Bilderklau - Das Original (https://www.gegen-bilderklau.net/index.php)
- Design, Website, Copyright (https://www.gegen-bilderklau.net/board.php?boardid=80)
--- Homepagehilfe (https://www.gegen-bilderklau.net/board.php?boardid=27)
---- Homepagehilfe - Archiv (https://www.gegen-bilderklau.net/board.php?boardid=139)
----- [PHP & MySQL] Automatischer Shop - ein wenig durcheinander..? (https://www.gegen-bilderklau.net/thread.php?threadid=149605)


Geschrieben von ShivaChewy am 01.02.2009 um 14:55:

  Automatischer Shop - ein wenig durcheinander..?

Hallo, ich benutze den autmoatischen Shop vom VRH Adventskalender, doch neuerdings ist der etwas durcheinander. Nehmen wir z.B. die Seite der Halsbänder.
Möchte ich das Kettenhalsband Chain bestellen, so zeigt er mir im Profil an, ich hätte das Nylonhalsband Julius K-9 gekauft...
Meist ist man da zu blind, den Fehler selbst zu finden Augen rollen
Hier mal der Code:

php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
<? 
session_start();
$uname = $_SESSION["user_name"];
$job = $_SESSION["user_job"];
include "checkuser.php";
?>
<head><link rel=stylesheet type="text/css" href="style.css">
</head>

<body>

<div align="center">
    <div align="left">
        <div align="left">
            <table border="0" width="95%" id="table4" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px" bordercolor="#000000" cellspacing="0" cellpadding="0">
                <tr>
                    <td><b><font face="Verdana" size="2">P E T S H O P</font></b></td>
                </tr>
            </table>
        </div>
    <table border="0" width="95%" id="table5">
        <tr>
            <td>
            <p align="center"><font face="Verdana" size="1"><a href="shopform.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Halsbänder</font></span></a><span style="font-weight: 700"> 
            » </span>
            <a href="shopform2.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Geschirre</font></span></a><span style="font-weight: 700"> 
            » </span>
            <a href="shopform3.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Leinen</font></span></a><span style="font-weight: 700"> 
            » </span>
            <a href="shopform4.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Decken &amp; Körbe</font></span></a><span style="font-weight: 700"> 
            » </span>
            <a href="shopform5.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Näpfe</font></span></a><span style="font-weight: 700"> 
            » </span>
            <a href="shopform6.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Spiel</font></span></a><span style="font-weight: 700"> 
            » </span>
            <a href="shopform7.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Training</font></span></a><span style="font-weight: 700"> 
            » </span><a href="shopform8.php">
            <span style="text-decoration: none; font-weight: 700">
            <font color="#000000">Transport</font></span></a><span style="font-weight: 700"> 
            » <a href="shopform9.php"><font color="#000000">
            <span style="text-decoration: none">Pflege</span></font></a></span></font></td>
        </tr>
    </table>
    </div>
</div>
<html>

<form action="shopeintragen.php" name="xx" method="post">

<div align="center">

<table border="0" cellpadding="5" cellspacing="0" width="465" style="font-family: Verdana; font-size: 10px; color: #000000; border: 1 dotted #000000">
<tr>
<td width="459" colspan="2"  background="tabellenhg.jpg">
<p align="left">Halsband #1 |&nbsp;&nbsp; <b>Kettenhalsband &quot;Chain&quot;, </b>
großgliedrig&nbsp;
| 14 €

</td>
<center>
</tr>
<tr>
<td width="230" background="tabellenhg.jpg" >
<p align="center">&nbsp;<br>
<br><img border="0" src="zubehoer/halsband1.jpg" width="150" height="150"><br>

<br>
&nbsp;

</td>
<td width="229">

<input type=hidden name="obj" value="Kettenhalsband »Chain«">
<input type=hidden name="price" value="14">

<p align="center">Dieses rostfreie Kettenhalsband mit großen Gliedern verhindert 
das Einklemmen von Fell und Haut und ist somit angenehmer zu tragen. Zu 
empfehlen ist, das Halsband so einzuhaken, dass es den Hund nicht würgt.<br>
<br>
Das Halsband ist in unterschiedlichem Material erhältlich.<br>
<br>
Material:<br>
<select size="1" name="obe" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option selected>Edelstahl</option>
<option>Kupfer-Zinn</option>
</select><br>
<br>
Grösse:<br>
<select size="1" name="obe2" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option>Sehr kleiner Hund</option>
<option>Kleiner Hund</option>
<option selected>Mittelgroßer Hund</option>
<option>Großer Hund</option>
<option>Sehr großer Hund</option>
</select><br>
<br>


<br>

<br>
&nbsp;
<input type="image"
name="I4" src="buy.gif" alt="abschicken"
align="bottom" border="0" >
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="5" cellspacing="0" width="465" style="font-family: Verdana; font-size: 10px; color: #000000; border: 1 dotted #000000"  id="table2">
<tr>
<td width="459" colspan="2" background="tabellenhg.jpg">
<p align="left">Halsband #2 |&nbsp;&nbsp; <b>Lederhalsband &quot;Dot&quot;, </b>
mit Aufsätzen&nbsp;
| 10 €

</td>
<center>
</tr>
<tr>
<td width="230" background="tabellenhg.jpg">
<p align="center">&nbsp;<br>
<br><img border="0" src="zubehoer/halsband2.jpg" width="150" height="150"><br>

<br>
&nbsp;

</td>
<td width="229">

<input type=hidden name="obj" value="Lederhalsband »Dot«">
<input type=hidden name="price" value="10">

<p align="center">Ein schmales Lederhalsband mit spitzen Aufsätzen aus Edelstahl, 
die das gesamte Band umrunden. Hierbei besteht eine geringe Verletzungsgefahr, 
das die Spitzen abgerundet sind.<br>
<br>
Das Halsband ist in verschiedenen Farben erhältlich.<br>
<br>
Farben:<br>
<select size="1" name="obe3" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option selected>schwarz</option>
<option>karminrot</option><option>royalblau</option>
</select><br>
<br>
Grösse:<br>
<select size="1" name="obe4" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option>Sehr kleiner Hund</option>
<option>Kleiner Hund</option>
<option selected>Mittelgroßer Hund</option>
<option>Großer Hund</option>
<option>Sehr großer Hund</option>
</select><br>
<br>


<br>

<br>
&nbsp;
<input type="image"
name="I5" src="buy.gif" alt="abschicken"
align="bottom" border="0" >
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="5" cellspacing="0" width="465" style="font-family: Verdana; font-size: 10px; color: #000000; border: 1 dotted #000000" id="table2">
<tr>
<td width="459" colspan="2"  background="tabellenhg.jpg">
<p align="left">Halsband #3 |&nbsp;&nbsp; <b>Nylonhalsband &quot;Bobo&quot;, </b>
mit Mustern&nbsp;
| 5 €

</td>
<center>
</tr>
<tr>
<td width="230" background="tabellenhg.jpg">
<p align="center">&nbsp;<br>
<br><img border="0" src="zubehoer/halsband3.jpg" width="150" height="150"><br>

<br>
&nbsp;

</td>
<td width="229">

<input type=hidden name="obj" value="Nylonhalsband »Bobo«">
<input type=hidden name="price" value="5">

<p align="center">Dieses Nylonhalsband mit frechen Mustern wird vor allem von Rüdenhaltern gekauft. Das Material ist sehr weich und strapazierfähig und die Orangefärbung macht sich besonders in dunklem Fell bemerkbar.<br>
<br>
Das Halsband ist in verschiedenen Farben erhältlich.<br>
<br>
Farben:<br>
<select size="1" name="obe3" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option selected>schwarz-orange</option>
<option>schwarz-gelb</option><option>schwarz-rot</option>
</select><br>
<br>
Grösse:<br>
<select size="1" name="obe4" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option>Sehr kleiner Hund</option>
<option>Kleiner Hund</option>
<option selected>Mittelgroßer Hund</option>
<option>Großer Hund</option>
<option>Sehr großer Hund</option>
</select><br>
<br>


<br>

<br>
&nbsp;
<input type="image"
name="I5" src="buy.gif" alt="abschicken"
align="bottom" border="0" >
</td>
</tr>
</table><br>
    <table border="0" cellpadding="5" cellspacing="0" width="465" style="font-family: Verdana; font-size: 10px; color: #000000; border: 1 dotted #000000" id="table2">
<tr>
<td width="459" colspan="2"  background="tabellenhg.jpg">
<p align="left">Halsband #4 |&nbsp;&nbsp; <b>Halstuchhalsband &quot;Stars&quot;, </b>
mit Mustern&nbsp;
| 10 €

</td>
<center>
</tr>
<tr>
<td width="230" background="tabellenhg.jpg">
<p align="center">&nbsp;<br>
<br><img border="0" src="zubehoer/halsband4.jpg" width="150" height="150"><br>

<br>
&nbsp;

</td>
<td width="229">

<input type=hidden name="obj" value="Halstuchhalsband »Stars«">
<input type=hidden name="price" value="10">

<p align="center">Ein fesches Halsband mit angenähtem Halstuch, das jedem Hund 
gefällt. Die Nachtmotive, wie Sterne und Mond, laden zum träumen ein.<br>
<br>
Das Halsband ist in verschiedenen Farben erhältlich.<br>
<br>
Farben:<br>
<select size="1" name="obe3" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option selected>dunkelblau</option>
<option>schwarz</option>
</select><br>
<br>
Grösse:<br>
<select size="1" name="obe4" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option>Sehr kleiner Hund</option>
<option>Kleiner Hund</option>
<option selected>Mittelgroßer Hund</option>
<option>Großer Hund</option>
<option>Sehr großer Hund</option>
</select><br>
<br>


<br>

<br>
&nbsp;
<input type="image"
name="I5" src="buy.gif" alt="abschicken"
align="bottom" border="0" >
</td>
</tr>
</table>
<br><table border="0" cellpadding="5" cellspacing="0" width="465" style="font-family: Verdana; font-size: 10px; color: #000000; border: 1 dotted #000000" id="table2">
<tr>
<td width="459" colspan="2"  background="tabellenhg.jpg">
<p align="left">Halsband #5 |&nbsp;&nbsp; <b>Agilityhalsband &quot;Quickly&quot;,
</b>einfarbig&nbsp;
| 5 €

</td>
<center>
</tr>
<tr>
<td width="230" background="tabellenhg.jpg">
<p align="center">&nbsp;<br>
<br><img border="0" src="zubehoer/halsband5.jpg" width="150" height="150"><br>

<br>
&nbsp;

</td>
<td width="229">

<input type=hidden name="obj" value="Agilityhalsband »Quickly«">
<input type=hidden name="price" value="5">

<p align="center">Ein Halsband für den Hundesport: Schnell übergezogen und 
schnell wieder ab. Wird besonders von Agiltyfreunden gekauft. Zwar ist dies ein 
Würgehalsband, aber der Stop kann so verstellt werden, dass der Hund keineswegs 
gewürgt wird.<br>
<br>
Das Halsband ist in verschiedenen Farben erhältlich.<br>
<br>
Farben:<br>
<select size="1" name="obe3" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option selected>rot</option>
<option>gelb</option><option>orange</option><option>blau</option><option>grün</option>
</select><br>
<br>
Grösse:<br>
<select size="1" name="obe4" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option>Sehr kleiner Hund</option>
<option>Kleiner Hund</option>
<option selected>Mittelgroßer Hund</option>
<option>Großer Hund</option>
<option>Sehr großer Hund</option>
</select><br>
<br>


<br>

<br>
&nbsp;
<input type="image"
name="I5" src="buy.gif" alt="abschicken"
align="bottom" border="0" >
</td>
</tr>
</table>

<br><table border="0" cellpadding="5" cellspacing="0" width="465" style="font-family: Verdana; font-size: 10px; color: #000000; border: 1 dotted #000000" id="table2">
<tr>
<td width="459" colspan="2"  background="tabellenhg.jpg">
<p align="left">Halsband #6 |&nbsp;&nbsp; <b>Nylonhalsband &quot;Julius K-9&quot;, </b>
mit farbigem Strich&nbsp;
| 5 €

</td>
<center>
</tr>
<tr>
<td width="230" background="tabellenhg.jpg">
<p align="center">&nbsp;<br>
<br><img border="0" src="zubehoer/halsband6.jpg" width="150" height="150"><br>

<br>
&nbsp;

</td>
<td width="229">

<input type=hidden name="obj" value="Nylonhalsband »Julius K-9«">
<input type=hidden name="price" value="5">

<p align="center">Ein schwarzes Nylonhalsband mit farbigem Strich, der über das 
ganze Halsband läuft. Dieses Halsband ist besonders weich gepolstert und 
angenehm zu tragen.<br>
<br>
Das Halsband ist in verschiedenen Farben erhältlich.<br>
<br>
Farben:<br>
<select size="1" name="obe3" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option selected>schwarz-blau</option>
<option>schwarz-gelb</option><option>schwarz-rot</option>
</select><br>
<br>
Grösse:<br>
<select size="1" name="obe4" style="font-family: Verdana; border-style: solid; border-width: 1px; ; background-color:#F5F5F5"">
<option>Sehr kleiner Hund</option>
<option>Kleiner Hund</option>
<option selected>Mittel großer Hund</option>
<option>Großer Hund</option>
<option>Sehr großer Hund</option>
</select><br>
<br>


<br>

<br>
&nbsp;
<input type="image"
name="I5" src="buy.gif" alt="abschicken"
align="bottom" border="0" >
</td>
</tr>
</table></div>
    <p align="center">&nbsp;</div>
</form> 

</form> 

</body>

</html>



Geschrieben von cll am 01.02.2009 um 15:05:

 

Du hast ja auch für jedes Teil ein input type=hidden definiert, das jeweils das alte überschreibt! Dann kommen bei deiner shopeintragen.php natürlich nur die zuletzt definierten an!

Du müsstest den Namen schon zB in einer Checkbox speichern, die dann ausgewählt wird.



Geschrieben von ShivaChewy am 01.02.2009 um 20:48:

 

Hmm... sicher das das nötig ist?
Unicorn beschrieb das im Adventskalender ja genau so =/



Geschrieben von Moorwiese am 01.02.2009 um 23:48:

 

Jedes Objekt muss einen eigenen Namen haben bei der Auswahl, sonst wird natürlich wenn ich drei mal "obj" anklicke, nur eines davon gewählt.



Geschrieben von cll am 02.02.2009 um 10:08:

 

ich seh eh noch nicht so ganz wo dein Formular abgesendet wird. Durch <input type="image"
name="I4" src="buy.gif" alt="abschicken"
align="bottom" border="0" >
als Link? Oder gibts unten nen Button und man wählt das Teil irgendwo aus? (is ziemlich lang und daher schwer zu durchschaun)



Geschrieben von ShivaChewy am 03.02.2009 um 19:32:

 

Ich hab mal Screens gemacht, wie das aussieht.
(der Shop vom www.vrh-adventskalender.de.vu)

Screen 1
Screen 2



Geschrieben von cll am 04.02.2009 um 09:34:

 

ok, dann schließ das Formular einfach wieder nach jedem Artikel und öffne es mit <form action="shopeintragen.php" name="xx" method="post"> wieder! Das müsste schon reichen, damit du die Felder nicht überschreibst. LG



Geschrieben von ShivaChewy am 08.02.2009 um 16:03:

 

Ich probier's danke großes Grinsen


Forensoftware: Burning Board, entwickelt von WoltLab GmbH