DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Shopping Cart  
DwZone Forum Index -> Shopping Cart
.
Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 11 to 20 of 50 (Total: 50) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re: Shopping Store Demo question  
View this persons public profile  Gianluigi   11:24 27 Apr 2018  
    MySqli Demo Store Connections/Shop.php suggestion  
View this persons public profile  JarrellHill   9:50 21 Apr 2018  
 
The Mysqli connections shop folder works great. However I suggest making changes. Add the variable you created $database_shop to
last parameter in the $shop connection string. Don't leave it as open quotes! People may not know to add the name of database to last parameter!

<?php
ob_start();

# FileName="Connection_php_mysql.htm"
# Type="MYSQLi"
# HTTP="true"
$hostname_shop = " ";
$database_shop = "shopping";
$username_shop = " ";
$password_shop = " ";
$shop = new mysqli($hostname_shop, $username_shop, $password_shop, " ") <---- ADD THE VARIABLE "$database_shop" for last parameter not double quotes in this area or people may get confused )
if ($shop->connect_errno) {
echo "Failed to connect to MySQL: (" . $shop->connect_errno . ") " . $shop->connect_error;
exit();
}
?>
<?php
if(!isset($_SESSION)){
session_start();
}
?>

Update demo store connection shop.php to this:

<?php
ob_start();

# FileName="Connection_php_mysql.htm"
# Type="MYSQLi"
# HTTP="true"
$hostname_shop = " ";
$database_shop = "shopping";
$username_shop = " ";
$password_shop = " ";
$shop = new mysqli($hostname_shop, $username_shop, $password_shop, $database_shop);
if ($shop->connect_errno) {
echo "Failed to connect to MySQL: (" . $shop->connect_errno . ") " . $shop->connect_error;
exit();
}
?>
<?php
if(!isset($_SESSION)){
session_start();
}
?>

Jay Hill
 
Reply to this current thread  View this persons public profile  Send Private Message
   Re: MySqli Demo Store Connections/Shop.php suggestion  
View this persons public profile  Gianluigi   2:35 22 Apr 2018  
   Errors in new Mysqli Demo Store  
View this persons public profile  JarrellHill   9:39 20 Apr 2018  
   Re: Errors in new Mysqli Demo Store  
View this persons public profile  Gianluigi   7:38 21 Apr 2018  
   Re: Errors in new Mysqli Demo Store  
View this persons public profile  JarrellHill   8:45 21 Apr 2018  
   Re: Errors in new Mysqli Demo Store  
View this persons public profile  Gianluigi   2:36 22 Apr 2018  
   Shopping Cart Question Shopping -> Admin -> Upload -> Saveimage / uploadimage  
View this persons public profile  JarrellHill   9:17 8 Mar 2018  
   Re: Shopping Cart Question Shopping -> Admin -> Upload -> Saveimage / uploadimage  
View this persons public profile  Gianluigi   10:09 9 Mar 2018  
   MySQLi compatible version of Demo Site?  
View this persons public profile  JarrellHill   7:07 7 Mar 2018  
Last Visit: Friday 19 Apr, 2024 9:49 am First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-2

Jump to: