par
moogli » 26 juil. 2016, 10:24
salut,
tu n'as pas de session_start sur ton script d'affichage c'est normal ?
J'ai testé ton code en ajoutant une init des données et il est quais fonctionnel. Le seul problème c'est que tu te base sur un index qui n'est pas celui du tableau d'origine pour ton lien de suppression du coup y a un moment ça déconne.
en dehors de cela tu affiches les données du tableau et peu les supprimer.
J'ai corrigé ton code pour éviter cela et travailler directement sur le tableau de session histoire d'éviter les intermédiaires inutiles.
Le tableau d’initialisation au début c'est pour tester il faut bien sur utiliser un tableau vide.
Il faut que tu vire les
650 lignes de css de fichier pour les mettre dans un fichier css à part. Non seulement cela permet le réemploi plutôt que la duplication et en plus cela facilite la lecture de fichier.
Pour info la mise en page en tableau c'est pas terrible tu peux faire la même chose en css de façon fluide (voir même responsive si tu veux). La dernière chose à la mode pour cela c'est flebox.
J'ai réduit la suppression au strict nécessaire
<?php
session_start();
unset($_SESSION['panier'][$_GET['index']]);
header("location:test.php?panier=1");
La page d'affichage.
<?php
// require_once 'connection.php';
session_start();
if (!isset($_SESSION['panier']) || !is_array($_SESSION['panier'])) {
$_SESSION['panier'] = [['id_pho' => 1, 'code_cat' => 'osef', 'photo' => 'photo1'],
['id_pho' => 2, 'code_cat' => 'osef2', 'photo' => 'photo2'],
['id_pho' => 3, 'code_cat' => 'osef3', 'photo' => 'photo3'],
['id_pho' => 4, 'code_cat' => 'osef4', 'photo' => 'photo4'],
['id_pho' => 5, 'code_cat' => 'osef5', 'photo' => 'photo5'],
['id_pho' => 6, 'code_cat' => 'osef6', 'photo' => 'photo6'],
['id_pho' => 7, 'code_cat' => 'osef7', 'photo' => 'photo7'],
['id_pho' => 8, 'code_cat' => 'osef8', 'photo' => 'photo8'],
['id_pho' => 9, 'code_cat' => 'osef9', 'photo' => 'photo9'],
['id_pho' => 10, 'code_cat' => 'osef10', 'photo' => 'photo10']];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
html {
font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 11pt;
background-color: white
}
table {
border-collapse: collapse;
page-break-after: always
}
.gridlines td {
border: 1px dotted black
}
.b {
text-align: center
}
.e {
text-align: center
}
.f {
text-align: right
}
.inlineStr {
text-align: left
}
.n {
text-align: right
}
.s {
text-align: left
}
td.style5 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 3px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style6 {
vertical-align: middle;
border-bottom: none #000000;
border-top: none #000000;
border-left: none #000000;
border-right: none #000000;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style7 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style8 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 3px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style9 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style40 {
vertical-align: middle;
text-align: center;
border-bottom: 1px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 1px dashed #BFBFBF !important;
border-right: 1px dashed #BFBFBF !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style41 {
vertical-align: middle;
text-align: center;
border-bottom: 0px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 0px dashed #BFBFBF !important;
border-right: 0px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style42 {
vertical-align: middle;
text-align: center;
border-bottom: 0px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 0px dashed #BFBFBF !important;
border-right: 0px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style43 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style44 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style45 {
vertical-align: middle;
text-align: center;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style46 {
vertical-align: middle;
text-align: center;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style47 {
vertical-align: middle;
text-align: center;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style48 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: 3px solid #000000 !important;
border-right: none #000000
}
td.style49 {
vertical-align: middle;
text-align: center;
border-bottom: 3px #000000;
border-top: 3px solid #000000 !important;
border-left: none #000000;
border-right: none #000000;
margin-left: 3px;
background-color: #D8D8D8
}
td.style52 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: none #000000;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 19pt;
background-color: #D8D8D8
}
td.style54 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: none #000000;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 19pt;
background-color: #D8D8D8
}
td.style58 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: none #000000;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style59 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style60 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: none #000000;
border-left: none #000000;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style61 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: none #000000;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style62 {
vertical-align: middle;
text-align: center;
border-bottom: 1px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style63 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 1px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style64 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style65 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style66 {
vertical-align: middle;
text-align: right;
padding-right: 0px;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style67 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style68 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
table.sheet0 col.col0 {
width: 88.78888787pt
}
table.sheet0 col.col1 {
width: 45.41111059pt
}
table.sheet0 col.col2 {
width: 45.41111059pt
}
table.sheet0 col.col3 {
width: 72.52222139pt
}
table.sheet0 col.col4 {
width: 49.47777721pt
}
table.sheet0 col.col5 {
width: 32.53333296pt
}
table.sheet0 col.col6 {
width: 72.52222139pt
}
table.sheet0 col.col7 {
width: 45.41111059pt
}
table.sheet0 col.col8 {
width: 45.41111059pt
}
table.sheet0 col.col9 {
width: 51.51111052pt
}
table.sheet0 col.col10 {
width: 49.47777721pt
}
table.sheet0 col.col11 {
width: 33.21111072999999pt
}
table.sheet0 tr {
height: 15pt
}
table.sheet0 tr.row0 {
height: 33.6pt
}
table.sheet0 tr.row1 {
height: 33.6pt
}
table.sheet0 tr.row2 {
height: 33.6pt
}
table.sheet0 tr.row3 {
height: 33.6pt
}
table.sheet0 tr.row4 {
height: 34.9pt
}
table.sheet0 tr.row5 {
height: 25.15pt
}
table.sheet0 tr.row6 {
height: 25.15pt
}
table.sheet0 tr.row7 {
height: 25.15pt
}
table.sheet0 tr.row8 {
height: 25.15pt
}
table.sheet0 tr.row9 {
height: 25.9pt
}
table.sheet0 tr.row10 {
height: 25.9pt
}
table.sheet0 tr.row11 {
height: 25.9pt
}
table.sheet0 tr.row12 {
height: 25.9pt
}
table.sheet0 tr.row13 {
height: 25.9pt
}
table.sheet0 tr.row14 {
height: 25.9pt
}
table.sheet0 tr.row15 {
height: 25.9pt
}
table.sheet0 tr.row16 {
height: 25.9pt
}
table.sheet0 tr.row17 {
height: 34.9pt
}
table.sheet0 tr.row18 {
height: 25.15pt
}
table.sheet0 tr.row19 {
height: 25.15pt
}
table.sheet0 tr.row20 {
height: 25.15pt
}
table.sheet0 tr.row21 {
height: 25.15pt
}
table.sheet0 tr.row22 {
height: 25.9pt
}
table.sheet0 tr.row23 {
height: 25.9pt
}
table.sheet0 tr.row24 {
height: 25.9pt
}
table.sheet0 tr.row25 {
height: 25.9pt
}
table.sheet0 tr.row26 {
height: 25.9pt
}
table.sheet0 tr.row27 {
height: 25.9pt
}
table.sheet0 tr.row28 {
height: 25.9pt
}
table.sheet0 tr.row29 {
height: 25.9pt
}
table.sheet0 tr.row30 {
height: 34.9pt
}
table.sheet0 tr.row31 {
height: 25.15pt
}
table.sheet0 tr.row32 {
height: 25.15pt
}
table.sheet0 tr.row33 {
height: 25.15pt
}
table.sheet0 tr.row34 {
height: 25.15pt
}
table.sheet0 tr.row35 {
height: 25.9pt
}
table.sheet0 tr.row36 {
height: 25.9pt
}
table.sheet0 tr.row37 {
height: 25.9pt
}
table.sheet0 tr.row38 {
height: 25.9pt
}
table.sheet0 tr.row39 {
height: 25.9pt
}
table.sheet0 tr.row40 {
height: 25.9pt
}
table.sheet0 tr.row41 {
height: 25.9pt
}
table.sheet0 tr.row42 {
height: 25.9pt
}
</style>
<style type="text/css">
@page {
left-margin: 0.7086614173228347in;
right-margin: 0.7086614173228347in;
top-margin: 0.7874015748031497in;
bottom-margin: 0.7874015748031497in;
}
body {
left-margin: 0.7086614173228347in;
right-margin: 0.7086614173228347in;
top-margin: 0.7874015748031497in;
bottom-margin: 0.7874015748031497in;
}
</style>
</head>
<body>
<div>
<form method="post" action="formular2.php">
<table border="0" cellpadding="0" cellspacing="0" id="sheet0" class="sheet0 gridlines" align="center"
width="98%">
<col class="col0">
<col class="col1">
<col class="col2">
<col class="col3">
<col class="col4">
<col class="col5">
<col class="col6">
<col class="col7">
<col class="col8">
<col class="col9">
<col class="col10">
<col class="col11">
<tbody>
<tr class="row0">
<td class="column0 style48 s style49" colspan="3"></td>
<td class="column3 style52 s style54" colspan="6">Kantteilbestellung</td>
<td class="column9 style58 s style59" colspan="2">Seite:</td>
<td class="column11 style62 s style62">/</td>
</tr>
<tr class="row2">
<td class="column0 style5 s">Bauvorhaben:</td>
<td class="column1 style64 s style65" colspan="6"><input type="text" name="bauvorhaben" size="40"
maxlength="40" required="required"></td>
<td class="column7 style66 s style67" colspan="2">Auftrags-Nr.:</td>
<td class="column9 style64 s style68" colspan="3"><input type="text" name="auftrags_nr" size="10"
maxlength="8" required="required"></td>
</tr>
<tr class="row3">
<td class="column0 style8 s">Fassade:</td>
<td class="column1 style43 s style44" colspan="2"><input type="text" name="fassade" size="10"
maxlength="6" required="required"></td>
<td class="column3 style9 s">Bearbeiter:</td>
<td class="column4 style43 s style44" colspan="2"><input type="text" name="bearbeiter" size="15"
maxlength="13" required="required"></td>
<td class="column6 style7 s">Datum:</td>
<td class="column7 style45 n style46" colspan="2"><input type="text" name="datum" size="10"
maxlength="8" required="required"></td>
<td class="column9 style7 s">Termin:</td>
<td class="column10 style45 n style47" colspan="2"><input type="text" name="termin" size="10"
maxlength="8" required="required"></td>
</tr>
<tr class="row4">
<td class="column1 style40 n style42" colspan="2"></td>
<td class="column4 style40 n style41" colspan="2"></td>
<td class="column7 style40 n style42" colspan="2"></td>
</tr>
</tr>
</tbody>
</table>
</div>
<div id="listeProduits" align="center">
<table border="1">
<tr>
<th colspan="4"><h4>Hier ist die Liste Ihrer ausgew�lten Kantteile</h4></th>
</tr>
<tr align="center">
<th>BILD-ID</th>
<th>KATEGORIE-ID</th>
<th>BILDPFAD</th>
<th></th>
</tr>
<?php
foreach ($_SESSION['panier'] as $key => $value) {
echo <<<html
<tr>
<td>{$value['id_pho']}</td>
<td>{$value['code_cat']}</td>
<td>{$value['photo']}</td>
<td><a href="supprimerdupanier.php?index={$key}">L�schen</a></td>
</tr>
html;
}
?>
</table>
</div>
<input style="margin-top:25px" type="image" src="images/obj_pdf.gif" alt="Abschiken">
</form>
</body>
</html>
Si avec tous ça rien ne s'affiche c'est que tu n'alimentes pas le tableau de session $_SESSION['panier']
La forme la plus simple fonctionnelle de "addCaddie.php" est celle ci
<?php
session_start();
if(!isset($_SESSION['panier']) || !is_array($_SESSION['panier'])){
$_SESSION['panier'] = [];
}
$_SESSION['panier'][] = ['photo'=>$_POST['photo'], 'code_cat'=>$_POST['code_cat'],'id_pho'=>$_POST['id_pho']];
header("location:index.php?panier=1");
Il est impératif de valider les données reçus des formulaires avant de les employer. cela manque sur tout tes fichiers "d'action" (ajout suppression).
@+
salut,
tu n'as pas de session_start sur ton script d'affichage c'est normal ?
J'ai testé ton code en ajoutant une init des données et il est quais fonctionnel. Le seul problème c'est que tu te base sur un index qui n'est pas celui du tableau d'origine pour ton lien de suppression du coup y a un moment ça déconne.
en dehors de cela tu affiches les données du tableau et peu les supprimer.
J'ai corrigé ton code pour éviter cela et travailler directement sur le tableau de session histoire d'éviter les intermédiaires inutiles.
Le tableau d’initialisation au début c'est pour tester il faut bien sur utiliser un tableau vide.
Il faut que tu vire les [b]650[/b] lignes de css de fichier pour les mettre dans un fichier css à part. Non seulement cela permet le réemploi plutôt que la duplication et en plus cela facilite la lecture de fichier.
Pour info la mise en page en tableau c'est pas terrible tu peux faire la même chose en css de façon fluide (voir même responsive si tu veux). La dernière chose à la mode pour cela c'est flebox.
J'ai réduit la suppression au strict nécessaire
[php]<?php
session_start();
unset($_SESSION['panier'][$_GET['index']]);
header("location:test.php?panier=1");[/php]
La page d'affichage.
[php]<?php
// require_once 'connection.php';
session_start();
if (!isset($_SESSION['panier']) || !is_array($_SESSION['panier'])) {
$_SESSION['panier'] = [['id_pho' => 1, 'code_cat' => 'osef', 'photo' => 'photo1'],
['id_pho' => 2, 'code_cat' => 'osef2', 'photo' => 'photo2'],
['id_pho' => 3, 'code_cat' => 'osef3', 'photo' => 'photo3'],
['id_pho' => 4, 'code_cat' => 'osef4', 'photo' => 'photo4'],
['id_pho' => 5, 'code_cat' => 'osef5', 'photo' => 'photo5'],
['id_pho' => 6, 'code_cat' => 'osef6', 'photo' => 'photo6'],
['id_pho' => 7, 'code_cat' => 'osef7', 'photo' => 'photo7'],
['id_pho' => 8, 'code_cat' => 'osef8', 'photo' => 'photo8'],
['id_pho' => 9, 'code_cat' => 'osef9', 'photo' => 'photo9'],
['id_pho' => 10, 'code_cat' => 'osef10', 'photo' => 'photo10']];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
html {
font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 11pt;
background-color: white
}
table {
border-collapse: collapse;
page-break-after: always
}
.gridlines td {
border: 1px dotted black
}
.b {
text-align: center
}
.e {
text-align: center
}
.f {
text-align: right
}
.inlineStr {
text-align: left
}
.n {
text-align: right
}
.s {
text-align: left
}
td.style5 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 3px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style6 {
vertical-align: middle;
border-bottom: none #000000;
border-top: none #000000;
border-left: none #000000;
border-right: none #000000;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style7 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style8 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 3px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style9 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style40 {
vertical-align: middle;
text-align: center;
border-bottom: 1px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 1px dashed #BFBFBF !important;
border-right: 1px dashed #BFBFBF !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style41 {
vertical-align: middle;
text-align: center;
border-bottom: 0px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 0px dashed #BFBFBF !important;
border-right: 0px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style42 {
vertical-align: middle;
text-align: center;
border-bottom: 0px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 0px dashed #BFBFBF !important;
border-right: 0px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: white
}
td.style43 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style44 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style45 {
vertical-align: middle;
text-align: center;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style46 {
vertical-align: middle;
text-align: center;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style47 {
vertical-align: middle;
text-align: center;
border-bottom: 3px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style48 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: 3px solid #000000 !important;
border-right: none #000000
}
td.style49 {
vertical-align: middle;
text-align: center;
border-bottom: 3px #000000;
border-top: 3px solid #000000 !important;
border-left: none #000000;
border-right: none #000000;
margin-left: 3px;
background-color: #D8D8D8
}
td.style52 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: none #000000;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 19pt;
background-color: #D8D8D8
}
td.style54 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: none #000000;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 19pt;
background-color: #D8D8D8
}
td.style58 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: none #000000;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style59 {
vertical-align: middle;
text-align: center;
border-bottom: none #000000;
border-top: 3px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style60 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: none #000000;
border-left: none #000000;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style61 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: none #000000;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style62 {
vertical-align: middle;
text-align: center;
border-bottom: 1px solid #000000 !important;
border-top: 3px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style63 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 1px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style64 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style65 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 2px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style66 {
vertical-align: middle;
text-align: right;
padding-right: 0px;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 2px solid #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style67 {
vertical-align: middle;
text-align: left;
padding-right: 0px;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 1px dashed #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
td.style68 {
vertical-align: middle;
text-align: center;
border-bottom: 2px solid #000000 !important;
border-top: 2px solid #000000 !important;
border-left: 1px dashed #000000 !important;
border-right: 3px solid #000000 !important;
font-weight: bold;
color: #000000;
font-family: 'Calibri';
font-size: 11pt;
background-color: #D8D8D8
}
table.sheet0 col.col0 {
width: 88.78888787pt
}
table.sheet0 col.col1 {
width: 45.41111059pt
}
table.sheet0 col.col2 {
width: 45.41111059pt
}
table.sheet0 col.col3 {
width: 72.52222139pt
}
table.sheet0 col.col4 {
width: 49.47777721pt
}
table.sheet0 col.col5 {
width: 32.53333296pt
}
table.sheet0 col.col6 {
width: 72.52222139pt
}
table.sheet0 col.col7 {
width: 45.41111059pt
}
table.sheet0 col.col8 {
width: 45.41111059pt
}
table.sheet0 col.col9 {
width: 51.51111052pt
}
table.sheet0 col.col10 {
width: 49.47777721pt
}
table.sheet0 col.col11 {
width: 33.21111072999999pt
}
table.sheet0 tr {
height: 15pt
}
table.sheet0 tr.row0 {
height: 33.6pt
}
table.sheet0 tr.row1 {
height: 33.6pt
}
table.sheet0 tr.row2 {
height: 33.6pt
}
table.sheet0 tr.row3 {
height: 33.6pt
}
table.sheet0 tr.row4 {
height: 34.9pt
}
table.sheet0 tr.row5 {
height: 25.15pt
}
table.sheet0 tr.row6 {
height: 25.15pt
}
table.sheet0 tr.row7 {
height: 25.15pt
}
table.sheet0 tr.row8 {
height: 25.15pt
}
table.sheet0 tr.row9 {
height: 25.9pt
}
table.sheet0 tr.row10 {
height: 25.9pt
}
table.sheet0 tr.row11 {
height: 25.9pt
}
table.sheet0 tr.row12 {
height: 25.9pt
}
table.sheet0 tr.row13 {
height: 25.9pt
}
table.sheet0 tr.row14 {
height: 25.9pt
}
table.sheet0 tr.row15 {
height: 25.9pt
}
table.sheet0 tr.row16 {
height: 25.9pt
}
table.sheet0 tr.row17 {
height: 34.9pt
}
table.sheet0 tr.row18 {
height: 25.15pt
}
table.sheet0 tr.row19 {
height: 25.15pt
}
table.sheet0 tr.row20 {
height: 25.15pt
}
table.sheet0 tr.row21 {
height: 25.15pt
}
table.sheet0 tr.row22 {
height: 25.9pt
}
table.sheet0 tr.row23 {
height: 25.9pt
}
table.sheet0 tr.row24 {
height: 25.9pt
}
table.sheet0 tr.row25 {
height: 25.9pt
}
table.sheet0 tr.row26 {
height: 25.9pt
}
table.sheet0 tr.row27 {
height: 25.9pt
}
table.sheet0 tr.row28 {
height: 25.9pt
}
table.sheet0 tr.row29 {
height: 25.9pt
}
table.sheet0 tr.row30 {
height: 34.9pt
}
table.sheet0 tr.row31 {
height: 25.15pt
}
table.sheet0 tr.row32 {
height: 25.15pt
}
table.sheet0 tr.row33 {
height: 25.15pt
}
table.sheet0 tr.row34 {
height: 25.15pt
}
table.sheet0 tr.row35 {
height: 25.9pt
}
table.sheet0 tr.row36 {
height: 25.9pt
}
table.sheet0 tr.row37 {
height: 25.9pt
}
table.sheet0 tr.row38 {
height: 25.9pt
}
table.sheet0 tr.row39 {
height: 25.9pt
}
table.sheet0 tr.row40 {
height: 25.9pt
}
table.sheet0 tr.row41 {
height: 25.9pt
}
table.sheet0 tr.row42 {
height: 25.9pt
}
</style>
<style type="text/css">
@page {
left-margin: 0.7086614173228347in;
right-margin: 0.7086614173228347in;
top-margin: 0.7874015748031497in;
bottom-margin: 0.7874015748031497in;
}
body {
left-margin: 0.7086614173228347in;
right-margin: 0.7086614173228347in;
top-margin: 0.7874015748031497in;
bottom-margin: 0.7874015748031497in;
}
</style>
</head>
<body>
<div>
<form method="post" action="formular2.php">
<table border="0" cellpadding="0" cellspacing="0" id="sheet0" class="sheet0 gridlines" align="center"
width="98%">
<col class="col0">
<col class="col1">
<col class="col2">
<col class="col3">
<col class="col4">
<col class="col5">
<col class="col6">
<col class="col7">
<col class="col8">
<col class="col9">
<col class="col10">
<col class="col11">
<tbody>
<tr class="row0">
<td class="column0 style48 s style49" colspan="3"></td>
<td class="column3 style52 s style54" colspan="6">Kantteilbestellung</td>
<td class="column9 style58 s style59" colspan="2">Seite:</td>
<td class="column11 style62 s style62">/</td>
</tr>
<tr class="row2">
<td class="column0 style5 s">Bauvorhaben:</td>
<td class="column1 style64 s style65" colspan="6"><input type="text" name="bauvorhaben" size="40"
maxlength="40" required="required"></td>
<td class="column7 style66 s style67" colspan="2">Auftrags-Nr.:</td>
<td class="column9 style64 s style68" colspan="3"><input type="text" name="auftrags_nr" size="10"
maxlength="8" required="required"></td>
</tr>
<tr class="row3">
<td class="column0 style8 s">Fassade:</td>
<td class="column1 style43 s style44" colspan="2"><input type="text" name="fassade" size="10"
maxlength="6" required="required"></td>
<td class="column3 style9 s">Bearbeiter:</td>
<td class="column4 style43 s style44" colspan="2"><input type="text" name="bearbeiter" size="15"
maxlength="13" required="required"></td>
<td class="column6 style7 s">Datum:</td>
<td class="column7 style45 n style46" colspan="2"><input type="text" name="datum" size="10"
maxlength="8" required="required"></td>
<td class="column9 style7 s">Termin:</td>
<td class="column10 style45 n style47" colspan="2"><input type="text" name="termin" size="10"
maxlength="8" required="required"></td>
</tr>
<tr class="row4">
<td class="column1 style40 n style42" colspan="2"></td>
<td class="column4 style40 n style41" colspan="2"></td>
<td class="column7 style40 n style42" colspan="2"></td>
</tr>
</tr>
</tbody>
</table>
</div>
<div id="listeProduits" align="center">
<table border="1">
<tr>
<th colspan="4"><h4>Hier ist die Liste Ihrer ausgew�lten Kantteile</h4></th>
</tr>
<tr align="center">
<th>BILD-ID</th>
<th>KATEGORIE-ID</th>
<th>BILDPFAD</th>
<th></th>
</tr>
<?php
foreach ($_SESSION['panier'] as $key => $value) {
echo <<<html
<tr>
<td>{$value['id_pho']}</td>
<td>{$value['code_cat']}</td>
<td>{$value['photo']}</td>
<td><a href="supprimerdupanier.php?index={$key}">L�schen</a></td>
</tr>
html;
}
?>
</table>
</div>
<input style="margin-top:25px" type="image" src="images/obj_pdf.gif" alt="Abschiken">
</form>
</body>
</html>[/php]
Si avec tous ça rien ne s'affiche c'est que tu n'alimentes pas le tableau de session $_SESSION['panier']
La forme la plus simple fonctionnelle de "addCaddie.php" est celle ci
[php]<?php
session_start();
if(!isset($_SESSION['panier']) || !is_array($_SESSION['panier'])){
$_SESSION['panier'] = [];
}
$_SESSION['panier'][] = ['photo'=>$_POST['photo'], 'code_cat'=>$_POST['code_cat'],'id_pho'=>$_POST['id_pho']];
header("location:index.php?panier=1");[/php]
Il est impératif de valider les données reçus des formulaires avant de les employer. cela manque sur tout tes fichiers "d'action" (ajout suppression).
@+