gregan
Members-
Posts
8 -
Joined
-
Last visited
Everything posted by gregan
-
Stored Procedures To Standard Php/Sql Error
gregan replied to gregan's topic in Effortless E-Commerce with PHP and MySQL
ahhh yes, it looks like that was incorrect in the post. Thanks for the response i'll test that out tonight and see how it works. Greg -
In reference to... http://www.larryullman.com/2010/12/28/rewriting-the-e-commerce-stored-procedures-with-standard-php-mysql-3-chapter-10/ $r = mysqli_query($dbc, "CALL add_customer('$e', '$fn', '$ln', '$a1', '$a2', '$c', '$s', $z, $p, @cid)"); // Confirm that it worked: if ($r) { // Retrieve the customer ID: $r = mysqli_query($dbc, 'SELECT @cid'); if (mysqli_num_rows($r) == 1) { list($_SESSION['customer_id']) = mysqli_fetch_array($r); with $r = mysqli_query($dbc, "INSERT INTO customers VALUES (NULL, '$e', '$fn', '$ln', '$a1', '$a2', '$c', '$s', $z, $p, NOW())"); // Confirm that it worked: if (mysqli_num_rows($r) == 1) { // Retrieve the customer ID: $_SESSION['customer_id'] = mysqli_insert_id($r); I did the replace, and also noticed you must comment out a } after the exit(); Following correcting that error, I continuously am getting the following error An error occurred in script '/home/paintedb/public_html/checkout.php' on line 145: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given Line 145 consists of the replacement mysqli_num_rows instructed to change if (mysqli_num_rows($r) == 1) { I also am getting an error on line 161 trigger_error('Your order could not be processed due to a system error. We apologize for the inconvenience.'); Any advice would be appreciated. Greg Server info Apache version 2.2.17 PHP version 5.2.16 MySQL version 5.1.52 Architecture i686 Operating system linux
-
Web Hosting Recommendation
gregan replied to loie's topic in Effortless E-Commerce with PHP and MySQL
I have been very happy with HostGator -
Hoping to attempt paypal integration into coffee site #2 tonight or tomorrow, i'll let you guys know how it goes with results! Greg
-
Site #2 - Htaccess Issues
gregan replied to gregan's topic in Effortless E-Commerce with PHP and MySQL
Ugh, I figured out my entire problem.... I manually edited the category names in sql and named them all "Category 1" "Category 2" and "Category 3"... The reason the /browse/ was due to the htaccess file only allowing a-zA-Z and not #'s... Dumb mistake.. Thanks for the assistance and advice. Greg -
Site #2 - Htaccess Issues
gregan replied to gregan's topic in Effortless E-Commerce with PHP and MySQL
Hey, I have been reading the other posts on the forum, and came across one that suggested adding Options -MultiViews to the .htaccess, but didnt have any luck. Alright i currently have.htaccess uploaded to the /home/paintedb/ and /home/paintedb/public_html/ directories. php info server settings Apache version 2.2.17 PHP version 5.2.16 MySQL version 5.1.52 Architecture i686 Operating system linux Thanks, Greg -
Site #2 - Htaccess Issues
gregan replied to gregan's topic in Effortless E-Commerce with PHP and MySQL
And should the .htaccess be uploaded to /home/paintedb/ or /home/paintedb/public_html/ -
Hey Everybody, First post on the "new forums" I am working on implementing the e-commerce site #2 and have come across issues with the .htaccess Here are a few examples of the issues i am running into /shop/batik/ seems to work, but without any images or css... http://paintedbatiks.com/shop.php?type=batik http://paintedbatiks.com/shop/batik/ /browse/batik/Category1/1 does not work at all.... http://paintedbatiks.com/browse.php?type=batik&category=1&id=1 http://paintedbatiks.com/browse/batik/Category1/1 Here is my phpinfo phpinfo() Here is my .htaccess <IfModule mod_rewrite.c> RewriteEngine on # For sales: RewriteRule ^shop/sales/?$ sales.php # For the primary categories: RewriteRule ^shop/([A-Za-z\+]+)/?$ shop.php?type=$1 # For specific products: RewriteRule ^browse/([A-Za-z\+\-]+)/([A-Za-z\+\-]+)/([0-9]+)$ browse.php?type=$1&category=$2&id=$3 # For HTTPS pages: RewriteCond %{HTTPS} off RewriteRule ^(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L] </IfModule> Any advice would be helpful Thanks, Greg