ARTICLE AD BOX
Spent few hours on Google this morning reading other posts and trying things but cant get away from this error.
To give background will be an asset check using NFC tags eventually scanning tag with produce URL with item id as variable showing discretion and pat testing dates.
The database has been checked and this entry is held in this table in this database all are correct.
As advised I've edit code and results are now null not sure where to go with this next as i know data is there.
<?php // website syntax - soundmonkey-events.co.uk/assetcheck.php?item=1 // sanitize integer input $item = (int)$_GET['item']; $servername = "localhost:3306"; $username = "soundmo2_website"; $password = "[+Tg5sF4+VKXc#2j"; $dbname = "soundmo2_assets"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $sql = "SELECT id, ref, discription, patdate, id = '1' AS compareCheck FROM cables_power"; $result = mysqli_query($conn, $sql); if (!$result) { die("Query failed: " . mysqli_error($conn));} // Process the request echo var_dump($row); mysqli_close($conn); ?>response 'Connection failed: Access denied for user 'soundmo2_ashleystirland'@'localhost' (using password: YES)'
But this user has access to database not sure what's going on here.
