Toon posts:

[PHP] Sessions

Pagina: 1
Acties:
  • 30 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik heb een vraag hoe zorg ik dat het id in $_SESSION['mandje'] komt?


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
    $result = mysql_query('SELECT * FROM artikelen;');
    while ($rij = mysql_fetch_array($result)) {
?>      
        <input type="hidden" name="id" value="<?=$rij['id'];?>"> 
        <table border=0>
        <tr>
            <td width="100">[img]"<?=$rij['image'];?>"[/img]</td> 
            <td width="250"><?=$rij['omschrijving'];?></td>
            <td width="100">&euro; <?=number_format($rij['prijs'],2);?></td>
            <td><a href="?nummer=<?=$rij['id'];?>">
                [img]"images/voegtoe.gif"[/img]</a></td> 
            <td><a href="mandje.php"> 
                [img]"images/winkelmandje.gif"[/img]</a></td> 
        </tr>
        </table>
        <hr class="lijn">

Verwijderd

Submit knopje maken en dan

PHP:
1
2
3
4
If($_POST['submit'])
{
    $_SESSION['mandje'] = $rij['id']
}

[ Voor 27% gewijzigd door Verwijderd op 07-04-2006 10:14 ]


  • yade
  • Registratie: Mei 2002
  • Laatst online: 25-11-2025
Kun je je probleem misschien iets beter omschrijven? Hier kunnen we niet zoveel mee.

  • NMe
  • Registratie: Februari 2004
  • Laatst online: 22-01 23:51

NMe

Quia Ego Sic Dico.

Een antwoord: lees onze PHP-FAQ en Programming FAQ - De "quickstart" door. Hier ben je overigens vaker op gewezen. :/

'E's fighting in there!' he stuttered, grabbing the captain's arm.
'All by himself?' said the captain.
'No, with everyone!' shouted Nobby, hopping from one foot to the other.


Dit topic is gesloten.