Jump to content

Empahros

New Members
  • Posts

    2
  • Joined

  • Last visited

Empahros's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I had to dynamically generate HTML in PHP, I understand! How do I get the data to be added progressively to the table? (if there is more than one item in the cart) Thank you very much for the help!
  2. Hi! For my school project I have to code a shopping cart page only with HTML, CSS and PHP (bootstrap, sql js,... are not allowed). But I don't know how to code in php (it's my first time). The cart must display the name and quantity of the chosen product in a list. Here is what I did: <?php $quantity= $_POST['quantity']; $price = $_POST['price']; $name= $_POST['name']; $total = $name* $price; $data= array("$quantity","$price","$total"); $D4 = fopen('cart.txt','a'); fwrite($D4,"$name|$quantity|$price|$total|@"); fclose($D4); ?> The information is written to a text file. I would like this information to be written on an html page (a shopping cart page). I don't know how to do this... Can you help me? Thanks a lot!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.