PHP - Can I Access Boxi Sql Data Via Php ?
Hi guys,
I use LiveOffice to import BOXI (Business Objects XI) data into an Excel spreadsheet. However, I would like to also access the data via PHP, but I can't get the right syntax to connect to the database. The info I have is: Username/Password = Both Valid Web Services URL = http://myserver/pathname/directory System = SysId Authentication = Enterprise SQL Database = MyDatabase SQL Table = Mytable No matter what "string" combination I use to try and connect it just doesn't work. Does anyone have the correct format I need to use? Many thanks, Pete Similar TutorialsHello, I have been working with PHP for many years, but have avoided XML parsing - now I know why. I am having some difficultly. In the following XML example, I am trying to read domain:name and domain:reason. I have struggled for the past 3 nights. Code: [Select] <?xml version="1.0" encoding="utf-8"?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <response> <result code="1000"> <msg>Command completed successfully</msg> </result> <resData> <domain:chkData xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"> <domain:cd> <domain:name avail="0">foo.com</domain:name> <domain:reason>registered</domain:reason> </domain:cd> <domain:cd> <domain:name avail="0">foo.net</domain:name> <domain:reason>registered</domain:reason> </domain:cd> <domain:cd> <domain:name avail="0">foo.org</domain:name> <domain:reason>registered</domain:reason> </domain:cd> </domain:chkData> </resData> <trID> <svTRID>test-0000-0000</svTRID> </trID> </response> </epp> The code I am using is below. This assumes the above XML data is in a variable called $xmldata Code: [Select] $xml = new SimpleXMLElement($xmldata); foreach ($xml->response->resData as $entry){ $namespaces = $entry->getNameSpaces(true); $domain = $entry->children($namespaces['domain']); echo "Domain : " . $domain->name. "<br />"; echo "Domain : " . $domain->reason . "<br />"; } Can anyone advise where I am going wrong? Thanks in advance. I am trying in vain to access the numbers in the "sims" array using the code below, I have tried various numbers of nested foreach loops but get errors every time, can anyone help point me in the correct direction please.
Thanks
Gordon
$stock = (array(1) { ["stock"]=> array(2) { [0]=> array(2) { ["operator"]=> string(3) "ECL" ["sims"]=> array(51) { [0]=> int(8944122650438410000) [1]=> int(8944122650438409000) [2]=> int(8944122650438409000) } } [1]=> array(2) { ["operator"]=> string(2) "JT" ["sims"]=> NULL } } } ) foreach ($stock as $key1 => $item1) { foreach($item1 as $key2 => $item2) { foreach($item2 as $key => $value) { echo $value[sims] . "</br>"; } } } Hi guys, I have a for loop, that queries my database, sometimes, close to 240 times, I want to minmise the DB access - what would be ideal is if I can query a result set, such as this.. Code: [Select] $result = mysql_query($sql,$con); Is it possible for me to now run a query on $result. Such as Code: [Select] select * from sometable where age >= '24' So, rather than access the DB over and over again, I just query the result set, which will be much faster. Any ideas on this one guys? Cheers Zain Hello I have included a simple login system into my website. When a user logs in, a session is started and he stays connected throughout the whole website until logging out again. The user logs in via his e-mailaddress and a password, which are stored in a mysql database. Now I want to add a page on which a user that is logged in, can see and edit his own information (password, cellphone number, e-mail, etc.). Or easier: instead of showing "Welcome!" showing "Welcome, John!". I thought about storing the e-mailaddress into the session, and then trying to access it to select the correct record (to edit afterwards). But so far, I haven't booked any success. I have to say that this is the first time I'm working with sessions as well, so this is very new to me. Thank you in advance for any help! Okay, On my original problem, I have been able to authenticate with the web service login service, and extract a cookie as follows from the web-service: $s_Cookie = $agLoginService->agGetCookie(); $s_Cookie = AGSESSION=oxhbjcKtPw5sOymAD8m8KcKR6JL4i+TIE5mZxwOrXLwCRr8iTOvPxA==; Now, I create data access soapclient: $agDataService = new SoapClient($s_DataURL, $a_SoapOptions); //yes I know I should build my own class wrapper around soapClient, but I am trying to make sure I know what to build before I do next in the process I need to set the cookie for the data access service. I tried using: <b>$agDataService->__setCookie('cookie', $s_Cookie);</b> but I don't think it's right because when I call any of the service's functions, I get no data back. This is what their engineer had to say ( he is no help in php at all) This is a question referring the http headers. He needs to set the cookies as given in the examples on the wiki page. The cookie is specified in a response http header as: Set-Cookie. So the http headers he got back are correct. The cookie he has to set is AGSESSION=oxhbjcKtPw5sOymAD8m8KcKR6JL4i+TIE5mZxwOrXLwCRr8iTOvPxA==; There should be an api for setting the cookie if not there is one for setting the http header. Set the http header name for the request (cookie - notice that is different than what you get back from an http response - read the rfc spec for http for all of the details) then set the value. The semi colon at the end is the delimiter for http headers (in the rfc). That is all he needs to do if he gets back some login error that means the cookies did not get set correctly. Any ideas or help will be great. Thank you. Hi, i am learning WordPress and have just started, but i have a problem....when i try to access my site i get this: Warning: Cannot modify header information - headers already sent by (output started at /home/smra9/public_html/wp-content/themes/evanescence/functions.php:6) in /home/smra9/public_html/wp-includes/pluggable.php on line 890 when i open pluggable.php and i go to the line 890 it says: header("Location: $location", true, $status); i will also copy a text from line 885 to 890 so maybe you will understand better: if ( $is_IIS ) { header("Refresh: 0;url=$location"); } else { if ( php_sapi_name() != 'cgi-fcgi' ) status_header($status); // This causes problems on IIS and some FastCGI setups header("Location: $location", true, $status); } Can anyone help me, i don't know what to do When I send values to the foreach they are not recorded in the array. $x = $getProductID; $_SESSION['pColors'] = array(); if(isset($_POST['pColors'])) { foreach($_POST['pColors'] as $colorKey => $RColors) { $_SESSION['pColors'][$colorKey] = $RColors; } } var_dump($_SESSION['pColors']); Send date with AJAX: $('.addToCart').click(function(){ $.ajax({ url:""+realLink+"cart.php", method:"POST", data:{action:action,pColors:pColors}, success:function(data){ //alert(data); } }); }); I've got data in a mySql database which is updated daily. I would like to allow webmasters to place this data in a form of a widget on their websites provided they pay for access. If not payment comes through we should be able to block access.
Any suggestions how this project would be designed?
Hello, folks. I am having a little trouble with this script. I want it to be able to read a directory, not just a file, and list all files in the directory along with their id3 tags. I can't get it to read all the files, it reads only the first file in the directory. Here, I'm posting the basic (stripped down) script, without mods or add-ons. I would appreciate any help. Thanks. Code: [Select] <?php require('error.inc.php'); require('id3.class.php'); $nome_arq = 'music.mp3'; $myId3 = new ID3($nome_arq); if ($myId3->getInfo()){ echo('<HTML>'); echo('<a href= "'.$nome_arq.'">Click to play: </a><br>'); echo('<table border=1> <tr> <td><strong>Artist</strong></td> <td><strong>Title</strong></font></div></td> <td><strong>Track</strong></font></div></td> <td><strong>Album/Year</strong></font></div></td> <td><strong>Genre</strong></font></div></td> <td><strong>Comments</strong></font></div></td> </tr> <tr> <td>'. $myId3->getArtist() . ' </td> <td>'. $myId3->getTitle() . ' </td> <td>'. $myId3->getTrack() . ' </td> <td>'. $myId3->getAlbum() . '/'.$myId3->getYear().' </td> <td>'. $myId3->getGender() . ' </td> <td>'. $myId3->tags['COMM']. ' </td> </tr> </table>'); echo('</HTML>'); }else{ echo($errors[$myId3->last_error_num]); } ?> If a client connects to a ReactPHP TLS socket server, is it possible to obtain the symmetric key from within the PHP code? Hoping it will allow me to decrypt analysis traffic between two using Wireshark. Hey Guys.
I have a class named CoreCartFunctions. In the class there is a protected property named $menu_item_id which is initialized as null.
A method named GetMenuItemId assigns the $menu_item_id its value. I have tested it out using the following, to see if a value got returned and it did
fb($menu_item_id->GetMenuItemId(), "This is the menu id");The problem is when I access the property from a different public method in the same class it dones't return anything. fb($menu_item_id->DisplayMenuItems());It only returns something when I hard code a value to it.... Not sure why this is happening. Here is my full code. Please not the example below may have some syntax errors since I just copied and paste pieces of my code, to show a quick and dirty example. class CoreCartFunctions { protected $menu_item_id = NULL; public static $items; //Equal to the a long session string protected function GetMenuItemId() { foreach (self::$items as $menu_item_id_session) { /*********************************** Get the id of the menu item item ************************************/ $this->menu_item_id = preg_match_all('/\-(.*?)\*/',$menu_item_id_session,$match_found)?$match_found[1][0]:""; // The following line shows example of above line // $menu_item_id = "12"; public function DisplayMenuItems(){ return $this->menu_item_id; // Doesn't return Item ID } } Array ( [game] => Array ( [id] => 2011012593950636050 [name] => Array ( [us] => Castlevania II: Belmont's Revenge [uk] => Castlevania II: Belmont's Revenge ) echo print_r($this->game[0]['name']) but undefined offset error. I don't want to loop through the first array either. Thanks Hi I'm after a solution to a problem I have. I'm building a small site for charity which the the client wants to email(with a url link) to say 1000 selected companies but only wants them to be able to view the site and register interest and not anyone else or if they forward the mail to a non prefered client? Any help to point me in the right direction would be good thank-you. Hi, I want to control a variable (decide whether to track click if coming from a specific site oppose to hitting the final site (destination) directly. For example: www.portal.com - this will be a management site that will redirect viewers to the the final destination based on variable info - for exmample $a=123 or $a= 567 - which would come in as www.portal.com?a=123 or www.portal.com?a=567 Note: 123 would redirect to www.abc.com?a=123 and/or 567 would redirect to www.xyz.com?a=567 with said variable(s). ------ My question is this: What is the best method to authenticate (both on) www.abc.com and/or www.xyz.com that the referred viewer came from www.portal.com? I know about the super globals (HTTP_REFERER) but want to know if there are other (more) secure method to manage this interaction between external domains /websites? Any insight on this appreciated - thanks! I'm currently learning PHP and I think I have a decent grasp of procedural programming so I'm trying to set it up a little bit and get a hang of OOP. I'm finding it a little tough going but I am making progress, the syntax and coding of it is fine but I don't quite get some theory and the best way to use it yet. It's only my third day in but I have a question relating to access modifiers. It's a simple one, but what is the point? That may sound a bit narky but I keep hearing and reading that it's good programming convention but it's never really explained why. What am I missing? I get how they work but I don't really get why to use them. I've even read that private should only be rarely used, if at all as it makes testing harder and it stops you from being able to extend your classes. I'm not against using them - I want to learn to program to the very best of my ability but I'm eager to learn what benefits it actually has. Is there a technical reason, for example? Hi guys, I am making a site where users upload files (like images, pdfs, etc) to the server. My question is, how does Facebook handle file permissions, restricting access to files uploaded to their servers based on what a user sets? Because I need to implement a similar thing and have no idea how to do it in a clean way. I have had two thoughts on storing the files 1) in a DB or 2) in a folder out of the wwwroot, which would prevent access by anyone without knowing the path (or some such) but it is the more "real" permissions implementation I am stuck on. I obviously would like to achieve this with PHP and MySQL(i). Any help is much appreciated. Cheers in advance. Hello, Supposing I have site dealing in online money transfer, how do I extend the access to users with low grade mobile phones without GPRS. I would want a user to be able to transfer money online using a just about any handset however primitive. Hello everybody , This is my first topic here and I hope I will find the solution for my problem. I want to restrict access to file (for exemple: http://www.mysite.com/files/file0000.zip) to a just a specific IP that will be read from the database. And also store all other IPs trying to access this file. Can this be done, maybe through some php and htaccess? Thank you for any help or any other ideas. This has been an ongoing issue from the start. When I try to login I enter the username and password and click login, then get taken back to the login page to reenter the same details and the second time I click login I get logged in. Now if I then log out and close window and wait a few seconds, restart again and try to log in, I get in first time. I believe this could be a session issue but I thought unsetting the unset($_SESSION['admin']); would cause the session to be lost and have to start again. I just can not get my head around what is causing it. Can anyone tell me what I might be doing wrong ? I have a redirect to originating page, so if I was to view a previous page within the admin area I have to log in and then once loggeed in it will redirect to the page I was on before. Here are my scripts.
<?php session_set_cookie_params(0, '/', '.****.com'); session_start(); error_reporting(-1); define('site_title', 'Admin '); define('pageTitle', 'Admin '); $_SESSION['loginRedirect'] = "adminCreateCampaign.php"; include("functions-for-email.php"); $checkAdminStatus = checkAdminStatus($mysqli); if(!isset($_SESSION['admin']) || $checkAdminStatus == "NOACCESS") { $_SESSION['error'] = 'You must be logged in to view that page. (el.S1)'; //$_SESSION['loginRedirect'] = "showStats.php"; //echo("You must be logged in to view that page. (el.S1)<br>"); exit; @mysqli_close($mysqli); header('Location: ' . adminFullWebAddress . '/index.php'); exit; } else { if($_SESSION['admin']['account_type'] != 'admin') { $_SESSION['error'] = 'You do not have the priviledges to view that page. (el.S2)'; @mysqli_close($mysqli); header('Location: ' . adminFullWebAddress . '/index.php'); exit; } } ?> <!DOCTYPE> <html> <head> <link href="adminstyle.css" rel="stylesheet" type="text/css" /> <title><?php echo(site_title); ?></title> </head> <body> <div id="container"> <div class="containerInner"> <div id="leftInner100"> <?php // start of leftInner ?> <?php menu(); ?> <h1 class="middleTitle">Admin </h1> <?php if(isset($thisError)) { echo '<div class="errorDiv">',$thisError,'</div>'; unset($thisError); } if(isset($thisSuccess)) { echo '<div class="successDiv">',$thisSuccess,'</div>'; unset($thisSuccess); } ?> <br><br> </div><?php // end of leftInner ?> </div><?php // end of containerInner ?> <div class="clearfix"></div> </div><?php // container ?> </body> </html> <?php @mysqli_close($mysqli); ?>
<?php session_set_cookie_params(0, '/', '.****.com'); session_start(); error_reporting(-1); include("functions.php"); $checkAdminStatus = checkAdminStatus($mysqli); //$_SESSION['loginRedirect'] = adminFullWebAddress . "/index.php"; $fromlink4 = isset($_SERVER['REMOTE_ADDR']) ? (gethostbyaddr($_SERVER['REMOTE_ADDR'])) : "empty"; $ipAddress = $_SERVER['REMOTE_ADDR']; if(isset($_POST['email'])) { $email = $_POST['email']; $email = strip_tags($email); } else { $email = ""; } if(isset($_POST['pass'])) { $password = $_POST['pass']; $pass = $_POST['pass']; } else { $pass = ""; } if(isset($_POST['login']) && trim($_POST['login']) == 'Login') { $checkEmail = db_query($mysqli, "SELECT `adminid` FROM `admins` WHERE `email` = '" . $mysqli->real_escape_string($email) . "' LIMIT 1"); $checkBanned = db_query($mysqli, "SELECT `adminid` FROM `admins` WHERE `email` = '" . $mysqli->real_escape_string($email) . "' AND `suspended` = 'Yes' LIMIT 1"); $failedLoginCounter = 0; if(!$email) { $thisError = 'Please enter your e-mail address.'; } else if(! $checkEmail->num_rows) { $thisError = 'Either the email address, password or both were not entered correctly.'; } else if(!$password) { $thisError = 'Please enter your password.'; } else if($checkBanned->num_rows) { $thisError = 'Your account has been suspended by Admin.'; } else { $password = md5($password); $checkAccount = db_query($mysqli, "SELECT * FROM `admins` WHERE `email` = '" . $mysqli->real_escape_string($email) . "' AND `password` = '" . $mysqli->real_escape_string($password) . "' LIMIT 1"); if($checkAccount->num_rows) { $saveChanges = db_query($mysqli, "UPDATE `admins` SET `lastlogindatetime` = '" . $mysqli->real_escape_string(datetimenow) . "', `lastAccessSinceLogin` = '" . $mysqli->real_escape_string(datetimenow) . "', `lastloginip` = '" . $mysqli->real_escape_string($ipAddress) . "', `failedLoginCounter` = 0 WHERE `email` = '" . $mysqli->real_escape_string($email) . "' LIMIT 1"); // set lastlogindatetime $_SESSION['admin'] = $checkAccount->fetch_assoc(); $loginRedirect = isset($_SESSION['loginRedirect']) ? $_SESSION['loginRedirect'] : ""; $_SESSION['success'] = 'You are now logged in. (ok.L2) ' . $loginRedirect; header('Location: ' . adminFullWebAddress . '/' . $loginRedirect); exit; } else { $thisError = 'Your e-mail address and/or password is incorrect.<br>If you still face issues, you can <a href="startresetpw.php">reset your password</a>'; $saveChanges = db_query($mysqli, "UPDATE `admins` SET `failedLoginCounter` = `failedLoginCounter` + 1, `lastloginfailedip` = '" . $mysqli->real_escape_string($ipAddress) . "', `lastlogindatetimeFailed` = '" . $mysqli->real_escape_string(datetimenow) . "' WHERE `email` = '" . $mysqli->real_escape_string($email) . "' LIMIT 1"); // set lastlogindatetimeFailed } } } if(!isset($_SESSION['admin'])) { define('site_title', 'Login'); define('pageTitle', 'Login'); } else { define('site_title', 'Home'); define('pageTitle', 'Home'); } ?> <!DOCTYPE> <html> <head> <link href="adminstyle.css" rel="stylesheet" type="text/css" /> <title><?php echo(site_title); ?></title> </head> <body> <div id="container"> <div class="containerInner"> <div id="leftInner100"> <?php // start of leftInner ?> <div id="mainphoto"><?php //specialMessage($mysqli); mainPageImage(""); ?></div> <div class="clear"></div><?php if(isset($_SESSION['admin'])) { menu(); } if(isset($thisError)) { echo '<div class="errorDiv">',$thisError,'</div>'; } if(isset($thisSuccess)) { echo '<div class="successDiv">',$thisSuccess,'</div>'; } unset($thisError); unset($thisSuccess); if(!isset($_SESSION['admin'])) { ?> <div style="width: 100%; margin: 0em auto; text-align: center;"> <form method="POST" action="index.php" style="width: 15em; text-align: center;"> <div class="field"> E-mail Address </div> <div class="value"> <input type="text" name="email" value="<?php if(isset($_POST['email'])) { echo $email; } ?>" style="width: 12.5em;" title="email"> </div> <div class="field"> Password<br><span style="font-size: 0.8em;"><?php if (isset($_POST['pass'])) { echo('<strong style="color: red;">'); } ?>(Please note: your password may be CaSe SeNSitIvE)<?php if (isset($_POST['pass'])) { echo('</strong>'); } ?></span> </div> <div class="value"> <input type="password" name="pass" value="" style="width: 12.5em;" title="pass"> </div> <div><br><input type="submit" name="login" value="Login"> <input type="reset" value="Clear"><br></div> </form><br> <div class="clearFloat"></div> </div> <?php } else { ?>logged in<?php } ?> <br><br> </div><?php // end of leftInner ?> </div><?php // end of containerInner ?> <div class="clearfix"></div> </div><?php // container ?> </body> </html> <?php @mysqli_close($mysqli); ?> functions.php <?php define('showOutput', 0); include("/home/****/db_login_functions.php"); define('db_table_name', 'clientList'); define('mailHost', 'mail.****.com'); define('mailUsername', 'noreply@****.com'); define('mailPW', '****'); define('bounce', 'bounce@****.com'); define('fullDomain', 'https://www.admin.****.com'); define('adminFullWebAddress', 'https://www.admin.****.com'); define('adminEmail', 'admin@****.com'); define('fromEmail', 'noreply@****.com'); define('fromName', 'DO NOT REPLY'); define('REMOTEADDR', isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''); define('PHPSELF', $_SERVER['PHP_SELF']); define('HTTPREFERER', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "not set"); define('unsub', 'https://www.****.com/unsub.php'); define('securityhash', 'abc'); // NEVER change this securityhash. date_default_timezone_set('Europe/London'); define('datetimenow', date("Y-m-d H:i:s")); /* check if user is allowed to access a certain page or not. */ function checkAdminStatus($mysqli) { $yesNo = ""; if(isset($_GET['action']) && $_GET['action'] == 'logout') { unset($_SESSION['admin']); $_SESSION['success'] = 'You have successfully logged out. (lo.1)'; header('Location: index.php'); exit; } if(isset($_SESSION['admin']) ) { // need to add in code to check if logged in for more than 1 hour, if so log out on next refresh of page. if ($_SESSION['admin']['lastAccessSinceLogin'] < date( 'Y-m-d H:i:s', strtotime("-5 minutes") )) { unset($_SESSION['admin']); $_SESSION['error'] = 'You were logged out due to no activity, please login again to view that page. (lo.2)'; header('Location: index.php'); exit; } $checkBanned = db_query($mysqli, "SELECT `adminid` FROM `admins` WHERE `email` = '" . $mysqli->real_escape_string($_SESSION['admin']['email']) . "' AND `suspended` = 'Yes' LIMIT 1"); if($checkBanned->num_rows) { $yesNo = "NOACCESS"; //$_SESSION['error'] = 'You must be logged in to view that page.'; } else { $yesNo = "ACCESS"; // if logged in, update `users`.`lastAccessSinceLogin` with current datetime. $updateLastAccessSinceLogin = db_query($mysqli, "UPDATE `admins` SET `lastAccessSinceLogin` = '" . $mysqli->real_escape_string(datetimenow) . "', `lastloginip` = '" . $mysqli->real_escape_string(REMOTEADDR) . "', `failedLoginCounter` = 0 WHERE `email` = '" . $mysqli->real_escape_string($_SESSION['admin']['email']) . "' LIMIT 1"); $_SESSION['admin']['lastAccessSinceLogin'] = datetimenow; } } return $yesNo; } function menu() { echo('<a href="index.php?action=logout">Log Out</a> '); echo(' <a href="adminCreateCampaign.php">Create Campaign</a><br><br><br>'); } ?>
.htaccess (within the admin folder) Header set Access-Control-Allow-Origin "*" RewriteEngine On RewriteCond %{HTTPS} off # First rewrite to HTTPS: # Don't put www. here. If it is already there it will be included, if not # the subsequent rule will catch it. RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Now, rewrite any request to the wrong domain to use www. # [NC] is a case-insensitive match RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ### DON'T DELETE!! Below entry is MUST for your PHP sites like wordpress,joomla and etc to work properly. suPHP_ConfigPath /home/****/php.ini .htaccess (within the root folder) Header set Access-Control-Allow-Origin "*" RewriteEngine On RewriteCond %{HTTPS} off # First rewrite to HTTPS: # Don't put www. here. If it is already there it will be included, if not # the subsequent rule will catch it. RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Now, rewrite any request to the wrong domain to use www. # [NC] is a case-insensitive match RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ### DON'T DELETE!! Below entry is MUST for your PHP sites like wordpress,joomla and etc to work properly. suPHP_ConfigPath /home/****/php.ini the php.ini file allow_url_fopen = on allow_irl_include = on date.timezone = Europe/London safe_mode = off upload_max_filesize = 20M post_max_size = 20M upload_tmp_dir = "/home/****/tmp" session.save_path = "/home/****/sessions" session.use_only_cookies = on error_reporting = E_ALL log_errors = On display_errors = Off track_errors = On error_log = "/home/****/errors.log" sendmail_from = "server@****.com"
I have just set up MAMP on my new MacBook Pro and I am having trouble getting my MySQL connection working. When I use the following code: Code: [Select] $mysqli = new mysqli('localhost', 'application', 'application', 'dorset'); if ($mysqli->connect_errno) { echo "Failed to connect to MySQL: (".$mysqli-errno.") ".$mysqli->connect_error; } I get this error: Failed to connect to MySQL: () Access denied for user 'application'@'localhost' (using password: YES) However if I use the old mysql_connect() function, it doesnt throw back any errors?! Any ideas? |