huntersj78 Posted November 7, 2009 Share Posted November 7, 2009 Ok, this is not a post trying to get advertising so please dont think that. I produce music in Japan and recently my programmer has moved on to bigger and better things. I am just a wanna-be programmer but pretty quick at picking up on the tricks of the trade through reading how-to for dummies manuals. Here is the site www.dmj.fm/order/ You can add to the cart, change the number of items (except for zero(I havent figured that out yet)), delete all items, but since I have added new items. The very top CD won't delete like the other items will. It will delete if I click all but not if I check the box and press delete. Now this is in Japanese so it might be hard to figure out then again might not. The buttons after selecting an item (3) starting from top. Change or delete checked item. / Delete entire cart / Continue shopping. Please PHP masters help. Quote Link to comment Share on other sites More sharing options...
herghost Posted November 7, 2009 Share Posted November 7, 2009 We will need to see the code! Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 7, 2009 Share Posted November 7, 2009 its working fine for me i added the cd and deleted it Quote Link to comment Share on other sites More sharing options...
huntersj78 Posted November 7, 2009 Author Share Posted November 7, 2009 You were able to delete the cd that cost 1575? That is the only one that can be deleted with the checked box. I know you can delete it with the all delete but I want it to run like the others and respond to the removed/change checked item button. --Here is the code-- function ITEM_UP_func($_POST) {//数量変更&削除 if($_POST[Count_Album1_Re]) { $_SESSION[Count_Album1] = mb_convert_kana($_POST[Count_Album1_Re], "a","UTF-8"); } if($_POST[Count_Book1_Re]) { $_SESSION[Count_Book1] = mb_convert_kana($_POST[Count_Book1_Re], "a","UTF-8"); } if($_POST[Count_Tshirt1_Re]) { $_SESSION[Count_Tshirt1] = mb_convert_kana($_POST[Count_Tshirt1_Re], "a","UTF-8"); } if($_POST[Count_DVD1_Re]) { $_SESSION[Count_DVD1] = mb_convert_kana($_POST[Count_DVD1_Re], "a","UTF-8"); } if($_POST[Count_Poster1_Re]) { $_SESSION[Count_Poster1] = mb_convert_kana($_POST[Count_Poster1_Re], "a","UTF-8"); } if($_POST[Count_CD1_Re]) { $_SESSION[Count_CD1] = mb_convert_kana($_POST[Count_CD1_Re], "a","UTF-8"); } if($_POST[Count_CD2_Re]) { $_SESSION[Count_CD2] = mb_convert_kana($_POST[Count_CD2_Re], "a","UTF-8"); } if($_POST[Count_CD3_Re]) { $_SESSION[Count_CD3] = mb_convert_kana($_POST[Count_CD3_Re], "a","UTF-8"); } if($_POST[Count_CD4_Re]) { $_SESSION[Count_CD4] = mb_convert_kana($_POST[Count_CD4_Re], "a","UTF-8"); } if($_POST[Count_CD5_Re]) { $_SESSION[Count_CD5] = mb_convert_kana($_POST[Count_CD5_Re], "a","UTF-8"); } if($_POST[Count_ballpen_Re]) { $_SESSION[Count_ballpen] = mb_convert_kana($_POST[Count_ballpen_Re], "a","UTF-8"); } if($_POST[Count_diary_Re]) { $_SESSION[Count_diary] = mb_convert_kana($_POST[Count_diary_Re], "a","UTF-8"); } if($_POST[Count_Album2_Re]) { $_SESSION[Count_Album2] = mb_convert_kana($_POST[Count_Album2_Re], "a","UTF-8"); } if($_POST[DELETE_ALBUM_1]) { unset($_SESSION[item_Album1]); unset($_SESSION[Price_Album1]); unset($_SESSION[Count_Album1]); unset($_SESSION[TotalPrice_Album1]); } if($_POST[DELETE_BOOK_1]) { unset($_SESSION[item_Book1]); unset($_SESSION[Price_Book1]); unset($_SESSION[Count_Book1]); unset($_SESSION[TotalPrice_Book1]); } if($_POST[DELETE_TSHIRT_1]) { unset($_SESSION[item_Tshirt1]); unset($_SESSION[Price_Tshirt1]); unset($_SESSION[Count_Tshirt1]); unset($_SESSION[TotalPrice_Tshirt1]); } if($_POST[DELETE_DVD_1]) { unset($_SESSION[item_DVD1]); unset($_SESSION[Price_DVD1]); unset($_SESSION[Count_DVD1]); unset($_SESSION[TotalPrice_DVD1]); } if($_POST[DELETE_POSTER_1]) { unset($_SESSION[item_Poster1]); unset($_SESSION[Price_Poster1]); unset($_SESSION[Count_Poster1]); unset($_SESSION[TotalPrice_Poster1]);} if($_POST[DELETE_CD_1]) { unset($_SESSION[item_CD1]); unset($_SESSION[Price_CD1]); unset($_SESSION[Count_CD1]); unset($_SESSION[TotalPrice_CD1]); } if($_POST[DELETE_CD_2]) { unset($_SESSION[item_CD2]); unset($_SESSION[Price_CD2]); unset($_SESSION[Count_CD2]); unset($_SESSION[TotalPrice_CD2]); } if($_POST[DELETE_CD_3]) { unset($_SESSION[item_CD3]); unset($_SESSION[Price_CD3]); unset($_SESSION[Count_CD3]); unset($_SESSION[TotalPrice_CD3]); } if($_POST[DELETE_CD_4]) { unset($_SESSION[item_CD4]); unset($_SESSION[Price_CD4]); unset($_SESSION[Count_CD4]); unset($_SESSION[TotalPrice_CD4]); } if($_POST[DELETE_CD_5]) { unset($_SESSION[item_CD5]); unset($_SESSION[Price_CD5]); unset($_SESSION[Count_CD5]); unset($_SESSION[TotalPrice_CD5]); } if($_POST[DELETE_ballpen]) { unset($_SESSION[item_ballpen]); unset($_SESSION[Price_ballpen]); unset($_SESSION[Count_ballpen]); unset($_SESSION[TotalPrice_ballpen]); } if($_POST[DELETE_diary]) { unset($_SESSION[item_diary]); unset($_SESSION[Price_diary]); unset($_SESSION[Count_diary]); unset($_SESSION[TotalPrice_diary]); } if($_POST[DELETE_ALBUM_2]) { unset($_SESSION[item_Album2]); unset($_SESSION[Price_Album2]); unset($_SESSION[Count_Album2]); unset($_SESSION[TotalPrice_Album2]); } Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 7, 2009 Share Posted November 7, 2009 Your code looks fine and insync with the html Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 7, 2009 Share Posted November 7, 2009 got it this if($_POST[DELETE_ALBUM_2]) { unset($_SESSION[item_Album2]); unset($_SESSION[Price_Album2]); unset($_SESSION[Count_Album2]); unset($_SESSION[TotalPrice_Album2]); } should be if($_POST[DELETE_Album_2]) { unset($_SESSION[item_Album2]); unset($_SESSION[Price_Album2]); unset($_SESSION[Count_Album2]); unset($_SESSION[TotalPrice_Album2]); } after changing that it should work Quote Link to comment Share on other sites More sharing options...
huntersj78 Posted November 7, 2009 Author Share Posted November 7, 2009 Rajivgonsalves you are the man. Tell me your Paypal address so I can reward you. I copied and pasted and it worked, but I can tell the difference by looking at it. What did I miss? Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 7, 2009 Share Posted November 7, 2009 Hey thanks, no need for an reward for such a small thing, I am just Glad to be of help. for what you missed you mentioned the post parameter as $_POST[DELETE_ALBUM_2], I went and saw the html the checkbox name was DELETE_Album_2, so it would be posted as $_POST[DELETE_Album_2] and not $__POST[DELETE_ALBUM_2] just case difference Quote Link to comment Share on other sites More sharing options...
huntersj78 Posted November 7, 2009 Author Share Posted November 7, 2009 Problem Solved Thanks to Rajivgonsalves!!! Rajivgonsalves. I am an idiot. Or at least I feel like one now. lol. Well if you are up to helping me more in the future I would really like to pay you for your assistance even if it is something simple. Now I am trying to move some items from one domain to another which includes a database that I want to move and edit so I don't have to spend two days rewriting it from the bottom up for the new domain. The problem is I cant access my database. The password doenst work and I am trying figure a way around that. But at any rate it was really cool to meet a real deal programmer. Quote Link to comment Share on other sites More sharing options...
herghost Posted November 7, 2009 Share Posted November 7, 2009 Now I am trying to move some items from one domain to another which includes a database that I want to move and edit so I don't have to spend two days rewriting it from the bottom up for the new domain. The problem is I cant access my database. The password doenst work and I am trying figure a way around that. But at any rate it was really cool to meet a real deal programmer. what type of hosting is it on? What database management program are you using? ~(ie phpmyadmin etc) Also check if caps are on and try user root with no password Quote Link to comment Share on other sites More sharing options...
huntersj78 Posted November 7, 2009 Author Share Posted November 7, 2009 Here is the message I am getting. I am using a rented server that handles all of my files. trying to access. Warning: main() [function.main]: Unable to access ./libraries/select_lang.lib.php in /virtual/dmj/public_html/log/phpmyadmin/libraries/common.lib.php on line 152 Warning: main(./libraries/select_lang.lib.php) [function.main]: failed to open stream: No such file or directory in /virtual/dmj/public_html/log/phpmyadmin/libraries/common.lib.php on line 152 Fatal error: main() [function.require]: Failed opening required './libraries/select_lang.lib.php' (include_path='.:/usr/local/lib/php') in /virtual/dmj/public_html/log/phpmyadmin/libraries/common.lib.php on line 152 Quote Link to comment Share on other sites More sharing options...
herghost Posted November 7, 2009 Share Posted November 7, 2009 hmm, I would contact your host and ask them to look into that one for you, it may be a case of nothing you will be avle to do, ask them to reset your access. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.