PHP error code
Closed
Hudaibia
Posts
1
Registration date
Thursday August 23, 2012
Status
Member
Last seen
August 23, 2012
-
Aug 23, 2012 at 07:11 AM
shoaibista Posts 8 Registration date Friday May 24, 2013 Status Member Last seen May 27, 2013 - May 24, 2013 at 11:12 AM
shoaibista Posts 8 Registration date Friday May 24, 2013 Status Member Last seen May 27, 2013 - May 24, 2013 at 11:12 AM
Related:
- PHP error code
- Battery reset code - Guide
- Network error occurred - Guide
- Samsung volume increase code - Guide
- Cs 1.6 code - Guide
- Facebook com profile php id 100010157447383 - Facebook Forum
2 responses
Bionik
Posts
4232
Registration date
Thursday August 19, 2010
Status
Moderator
Last seen
August 3, 2016
Sep 3, 2012 at 05:15 AM
Sep 3, 2012 at 05:15 AM
Hello,
You have problem with the include file named Connection.php. Verify that the path of the file is correct or directly connect to your mysql database before your sql statement.
You can use PDO to do it, here is the code;
You have problem with the include file named Connection.php. Verify that the path of the file is correct or directly connect to your mysql database before your sql statement.
You can use PDO to do it, here is the code;
<?php try { $db = new PDO('mysql:host=localhost;dbname=your_database_name', 'your_username', 'your_password'); } catch(PDOExeption $e) { die('Error connecting to the database' .$e->getMessage()); } $query="SELECT * FROM bridal_info WHERE ID=1"; $result= $db->query($query) or die (print_r($db->errorInfo())); while($person = $result->fetch()) { echo "<h3>"."Colour :" ." ". $person['Colour']."</h3>"; echo "<h3>"."Fabric :"." " .$person['Fabric']."</h3>"; echo "<h3>"."Price :". " ".$person['Price']."</h3>"; } ?>
shoaibista
Posts
8
Registration date
Friday May 24, 2013
Status
Member
Last seen
May 27, 2013
May 24, 2013 at 11:12 AM
May 24, 2013 at 11:12 AM
may be problem in ur Connection.php
mysql_select_db("test")
check this
mysql_select_db("test")
check this