Jump to content
Larry Ullman's Book Forums

daviddawn

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by daviddawn

  1. You can also create your own SSL certificate and sign it off for the browser to accept, a simple search on google will give you a tutorial to complete this task. Regards
  2. Hi Niel, Try changing your .site-content class selector in your css style sheet from "padding: 50px 0;" to "padding: 50px;". Your selector defined rules for above and below your element, not the left or right. for quick and informative tutorials on css visit https://www.htmldog.com/references/css/properties/padding/ regards
  3. Glad to hear you got it sorted! As a side note, when developing its good to test your site on 4 -5 different browsers (Firefox being my favorite) as they all behave differently, most noticeably IE. Nice color theme by the way !
  4. Hi, I have tested the site live and its all working my end. It may be obvious but your cache on your browser may be causing this, clear your browser cache and try another browser, also, are you testing locally or on the live site ? Regards David
  5. HI, "The links look EXACTLY the same to the other links in the drop down menu (dynamically created)." can you provide the php code for this ? Regards David
  6. HI, I Believe it would be much better in downloading wamp on your computer to work in a web developing environment before hosting on a live web server as you will likely be vulnerable to many attacks due to not having solid code in place. Also it's free and therefore a much cheaper option. David
  7. HI Cynthie, http ( Hypertext Transfer Protocol ) is the technology that delivers the html ( Hyper text markup language). so, you would write the source for the image using the img tag in html, then use the php fuction include to include that html file. do you have sound knowledge of html ?
  8. HI Cynthie, what software are you using to open the zip download and what operating system, winrar for windows operating system is a good program to use. once downloaded the code will be in the file named 'sql.sql' as its a sql file you can simply import it into a database using phpmyadmin facilitating the process opposed to copy and pasting each manually.
  9. but that's only if i store the $_SESSION variable into a column into a table in the database, for example, if i had a table called "cartdata" could i not do this ? INSERT INTO cartdata (customer_id, user_session_id, sku, quantity) VALUES ($_SESSION['cid'], $_SESSION['uid'], $_GET['product_sku'], 1) before i run the query, i would check to see if customer_id is set, if not, i will use user_session_id, however the table will encounter null values in some columns due to this, so i was thinking of making a seperate table for guests. what your thoughts?
  10. thanks for the reply Larry, to save the session data i will save it to a database table, and save that session data assigned to a user id which would of course be of a registered user, but how would i save session data for just a guest ? create a separate table for just guests? thanks!
  11. HI Larry, what i am trying to achieve is a common approach of allowing a user to checkout without being a registered member as the example does, however i want to implement a registration system in the site, and know the best way of holding data in a cookie or session and knowing the best time to switch the data over from the cookie to the session. Should i start the session on every page and when a user logs in just add user_id to the session and delete it when they log out? or use cookies only until a user logs in or a non-user reaches the checkout page ? one more thing, how can i setup an area where a non user could check or track their order? thank you!
  12. Glad its working for you buddy, however, line 87 "} // End of the create_form_input() function." is not all one comment, the curly brace is still interpreted by php but the text that follows the forward slash's "//" is read as a comment. regards
  13. i think you are including the same file twice, please check lines 13 and 87, also change to require_once rather than include.
  14. at the very start of the script you are missing an angle bracket ' < ' i dont know whether this was just a mistake in your posting or in the script, is the page throwing back any errors ?
  15. HI Zie, welcome to the forum, you have not give much info for others to help you out, please post the code you are using so we can see where you have gone wrong regards
  16. HI Larry, in example 2, cookies are used when a user first visits the site, however the session starts at checkout, would it not be best to use cookies and sessions only to avoid superfluous build up of frivolous data in the database? if i were to have 2 tables, USERS for my registered users and CUSTOMERS data for any customer to make a purchase as a guest and just tie that data to either a user id if the user is registered with a user id set in session, or customer id if the user is not registered and is only checking out as a guest, this way if the user some how managed to alter the session id inside the cookie on their browser, the worst thing that could happen would be that no items would be set in the cart but a new session would start with the id the user altered. did you get all that ? hope so cheers
  17. the code you should be using is on page 111, in which a select tag is created, and then a query is made to the database to retrieve all categories, the query results are then transfered into the array ( select name="category[]" ) which will look like 0 ->hats 1 ->gloves 2 -> socks etc... the select tag prints these categories, in your case it seems there is no items in the categories array, somewhere in your code add trigger_error(database_connection_variable); then look for the categories array to check if its empty.
  18. seems you are right, for the 1st example it only includes code to create the tables not populate them, however saying that it should be easier enough to do yourself via phpmyadmin, just add the categories pertinent to what you are trying to achieve. regards
  19. HI All, Im a little confused as to the best way to approach the dealings with sessions when checking out, logging in, and logging out, in example 1, larry starts the session in the config which is included in every page to help follow the user, in example 2 however, only cookkies are used until the checkout process, now what i am wanting to do is implement user registration on ecommerce which allows users to login and complete checkout but also give the option to checkout as a guest, without the user being registered, my question is, whats the best way to track users? as logging in starts the session and logging out destroys the session, so if a user logs out will all items in cart be empty ? im bascially trying to implement both examples in the book, any help or input would be much appreciated. thanks guys!
  20. HI, is your setup local? do you have wamp setup? the download code from larry's website includes a sql file which you should import into your database which will automatically populate the tables. regards
  21. I Figured it out! Don't use an argument name "sku" when passing to a stored procedure, which is the same name as a column "sku" in the database. little mistakes !!!
  22. HI All, been stuck on this for some time now, I rearranged my database by replacing the "product_type" and "product_id" columns for a "sku" column and altered the stored procedure to accept the "sku" and "uid" arguments, I also corrected the scripts to send these arguments to the stored procedures respectivley. however rather than a new seperate product being added it just adds another to the quantity with an increment of 1, i can see all the different sku numbers for different products in the url, but not sure why the stored procedure is not accepting this! any help would be appreciated! many thanks :@)
  23. HI People, if i were to show customers details of a product selected from a catalog, would i carry variables from the previous query used to retrieve all products from the database to show on the catalog, or would i simply need to create a new query to retrieve the details for that product? Little confused as most of the details i need, name, image and description were already retrieved for the catalog however i do need to retrieve some additional info for the product as in sizes and colors, but unsure of best way for doing so. many thanks
×
×
  • Create New...