Jump to content
Stef's Coding Community

WebDeveloperMike

Member
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About WebDeveloperMike

  • Rank
    New member
  1. I found the problem...and im not sure why it was a problem at all... I had to change this code: while($row = mysql_fetch_array($get_all, $con)) to this code: while($row = mysql_fetch_array($get_all)) So i took out the $con variable which was my connection. not sure why it made a difference?
  2. Yes, i use a db_connect.php as a php include file: <?php $con = mysql_connect('localhost','mikesp5_test','reggie88'); if (!$con) { die("Could not connect to MySQL Server" . mysql_error()); } // echo "Successfully connected to MySQL Server!"; $my_db = mysql_select_db("mikesp5_killer"); if (!$my_db) { die("Could not connect to database" . mysql_error()); } // echo "Successfully connected to Database!"; ?> when i remove the comment tags before the echo's they both show up. and i am able to insert data into the database. just not display it for s
  3. At this point, I have my domain (www.ijournalsometimes.com) pointing to http://www.mikespot.net/alex/'>http://www.mikespot.net/alex/ if you type in http://www.mikespot.net/alex/ - the blog works 100%. if you type in www.ijournalsometimes.com - it does not work. ?????????????????????????????????????????
  4. I built a website at www.mikespot.net/alex/ that uses php and mysql to store and display blog entries. It works 100%. I purchased a new domain (www.ijournalsometimes.com) and added an 'addon domain' to my current web hosting package - so the root folder is for my new site is public_html/ijournalsometimes.com I copy and pasted all of my files from public_html/alex/ to public_html/ijournalsometimes.com... I can connect to the MySQL server and database successfully. I can ADD blog entries successfully (Inserting data into the database)... ..but when i try to select and display dat
  5. Hi everybody, I would like to show a total dollar amount to customers with 2 decimal places, my php code is rendering things like this: $19.4 when I want it to show something like this: $19.40 - so basically just need to know how to extend it to 2 decimal places. Its probably pretty simple but i have been unsuccessful in my findings! Thanks! Mike
  6. all of the code below the header does in fact work. ive used the shopping cart with paypal sandbox and live on paypal and it works exactly the same as before I put the header function code in. Its doing what i want it to do, so im glad it works, but im just confused because i thought for sure if I put the header code in there it wouldnt work - but it did. now im curious as to why.
  7. Here is my question: Since the php engine reads code from top to bottom, why does the code below the header redirect continue to process once it has navigated away from the page? Here is my code: <?php require_once '../functions/functions.php'; header('Location: http://www.mikespot.net/PaypalShoppingCart/html/viewCart.php'); $shopping_cart = get_shopping_cart(); echo render_header(); $product_id = $_REQUEST['id']; if (product_exists($product_id)) $shopping_cart->AddItem($product_id); set_shopping_cart($shopping_cart); echo render_paypal_che
  8. Ben - thanks for the reply. How would I go about doing that? Sorry, Im still new to the game!
  9. I noticed that it only adds more items when the browser is refreshed right after an item is added to the cart because the browser's url text area says "...addToCart.php?id=TOMATOSOUP" so I believe its adding it because of that 'id=TOMATOSOUP' because when i click 'view cart' and the url is just "...addToCart.php" and I refresh the browser it does not add additional items to the cart. Just thought id post a little more to make it easier for help. thanks guys! Mike
  10. Hi everybody, I was able to complete the php shopping cart tutorial by Jon Lebensold with no problems, however, I do notice that after you add an item to your shopping cart - if you refresh the browser - it adds the item again. and if you refresh a 2nd, 3rd, or 4th time it keeps adding items to your shopping cart. Is there any way to stop it from adding items to your shopping cart when the page is refreshed? Here is a link to the finished shopping cart: http://www.mikespot.net/PaypalShoppingCart/html/index.php Thank in advance for help. Mike Bostone
×
×
  • Create New...