Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About MsKazza

  • Rank
    Regular Member
  • Birthday 08/05/1978

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. with respect i never said it wouldn't be easier, but i would like to learn why the code i wrote stopped working. At a later date I will learn about arrays etc. I didn't ask someone to help me rewrite the code, i just want to learn why what i've written stopped working, so i can learn from it.
  2. the existing database of thousands of products is already done so changing the database is a non starter. Once i get it sorted i will take your comments about prepared statements on board for the insert query
  3. <?php $product_code = mysqli_real_escape_string($conn, $_POST['product_code']); $product_name = mysqli_real_escape_string($conn, $_POST['product_name']); $category = mysqli_real_escape_string($conn, $_POST['category']); $filter = mysqli_real_escape_string($conn, $_POST['filter']); $description = mysqli_real_escape_string($conn, $_POST['description']); $specification = mysqli_real_escape_string($conn, $_POST['specification']); $price = mysqli_real_escape_string($conn, $_POST['price']);
  4. Hey all So have been working on a file upload script, it was uploading the file but also adding the path name instead of NULL to mysql when no image was to upload, that is now fixed however now it won't upload the actual image to the directory. I tried undoing the mysql changes but it still won't upload the image to the directory. Am testing on my own computer using xampp so no file permission issues, plus it was working before. Any help much appreciated. Thanks <?php $product_code = mysqli_real_escape_string($conn, $_POST['product_code']);
  5. Ok well it was great for all of five minutes till i realized it is only adding one item, when i try to add another it just replaces the first item, i'm guessing there should be a counter being incremented for each item a new array. case "add": if(!empty($_POST["quantity"])) { $productByCode = $db_handle->runQuery("SELECT * FROM products WHERE product_code='" . $_GET["product_code"] . "'"); $itemArray = array($productByCode[0]["product_code"]=>array('product_name'=>$productByCode[0]["product_name"], 'product_code'=>$productByCode[0]["product_code"], 'quantity'
  6. ohhhhhhhh, that second one should be an ampersand? & Edit: Yep tried and it should have been an &, thank you guys, felt like a prat when i finally saw it. whole thing works like a charm now
  7. i'm really sorry i don't get it, if you mean that one is called schoolname and the other school_page i'm aware, school_page is the shortened version of the schoolname which i use for passing variables etc rather than the long name. i tried moving the schoolname=school_page to the end of the line and it sort of worked, added a quantity of one but no other information was passed. and the array results now look like : array(1) { ["cart_item"]=> array(1) { [""]=> array(5) { ["product_name"]=> NULL ["product_code"]=> NULL ["quantity"]=> int(7) ["price"]=> NULL ["image"
  8. i thought it might be the quotes around product_code not (i think the term is ) escaping properly. tried it still no joy. <form action="student_order.php?schoolname=<?php echo $school_page; ?>?action=add&product_code=<?php echo $product_array[$key]['product_code']; ?>" method="post"> The url passes the product code http://localhost/leavers/student_order.php?schoolname=ravenswell?action=add&product_code=JH004 and the post data shows its passing the size and quantity array(2) { ["size"]=> string(1) "L" ["quantity"]=> string(1) "1" } The
  9. thanks for your reply, i'll keep that in mind while implementing it, for now only intend on using it on one page, but i guess future proofing site couldn't hurt.
  10. Hey again, Still on the same project but now doing the cart page. I've been bringing my skills up to date a lot doing this project, however, having said that I now can't figure out why my cart is not adding the items to the cart, i've checked the post data and the quantity is set to 1. Would really appreciate someone having a look at it and hopefully can see what i'm missing. you can see what it should look like (well so far lol) at here in my sandbox site. thanks again. (p.s. The parts are all over the place on the page, so thought better put whole page, sorry if shouldn
  11. thanks very much for that, i'll look into it now. Am only going to be using it for the one page, and not using wordpress just that where i thought i'd seen something like it. thanks again.
  12. Hi Not even sure if this is possible, but well here goes: We have a wholesale site where companies, organisations, clubs etc can buy products. We are setting it up so that these organisations can pick their items then our system will set up a webshop for them, they can then send the link to their employees, members to order the items that the company has chosen ahead of time. our site would be http://www.ourcompanyname.com/productpage.php?companyName=ourClient we would like if poss : http://www.ourcompanyname.com/ClientOrganisationName(either with or without the PHP exten
  13. thank you soo much, when i see the code i can follow along and know what your doing, however doing it myself from scratch is another matter all together. I really appreciate your help.
  14. thank you for your reply. once i had the original tab gallery working i looked up how to preload the first image, someone else had asked that and said this is what had worked for them so thought would give it try. obv didn't work and thought it was me. i really appreciate you taking the time to help. I've looked up about getElementsByClassName, however i'm still not sure how to call the function from the div where the main image should appear. Thought it might be something like <img id="expandedImg" style="height:450px;" onload="initMainImg();"> but well no obviously i'm
  15. I'm sorry I don't want to come across as rude, how is that comment in any way helpful? Why even bother posting such a thing? Looking at any of this for another few hours isn't gonna help me understand what went wrong. I asked for help, not someone to tell me to just stare at the code again. You think I haven't tried lots of different fixes before posting here? Can anyone please offer any real help to point me in the right direction to fix whatever i've obviously done wrong. Apparently there is something wrong with my variables, can anyone help me figure out what please.
  • 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.