Jump to content
Larry Ullman's Book Forums

Duke

Members
  • Content Count

    52
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Duke

  1. Greetings, Are there still plans for an updated 5 th edition still in the works? If yes, is there an estimated release date? Thank you David
  2. Here is what I did... I added a value into the url link to the rss feed script. (rss.php?x=somevalue). The rss.php script checks the value in the url using if(isset($_GET['x'])) against a value in the database. (Learned this in a book by Larry Ullman). Also checks out as valid rss when submitted to feedvaliator.com. Do not need it to be super secure. Thank you David
  3. Is there a way to use $_SESSIONS in a rss feed? When I add $_SESSION, the feedvalidator.com says the script is not a valid feed..Should I ignore this and jut use it with the $_SESSION? Thx
  4. I did something similiar..I used cookies and set the pictures to change based on time. I used an if (isset($_COOKIE['picture'])) { display pix 1 }else{ display pix 2 } I am thinking there is a better way using javascript....
  5. Your Welcome...What are your thoughts on the second question....Even with minor changes....Can we actually use the finished sites live or are there copyright issues?
  6. No...only his PHP books....would this book be helpful to me in your opinion?
  7. Hi Larry. I have read and performed the exercises for 3 of your books. Subject on all is PHP. -I have learned a lot thank you- In all -that I can remember-javascript is not used for form inputs-adding data to a MySql table-The closest I found/can remember is in PHP and MySql for Dynamic Web Sites-chp 15 - a login form that uses jQuery. Have you written any books that use javascript/jQuery form input , ajax for adding data to a MySql table and validating the data ? When we create a site ie Message board in PHP and MySql For Dynamic Websites , or the 2 sites in Effortless ecommerce...Can we
  8. I made changes in my ipn.php script ....It seems to be working now My changes: Page170 step 2 Book uses : if (($_SERVER['REQUEST_METHOD'] === 'POST') && isset($_POST['txn_id']) && ($_POST['txn_type'] === 'web_accept') ) I used: if (($_SERVER['REQUEST_METHOD'] === 'POST') && isset($_POST['txn_id']) && ($_POST['txn_type'] === 'subscr_payment') ) Page172 step 8 Book uses: if ($status === 200 && $response === 'SUCCESS') I used: if ($status === 200 && $response === 'VERIFIED') Page172 step 9 Book uses: && ($_POST['mc_gross'] === 10.00)
  9. I just wanted to put this out there in case it helps anyone ... (I am using PHP 5.5) For the login.inc.php script on Page 99 , step 9 In the book the row is: if ($row['expired'] === 1) $_SESSION['user_not_expired'] = true; The above line was not working for me so I used this: if ($row['expired'] === '1') $_SESSION['user_not_expired'] = true;...( I added single quotes around 1) This will also will work work: if ($row['expired'] ==1) $_SESSION['user_not_expired'] = true;...(use double ==) Thank you David
  10. Dave .info from index.php displays on my page also..only diff is on logout.php a message displays ..Loggged out ect....I am just guessing but maybe you have an error in your logout.php script...
  11. Larry, Hi...I used your solution...working great...Many Thanks....
  12. Hey Larry.. many thanks for the quick response....Error message == A System error occurred. We apologize for the inconvenience. Everything else seems to be working..except for the error message.....I did notice that on stripe dashboard...CVC Check is showing Failed... Only diff in my code is the email below... I am leaving this blank... Stripe:: setApiKey(STRIPE_PRIVATE_KEY); $email = ''; $customer = Stripe_Customer::create(array( 'description' => "Customer $email", 'email' => $email, 'card' => $token, 'plan' => 'kip_basic' )); Ahhh do not worr
  13. RE: Page 518 Capturing charges and the download script stripe_capture.php Should this script work as it is written in book and download? my code below: ------------------- require_once('../includes/lib/Stripe.php'); Stripe:: setApiKey(STRIPE_PRIVATE_KEY); $charge = Stripe_Charge::retrieve($charge_id); $charge->capture(); <<<<<<<<<<<This line is not working -------------------- When I echo out the charge_id from the database the value = the value in the charges table. I just performed a live purchase. Then went to stripe website and verifi
  14. AAhhh..Many thanks Larry...I am going to try your solution...
  15. I believe my issue has to do with my hosting. I found this. I am not that tech savey so not sure. I also tried using MD5 ..same issue. I hard coded the hash from the url into the query ie... WHERE o.id=? AND 'url hash'=?';.......this works. also hard coded email address for order....and changed query to ...AND c.email=?...this works...... and of course using customer_id works.... Everything seems to work until I use sha1 or md5....My only fix is to go back and add a column to orders called email_hash and create the hash in the php when the order is added to the customers table....
  16. Yes Larry you understand correctly... Yes I was thinking using primary key or any information from database in URL is not too cool....If I change either the x or y in the url the page will display: -------------------------------------------------- OOpps! Error!This page has been accessed in error. ----------------------------------------------------- maybe I should add a header redirection and exit(); Thank you for your interest in this thread.....
  17. I think this error is caused by an error in the sql query. Maybe try running the query in phpMyAdmin ...If it works..then maybe error is in your php script...for me it is usually that my query in the php script has the error.....Hope this helps..I am a newbie also...
  18. Larry, Thank you for checking. So far it is working fine. If I find this not working I will post here. I am not sure on how secure this is.
  19. In keeping with what I am using in this topic.. in chapter 13 page 423.... I changed the query as follows(need to change in 2 places originally............INNER JOIN customers AS c ON (o.customer_id = c.id) I changed to .....INNER JOIN customers AS c ON (o.customer_id = c.customer_id) Thank you
  20. For some reason sha1() not working in my query on page 423 Here is what I did.. In chapter 10 I used http://www.larryullman.com/forums/index.php?/topic/3373-chapter-10-checkoutphp/ in chapter 13 I am not verifying the correct email address in the query on page 423... I am verifying the customer_id that is set in checkout.php I am setting a session y using customer_id value then on final.php I am using this session in the url-not sha1(email). on receipt.php I changed the IF statement that validates required parameter-page 422 step 3 I then changed the query-page 423 to check y which
  21. Chapter 13 page 421 creating a receipt page.... Wondering if anyone else had this issue or if anyone can recommend a work around... For the query to grab the order info .. this is not working "SHA1(email)=?".. I have echo out $email_hash and and I have echo out echo sha1(email address in the order)....they are the same... I am wondering if there is a mysqli issue when using sha1?
  22. using the above work around....in chapter 11.... for view_orders.php script I changed the query to $q = 'SELECT o.id, FORMAT(total/100, 2) AS total, c.customer_id AS cid, CONCAT(last_name, ",", first_name) AS name, city, state,zip, COUNT(oc.id) AS items FROM orders AS o LEFT OUTER JOIN order_contents AS oc ON (oc.order_id=o.id AND oc.ship_date IS NULL) JOIN customers AS c ON (o.customer_id = c.customer_id) JOIN transactions AS t ON (t.order_id=o.id AND t.response_code=1) GROUP BY o.id DESC'; for the view_order.php script I chan
×
×
  • Create New...