Jump to content
Larry Ullman's Book Forums

skybird

Members
  • Posts

    15
  • Joined

  • Last visited

skybird's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Thank you very much for your help. Margaux. Following Larry's book instruction on distance.php script, I put the post code in quotes, And It's set.!!! Have a wonderful weekend.
  2. Hi, I need your help in distance.php script. When $zip = 64154 (original zip code from Larry), the firefox browser screen shows: Nearest stores to 64154: with 3 complete store info. However, when $zip = other postcodes like: $zip= 02062 (Norwood, MA) the screen reads: Nearest stores to 1074: with 3 complete store info. My question: How to stop the postcode change on my webpage? operating system: win7 editor: dreamweave xampp1.7.3 php 5.3.1 mysql 5.1.41 Looking forward to your help.
  3. Hi Hermann, Thank you very much for your guide. My problem was solved. after reading page 270, i found the above validation code works unless there's space between the phone#. Thanks again.
  4. Hi, I want to add phone# info in registration form. But after clicking submit button, both phone# and the message (Please enter your phone number!) exist. My Q is how to remove the sticky message? Here is the code in register.php: // Check for phone#: if (preg_match ('/^[A-Z0-9]{2,30}$/i', $_POST['phone'])) { $u = mysqli_real_escape_string ($dbc, $_POST['phone']); } else { $reg_errors['phone'] = 'Please enter your phone number!'; } And the code for form in register.php: <form action="contact.php" method="post" accept-charset="utf-8" style="padding-left:100px"> <p><label for="phone"><strong>Phone Number</strong></label><br /><?php create_form_input('phone', 'text', $reg_errors); ?></p> </form> I don't make any change in form_functions.inc.php. Thanks for your kind help. xampp 1.7.3 php5.3.1 mysql 5.1.41 php<MyAdmin 3.2.4 Win7 editor: DW
  5. Thank you Jonathon for your kind guide. I searched on xampp mercury mail server threads, and found the link below fits my need: http://www.apachefriends.org/f/viewtopic.php?f=16&t=48726&p=187442&hilit=mercury+mail+server#p187442
  6. Hi Larry, I have a problem on sending email to my real email address upon completing my registration. The error message displayed upon clicking Next button : An error occurred in script 'C:\xampp\htdocs\virtual_product\register.php' on line 115: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() Array ....... I've found that after my registration, 1)the registering info can be seen in the database. 2) both login and logout are working by using the registering info. Your advice, pls. xampp 1.7.3 php 5.3.1 mysql 5.1.4.1 phpMyAdmin 3.2.4 Operating system: Window7 Editor: Dreamweaver
  7. Hi Jonathon, What a wonderful recommendation! Thank you for your kind reply.
  8. Hi Larry, Can i create search box by PHP on my product website? If yes, any of your books can help me? If no, can you recommend me where i can get the knowledge? Thanks.
  9. Larry, I'm very grateful for your time and patience to show me in such a detailed advice on debugging skill. I will try it again later. i'm now busying with curl technology required in billing.php page. Luckily I've found I'm able to learn it from your book -PHP 5 Advanced (2dn edition).
  10. Hi Larry, Seek your continued help in browse.php in Chapter8. When i remove the following from browse.php: // If there's a problem, display the error page: if (!$type || !$sp_type || !$sp_cat || !$category) { $page_title = 'Error!'; include ('/includes/header.html'); include ('/views/error.html'); include ('/includes/footer.html'); exit(); } the message in browse.php browser reads: An error occurred in script 'C:\xampp\htdocs\physical_product\browse.php' on line 47: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given line 47 in browse.php is: if (mysqli_num_rows($r) > 0) { The stored procedure is well run in my win 7 computer, I have changed nothing on stored procedure and database. What does the message above tell me? What shall i do to debug it? Thank you for your time. php 5.3 mysql 5.1 win 7 dreamweaver
  11. Hi Larry, My continued question on Error message in Browse.php Thanks for your reply. I've been trying to make browse.php happen these days. Following you advice, I put the four values of variables below before the script line: $type = "coffee"; $sp_type = "coffee"; $category = 'coffee'; $sp_cat = 'coffee'; echo $type; echo $sp_type; echo $sp_cat; echo $category; Then the message reads in the browser: coffee Unfortunately there are no products to list in this category. Please use the links at the top of the page to continue shopping. We apologize for the inconvenience. Are the variables functional in browse.php? If not, what else shall i try to debug next? Thanks for your time.
  12. Hi, Larry/All, My question on Ch 8, Coffee example. in my browser page (http://localhost/physical_product/browse/goodies/Mugs/3), error message is displayed in a box: Error! Unfortunately a system error has occurred. Please use the links at the top of the page to continue shopping. We apologize for the inconvenience. . How to solve it? Appreciate your help. stored procedure is stored successfully. PHP 5.3 Mysql 5.1 win 7 Dreamweaver
  13. Larry, Followed by your more detailed advice, finally all the images of shop/coffe page can be viewed in browser. Thank you very much for your patience and time. I'm so glad that I can move on to Chapter 9 next Monday with your kind help.
  14. Hi Larry, Thank you very much for your reply. I need your further help on the same problem. Per your advice, 1)I checked the directory structure in my computer, it's the same layout as Figure 7.5 at page 173 (htdocs/physical_product folder/images folder or products folder.) 2)i added RewriteBase /physical_product/ in .htaccess file, and index.php in firefox browser looks normal. 3) i've tried to change references(from /something to /physical_products/somethingas you suggested) shown below, but the browser reads: Object not found in coffee page: <li><a href="./physical_product/shop/coffee">Coffee</a> </li> What else can i try to overcome the structure problem? Look forward to your reply. Here is body part of the header.html script in my computer, which i made a little change from your downloadable files. <body id="page1"> <!-- header --> <div id="header"> <div class="container"> <div class="wrapper"> <ul class="top-links"> <li><a href="./index.php" class="first"> <img alt="" src="./images/icon-home.gif" /></a></li> <li><a href="./cart.php"><img alt="" src="./images/icon-cart.gif" /></a></li> <li><a href="./contact.php"><img alt="" src="./images/icon-mail.gif" /></a></li> <li><a href="./sitemap.php"><img alt="" src="./images/icon-map.gif" /></a></li> </ul> <div class="logo"> <h1><a href="./index.php">Coffee</a><span>Wouldn't you love a cup right now?</span></h1> </div> </div> <ul class="nav"> <!-- MENU --> <li><a href="./shop/coffee">Coffee</a> </li> <li><a href="./shop/goodies">Goodies</a></li> <li><a href="./shop/sales">Sales</a></li> <li><a href="./wishlist.php">Wish List</a></li> <li><a href="./cart.php">Cart</a></li> <!-- END MENU --> </ul> </div> </div> <!-- content --> <div id="content"> <div class="container"> <div class="inside">
  15. Hi Larry/everyone, greetings. When i click Coffee button in index.php, there are no images but text in the coffee page (http://localhost/physical_product/shop/coffee/), shown below: * * * * CoffeeWouldn't you love a cup right now? * Coffee * Goodies * Sales * Wish List * Cart * Dark Roast Dark RoastOur darkest, non-espresso roast, with a full flavor and a slightly bitter aftertaste. View All Dark Roast Products * Kona KonaA real treat! Kona coffee, fresh from the lush mountains of Hawaii. Smooth in flavor and perfectly roasted! View All Kona Products * Original Blend Original BlendOur original blend, featuring a quality mixture of bean and a medium roast for a rich color and smooth flavor. View All Original Blend Products © - Clever Coffee, Inc. Site designed by: Templates.com In my win 7 computer, the stored procedure are stored successfully in Mysqladmin. The images and products folders are put in root directory (htdocs) with index.php. Is there anything wrong with the PHP script in header.html? Thanks for your kind help in advance. phpmyadmin 3.2 php 5.3 mysql 5.1 editor: dreamweaver
×
×
  • Create New...