Try saving the id's to an array in $_SESSION:
$_SESSION['shopping cart'][] = $id;
On Friday, January 4, 2013 4:47:56 PM UTC-5, Chrystopher Medina wrote:
>
>
> my friend u know i have to do a shop online , i have everythin well almost
> everythin i show the products with something like this.
>
> <div class="caja">
> <p><?php echo $nombre ?></p> //THIS SHOWS THE NAME OF PRODUCT
> <p><img src="<?php echo $imagen?>" class="producto"/></p> //THIS
> SHOWS THE IMAGE
> <p>PRECIO:<?php echo $precio?><br/> //THIS THE PRICE
>
> </p>
> <p id="tooltip1"><a href="#" class="detalle">VER
> DETALLES<span><?php echo $detalles?></span></a></p>
> <?php
> error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); //HERE SHOWS A
> BUTTON ADD PRODUCT TO THE SHOPING CAR IF THE USER IS LOGGED
> if($_SESSION["autentificado"]){
> echo "<form class='cart_form' action='cart_action.php' method='get'>";
> echo "<input type='hidden' name='order_code' value='";echo $id; echo "'
> />";
> echo "<label>No.<input class='center' type='text' name='quantity'
> value='1' size='3' ></label>
> <input type='submit' name='submit' value='Agregar' />
> <br/><br/>
>
> <br/><br/>
>
>
> </form>";
>
> }
> ?>
> </div>
>
> WELL I DONT KNOW IF THIS IS OK .. BUT I SEND BY A FORM IN A FIELD HIDDEN
> THE PRODUCT ID. IF THE USER IS LOGED , CAN WATCH THE BUTTON..... BUT I DONT
> KNOW HOW I CAN SAVE ALL THE IDS IN A ARRAY... AND THEN WHEN THE USER CLICK
> IN CONFIRM THIS ID´S SEND TO THE DATABASE
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/MSP2BJ_QiMYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.