Jump to content
Larry Ullman's Book Forums

DavidP

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About DavidP

  • Rank
    Newbie
  1. Yes I did... I copied and pasted the first name intending to change the copied one to last name. Thanks. Would "longtext" be considered a "blob" - "b" in prepared statements? Also, I'm using a 3 page process - form (enter information), review (go back make changes or continue), add form information into database -> make payment -> update database with Stripe payment details. The information entered into the form on the first page will be set into session variables on the review page (second page). In the prepared statement example on page 427 (chapter 13) it shows that the v
  2. So my prepared statement query would look like this: $q = 'INSERT INTO users (first_name, last_name, email, join_date) VALUES (?,?,?,NOW())';
  3. I'm practicing the prepared insert statement in Chapter 13 page 427. Is this how I would I write the prepared statement for a users table in a registration scenerio where the userid is to be assigned by auto-increment? In the bind param I would only have 3 s's and have nothing for the userid and the now()? $dbc = mysqli_connect ('localhost', 'username', 'password', 'users'); $q = 'INSERT INTO users (userid, first_name, last_name, email, join_date) VALUES ('',?,?,?,NOW())'; $stmt = mysqli_prepare($dbc, $q); mysqli_stmt_bind_param($stmt, 'sss', $first_name, $last_name, $email); $first
  4. In phpmyadmin I added these parameters: IN - email - varchar - 35 IN - pass - varchar - 40 OUT - rid - int - 11 Now I get the error message - "Incorrect number of arguments for login; expected 3, got 2". It figures...I'm not able to meet the expectations. I think I better stick with the old procedural coding style. I can get that to work most of the time.
  5. This question actually spans two books - this one and "PHP and MySQL for Dynamic Web Sites 4th Edition. I'm using the User Registration in Chapter 18 of the latter and I''m trying to convert it to using Stored Procedures, but things aren't going very well. I created this stored procedure: DELIMITER $$ CREATE PROCEDURE login() BEGIN SELECT * FROM login WHERE email='$email' AND pass=SHA('$pass'); END $$ DELIMITER ; And this Call: $r = mysqli_query($dbc, "CALL login('$email', '$pass')"); if (!$r) echo mysqli_error($dbc); if (mysqli_num_rows($r) > 0) { But I'm getting an error messa
  6. Hello again, I'm back to working on my Stripe payment processing and while I'm beginning to understand it a little bit more I need to ask a couple of questions regarding the charge attributes. I need to take some information returned from Stripe and assign it a variable to be entered into a database table. Specifically I need to know how to write a variable to get some of the charge card's child parameters. I write this to set a variable for the charge id: $charge_id = $charge->id; ...so would I write a variable like below to get the card brand and funding... $card_brand =
  7. Early in your book in the "Tip" sidebar you mentioned something to the effect that it would be better to register your domain name separate from your hosting company. Who do you use?
  8. I purchased an SSL Certificate (just to get that out of the way) and Stripe is working in test mode. I still have a couple of questions but will get to those later.
  9. Hi Larry, Yes, sorry about that. First, does my website need to be https:// in order to test Stripe? I'm trying to use the buy.php script from your online tutorial. I need to send Stripe the customer's email address so they can email them a receipt. I affirmed the "email customer a receipt" setting in Stripe. But I'm not 100% sure how to do that via the credit card form. I'm have this: <input type="hidden" name="email" value="<?php {$_SESSION['eemail']} ?>"> and this here: // Charge the order: $charge = Stripe_Charge::create(array( "amount" => $amount,
  10. I tested buy.php and it didn't work. No surprise there. Got the message: I have these javascript files in the header: <script type="text/javascript" src="https://js.stripe.com/v2/"></script> <script type="text/javascript" src="js/buy.js"></script> I also have this: // If no errors, process the order: if (empty($errors)) { // create the charge on Stripe's servers - this will charge the user's card try { // Include the Stripe library: require_once('includes/stripe/lib/Stripe.php'); All are installed.
  11. Hello, I bought the book, but I'm struggling with Stripe. I have several questions, most of which I think can be easily answered. I also read the tutorial at "http://www.larryullman.com/2012/10/10/introduction-to-stripe/" and I downloaded the codes associated with that tutorial - buy.php, buy.js, etc. In the book, the picture of the Stripe form shows inputs for the customer's first and last name, although in the form script I do not see these inputs. Same goes with the online tutorial that shows an input for the customer's email. So, I'm guessing that I have to include the email
  12. Thanks for the heads up about Stripe. I've never heaed of them but I'm on their page right now! Thanks again. Love the books Larry. I'll be getting this one soon!
  13. I have two of Larry's books and and am considering buying this book if it can help me do what I need to do. I do not have a complicated e-commerce store with many products, sizes and quantities. I have one product, one price and it's sold one at a time. I have a job board where peopel can post one job ad for $95. If they want to post another job ad they start over. I want to use PayPal's "PayPal Payments Advanced" as my payment processing. This cost $5 a month along with a transaction fee of 2.9% plus $.25-$.30. I'd like to use "PayPal Payments Advanced" because payments would be processed
×
×
  • Create New...