Jump to content

ashraf97

Member
  • Posts

    50
  • Joined

  • Last visited

Awards

This user doesn't have any awards

1 Follower

About ashraf97

  • Birthday Aug 25, 1997

Contact Methods

  • Steam
    WATDABLACKJEWNESS
  • Battle.net
    Lenventisis
  • Xbox Live
    Mr Habib
  • Twitch.tv
    HairyArab69

Profile Information

  • Gender
    Male
  • Location
    Sydney
  • Interests
    Computers
    Cars
    Games
    Girls ;)

System

  • CPU
    3.8Ghz 8 Core Cpu
  • Motherboard
    AsRock Motherboard
  • RAM
    8Gb G.Skill Rip Jaws
  • GPU
    AMD Raedon 7870 2Gb
  • Case
    Huntkey Micro A-TX
  • Storage
    2Tb Green Western Digital Drive
  • PSU
    650W Cougar Silver Rating
  • Display(s)
    23" Asus Monitor
  • Cooling
    Hyper 212x
  • Keyboard
    Ducky Shine
  • Mouse
    ThermalTake
  • Sound
    Siberia V2
  • Operating System
    Windows 7 64Bit

Recent Profile Visitors

413 profile views

ashraf97's Achievements

  1. need help making a preview receipt with a print function with it? anyone help me? this is my cart code, anyone help me I'm stuck on what to do. <?php session_start();if(isset($_GET['addItem'])){ if(!empty($_SESSION['cart'])){ array_push($_SESSION['cart'], htmlspecialchars($_GET['addItem'])); }else{ $_SESSION['cart'] = array(htmlspecialchars($_GET['addItem'])); }} ?><!doctype html><html><head><meta charset="utf-8"><title>Products</title><style>*{margin: 0;padding: 0;}table{ border-collapse: collapse;} table, th, td{ border: 1px solid black;}h1{text-align: center;color: white;}header{background-color: #069764;width: 90%;padding: 10px;box-sizing: border-box;margin: 0 auto;}#wrapper{width: 90%;margin: 0 auto;padding: 15px;border: 2px solid black;box-sizing: border-box; } </style></head> <body><body bgcolor="#069099"><header><h1>Ashraf's Fully Hectic Car Shop</h1></header><div id="wrapper"><a href="products.php">Go to previous page</a><br><a href="destroy.php">Clear Cart & Return to Previous Page</a><br><br><table> <?php $total = 0;if(!empty($_SESSION['cart'])){foreach($_SESSION['cart'] as $product){echo "<tr><td>$product</td><td>";if($product == "Ford GT 2015"){echo '$60000';$total = $total + 60000;}else if($product == "Nissan R35"){echo '$110000';$total = $total + 110000;}else if($product == "SP20"){echo '$9800';$total = $total + 9800;}else{echo '-';}echo "</td></tr>";}}echo '<tr><td><strong>TOTAL</strong></td><td>$' . $total . '</td></tr>'; ?> </table></div></body></html><h1><button onclick="Receipt.php"()">Preview Receipt </button> </h1>
  2. so I've made a button on the cart.php called Preview receipt and that form is connected to another form called receipt. php and is that what should have the code of the total and what not?
  3. How do i add a show receipt then a print receipt function in my shopping cart system this is so far the coding for it <!doctype html><html><head><meta charset="utf-8"><title>Products</title><style>*{margin: 0;padding: 0;}table{ border-collapse: collapse;} table, th, td{ border: 2px solid black;}h1{text-align: center;color: white;}header{background-color: #069764;width: 90%;padding: 13px;box-sizing: border-box;margin: 0 auto;}#wrapper{width: 90%;margin: 0 auto;padding: 15px;border: 4px solid black;box-sizing: border-box;}</style><script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=desert"></script></head> <body><body bgcolor="#0069099"><header><h1>Ashraf's Fully Hectic Car Shop</h1></header><div id="wrapper"><br><table><tr> <td><img src="Ford.jpeg" style="width:110px;height:120px;"><hr><h3>Ford Gt 2015</h3><br><a href="cart.php?addItem=Ford GT 2015">Add to Cart</a></td> <td><img src="R35.jpg" style="width:100px;height:120px;"><hr><h3>Nissan R35</h3><br><a href="cart.php?addItem=Nissan R35">Add to Cart</a></td> <td><img src="SP20.jpg" style="width:100px;height:120px;"><hr><h3>SP20</h3><br><a href="cart.php?addItem=SP20">Add to Cart</a></td> </tr></table></div></body></html> <?php session_start();if(isset($_GET['addItem'])){ if(!empty($_SESSION['cart'])){ array_push($_SESSION['cart'], htmlspecialchars($_GET['addItem'])); }else{ $_SESSION['cart'] = array(htmlspecialchars($_GET['addItem'])); }} ?><!doctype html><html><head><meta charset="utf-8"><title>Products</title><script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=desert"></script><style>*{margin: 0;padding: 0;}table{ border-collapse: collapse;} table, th, td{ border: 1px solid black;}h1{text-align: center;color: white;}header{background-color: #069764;width: 90%;padding: 10px;box-sizing: border-box;margin: 0 auto;}#wrapper{width: 90%;margin: 0 auto;padding: 15px;border: 2px solid black;box-sizing: border-box;} </style></head> <body><body bgcolor="#069099"><header><h1>Ashraf's Fully Hectic Car Shop</h1></header><div id="wrapper"><a href="products.php">Go to previous page</a><br><a href="destroy.php">Clear Cart & Return to Previous Page</a><br><br><table> <?php $total = 0;if(!empty($_SESSION['cart'])){foreach($_SESSION['cart'] as $product){echo "<tr><td>$product</td><td>";if($product == "Ford GT 2015"){echo '$60000';$total = $total + 60000;}else if($product == "Nissan R35"){echo '$110000';$total = $total + 110000;}else if($product == "SP20"){echo '$9800';$total = $total + 9800;}else{echo '-';}echo "</td></tr>";}}echo '<tr><td><strong>TOTAL</strong></td><td>$' . $total . '</td></tr>'; ?> </table></div></body></html>
  4. how would i make like another box saying "total cost" or something under the the boxes of the amount for a giraffe?
  5. yea thanks bro all done, helped out a tonne man thanks again <3
  6. i love you bro you've helped me so much <3 last thing is how do i take the table with all the code in it?
  7. oh and where can i find the code for the destroy.php file?
  8. no rush dude but holy shit man this is great, so is the home page form called products.php and the other one of the cart when you press on one of the giraffe called, what is that form called or file name?
  9. would the code you sent me work if i just put it in a random .php script i want to see how it works in action. i learn better visually
  10. has anyone got any guides on how i could make a online shopping cart system? link/ tutorials or have code that you have previously done
  11. do i add this is the php script or the form?
  12. how exactly do i grab the query strong so that i can display the error?
  13. no no i was saying that for instance if the user entered a wrong username and password it would not let them proceed but to come up with another message saying your username and password was incorrect, do you understand what I'm trying to say?
  14. so when i don't enter a username its says you must enter a username and then when i do it says you must enter a password, that type of stuff?
×