Android and mysql?

Get help using Construct 2

Post » Sun Apr 19, 2015 8:13 pm

azrail13 wrote:Image





There is an error here

"uid="&UserID&"&score="&score

You missed an & there
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Sun Apr 19, 2015 8:55 pm

I get error:
-------------
Warning: mysql_query() [function.mysql-query]: Access denied for user '3ixteam'@'localhost' (using password: NO) in /home/eponaonl/public_html/logintest/update.php on line 16

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/eponaonl/public_html/logintest/update.php on line 16
Access denied for user '3ixteam'@'localhost' (using password: NO)

------------------
with this code

----------------------------------

Code: Select all
<?php
$uid = $_POST['uid'];
$score = $_POST['score'];
$servername = "localhost";
$username = "eponaonl_admin";
$password = "****";
$dbname = "eponaonl_horse";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
$sql = "UPDATE members   SET score = $score  WHERE id = $uid ";
      $result = mysql_query($sql);
      if (!$result) {
      echo mysql_error();
      exit;
      }

$conn->close();
?>





Image
B
10
S
5
G
4
Posts: 23
Reputation: 2,923

Post » Sun Apr 19, 2015 9:15 pm

If you are sure you are using the correct password :P

You could try


Code: Select all
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}


change to

Code: Select all
   $conn = mysql_connect($servername, $username, $password);           
   if (!$conn) {
      die('Could not connect to MySQL: ' . mysql_error());
   }
   
     $result = mysql_select_db($dbname);
     if(!$result){
        echo mysql_error();
        exit;
   }





EDIT: user "3ixteam" , is not what your php file shows
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Sun Apr 19, 2015 11:19 pm

I'm not sure what that error is all about. I lokked up about 3 other errors that I got after fixing that one. Then there was ne on line 26. I commented out the connection close and it works now so I'm not sure what did it. Oh annnddd I also screwed up and chmodded the wrong file when I shouldn't have done it at all. Yep. Derp. That was just one of many issues. I wouldn't have even started to scratch the surface of what the problem was unless you guys hadn't helped me. Thanks so much. I wish I could buy you a round.
B
10
S
5
G
4
Posts: 23
Reputation: 2,923

Previous

Return to How do I....?

Who is online

Users browsing this forum: Eren, t redeemed t and 1 guest