Jump to content
Larry Ullman's Book Forums

jayLim

Members
  • Posts

    31
  • Joined

  • Last visited

jayLim's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi! The unzip file has a name of sdk-php-master, and AuthorizeNet.php file is missing.
  2. Hello Forum! In chapter 10 when I tried to open checkout.php in chrome I get this "ssl connection error" message, in safari it just shows a blank page, well I'm assuming that ssl is not enabled, so tried enabling it using MAMP PRO but still nothing. I don't know, am I missing something? J.
  3. Hello! In chapter 6 "Testing the Site", after I click the paypal subscription button, I get this error message : Error Detected PayPal cannot process this transaction because of a problem with the seller's website. Please contact the seller directly to resolve this problem. I've tried using different test accounts and I get the same thing. Here are the codes for the paypal button: echo '<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="FDN9DZRLVBQRL"> <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>';
  4. Ok, that was a bit unclear. When I first enter the main home page (index.php), I see all the content and in the sidebar there is the login form which I get ask to type the email address and password in order to login, I have no problem with that. Once I am logged in I can navigate the site with no issue at all, but when I click the Home tab (which takes me to index.php) in the nav bar, the login form would show once again even though I was already logged in. What I am guessing is that it logged me out, because I don't see Account and Admin since the user has to be either an admin or a normal user to see those tabs. J.
  5. Ok, I figured it out, pdfs folder was missing in ex1 folder. cheers!
  6. Hello Forum! Is anyone else getting this kind of message when uploading a pdf file? An error occured in script '/Users/jlim/Website/effortless_ecommerce_2nd/ex1_exercise/html/add_pdf.php' on line 42: move_uploaded_file(/Users/jlim/Website/effortless_ecommerce_2nd/ex1_exercise/pdfs/8186af9a73f8c66e321ef0062bddd5b0848a7cc95354042444b3e6.27501040_tmp): failed to open stream: No such file or directory Array( [0] => Array ( [function] => my_error_handler [args] => Array ( ... thanks J.
  7. Hello Forum! I have no problem logging in and navigating the site, but the moment I click the Home tab (index.php) in the navigation bar, the page just logs out, the other tabs such as Accounts and Admin goes away and the page asks me again to login. I mean I should be able normally go through the site as a logged in member, right? thanks. J.
  8. Ok got it! problem fixed, $_SESSION = array(); was missing in index.php thank you!
  9. Well, I'm using session, already checked the codes and everything looks fine to me and still no luck. lol.
  10. I still get the same result even when I tried it using the original files! It keeps logging me in without email address and password, and no error messages like 'Please enter a valid email address!' or Please enter your password!'
  11. Hello Forum! I realized something strange, why does my login form gets logged in without for me actually typing in an Email Address and Password, in other words when I leave the form empty and press the login button, for some reason it takes me to index.php welcoming page. The form also logs in when I type some random email address and password, therefore I don't see any error messages whatsoever such as "Please enter a valid email address!". I have no problem with the registration form, changing a new password and logging out. I'm sure all the codes are fine. By the way I am using MAMP to test the pages out. Thanks. J.
  12. Ok, I spotted the problem! By carefully going over the codes I realized I had only one parenthesis in the while loop: while($row = mysqli_fetch_array($r, MYSQLI_NUM) { the code should go like this : while($row = mysqli_fetch_array($r, MYSQLI_NUM) ) { it's all about details! thanks everyone! J.
  13. <?php require('./includes/config.inc.php'); redirect_invalid_user('user_admin'); require(MYSQL); $page_title = 'Add a Site Content Page'; include('./includes/header.html'); $add_page_errors = array(); if($_SERVER['REQUEST_METHOD'] === 'POST') { if(!empty($_POST['title'])) { $t = ecape_data(strip_tags($_POST['title']), $dbc); } else { $add_page_errors['title'] = 'Please enter thre title!'; } if(filter_var($_POST['category'], FILTER_VALIDATE_INT, array('min_range' => 1))) { $cat = $_POST['category']; } else {// No category selected. $add_page_errors['category'] = 'Please select a category!'; } if(!empty($_POST['description'])) { $d = escape_data(strip_tags($_POST['description']), $dbc); } else { $add_page_errors['description'] = 'Please select the description!'; } if(!empty($_POST['content'])) { $allowed = '<div><p><span><br><a><img><h1><h2><h3><h4><ul><ol><li><blockquote>'; $c = escape_data(strip_tags($_POST['content'], $allowed), $dbc); } else { $add_page_errors['content'] = 'Please enter the content!'; } if(empty($add_page_errors)) { $q = "INSERT INTO pages(categories_id, title, description, content) VALUES($cat, '$t', '$d', '$c')"; $r = mysqli_query($dbc, $q); if(mysqli_affected_rows($dbc) === 1) { echo '<div class="alert alert-success"><h3>The page has been added!</h3></div>'; $_POST = array(); } else {//If it did not run ok. trigger_error('The page could not be added due to a system error. We apologize for any inconvenience.'); } }//End of $add_page_errors if. } //End fothe main form submission conditional. require('includes/form_functions.inc.php'); ?> <h1>Add a Site Content Page</h1> <form action="add_page.php" method="post" accept-charset="utf-8"> <fieldset><legend>Fill out the form to add a page of content:</legend> <?php create_form_input('title', 'text', 'Title', $add_page_errors); echo '<div class="form-group'; if(array_key_exists('category', $add_page_errors)) echo ' has-error'; echo '"><label for="category" class="control-label">Category</label> <select name="category" class="form-control"> <option>Select One</option>'; $q = "SELECT id, category FROM categories ORDER BY category ASC"; $r = mysqli_query($dbc, $q); while($row = mysqli_fetch_array($r, MYSQLI_NUM) { echo "<option value=\"$row[0]\""; if(isset($_POST['category']) && ($_POST['category'] == $row[0])) echo ' selected="selected"'; echo ">$row[1]</option>\n"; } echo '</select>'; if(array_key_exists('category', $add_page_errors)) echo '<span class="help-block">' . $add_page_errors['category'] . '</span>'; echo '</div>'; create_form_input('description', 'textarea', 'Description', $add_page_errors); create_form_input('content', 'textarea', 'Content', $add_page_errors); ?> <input type="submit" name="submit_button" value="Add This Page" id="submit_button" class="btn btn-default"> </fieldset> </form> <?php include('./includes/footer.html'); ?>
  14. OK, but as I mentioned I get the same error message using the original file. Strange.
×
×
  • Create New...