0

Dear firnds,
I want to upload my php Forms and database...I am using godaddy.com i have my login and pwd.... I uploaded Survey project Php files and database.please,check my conn.php file code is below

<?php
$username="mydbphp@182.50.131.34";
$password="";
$server="166.62.8.51";
$db="mydbphp";

$conn=new mysqli($server,$username,$password,$db);
if(!$conn){

echo "Connection not established";
}


?>

please, suggest me..

3
Contributors
9
Replies
66
Views
2 Years
Discussion Span
Last Post by zebnoon1
0

I'm assuming you removed the password for this post and it is being included in the actual config.
The only advice I can give is to double check what you should be passing in. In particular the db name and server. Are you sure it shouldn't be localhost or include a port number?

0

i put db name the name which is online Mysqladmin database name.that is mydbphp and online server is 166.62.8.51 ,

Server version: 5.5.37-35.0-log
Server: 166.62.8.51 via TCP/IP
User: mydbphp@182.50.131.34

error is when i online tthe page:
"Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'mydbphp@182.50.131.34'@'182.50.130.77' (using password: YES) in /home/content/62/10830362/html/test/conn.php on line 7"
yes i put my password there.

1

Access denied for user at least means you are connecting to the server. You're getting denied due to either the user name or the password. Have you tried just
$username="mydbphp";

Drop the host part. That might help. Although you create a user in mysql specifying the host it normally isn't part of the login user name.

0

yes it works... i put username=mydbphp..

Dear gabrielcastillo !
i am not on local host i want to put my application online....

0

dear friend,

reveive data from previous form but when i want to insert email in "atab"
it shows only "error".
please, guide me ....

0

please, check this code below,

        <?php
            include "conn1.php";

               if(isset($_GET['submit']) && isset($_GET['q'])){

               $answer=$_GET['q'];
               $hid=$_GET['hid'];
               $mail=$_GET['email'];

               $sqlu="UPDATE atab
               SET
               email=$mail
               $answer=$answer+1
                WHERE Qid=$hid";
               $result=$conn->query($sqlu);
               if ($result){
                   echo("user has voted");}
               else {
                 echo("Error") ;
               }

                }

            ?>



    in 

        $mail=$_GET['email'];

it shows only "error".email can not be inserted in atab.
please, guide me ....

0

I checked only Numarical data can be updated but charecter can not Updated
what is problem there?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.