I replaced it with IP but it doesn't work….
And here the IP does not need to be somehow connected with the rest of the mysql80.r6 guest. ? I assume that the IP itself represents only websupport.sk.
Your server should have a designated IP....
The admin of the web server claims that the connection to the DB is in order, in both files that are found on the subdomain udaje.svadbamatolovka.online, the problem needs to be looked for elsewhere. So right now I'm at my wits end...
You could try:
//DATABASE DETAILS//
$DB_ADDR="";
$DB_USER="";
$DB_PASS="";
$DB_NAME="";
$DB_PORT="";
$conn = new mysqli($DB_ADDR:$DB_PORT,$DB_USER,$DB_PASS,$DB_NAME);
May also be expecting a number, not a string for the port, so also:
$DB_PORT=3314;
instead of $DB_PORT="3314";
I put the port number there.
Now, after trying a simple query:
SELECT * FROM tblCisAlkohol;
It comes down to:
The operation list to csv table cannot accept the arguments: , ["
Parse error: syntax error, unexpected token ":", expecting ")" in / data/d/6/d6ab3409-d16d-415b-84ee-48b0b7972725/svadbamatolivka.online/sub/udaje/mojequery.php on line 56
"]
Perhaps:
$DBADDRESS="mysql180.r6.websupport.sk:3314";
I found an error in the crypt on line 56...it was ":" instead of ",".
I fixed it and again Error400 Bad Request. Is it not possible to do it somehow without using the script? Replace it with some other...
Should you be using localhost
or 127.0.0.1
for your $DBADDRESS ?
Your php script is running on the same server
The problem is that multiple clients should have access to the database.
What does that have to do with it? They will all use the same server, you would need to setup different user and password for each client (if you want to)
I guess I didn't understand it...
So the db would be on my PC? I would have to install Apache... Or?
The database usually is on the same server as your php script... therefore localhost from the point of view of your php script
Taifun
When I set it up like this:
$DB_ADDRESS="127.0.0.1/mysql80.r6";
$DB_USER="ondrejruz";
$DB_PASS="Passsssssss";
$DB_NAME="dbWedding2024";
so it ended up being a mistake again.
Question: Are those parameters in $conn = new mysqli(... positional, or does the order not matter?
What would it look like if I ate e.g. "127.0.0.1:3314/dbSvadba2024" ?
All I can suggest is to try either:
//DATABASE DETAILS//
$DB_ADDR="localhost:3314";
$DB_USER="zzz";
$DB_PASS="zzz";
$DB_NAME="zzz";
$conn = new mysqli($DB_ADDR,$DB_USER,$DB_PASS,$DB_NAME);
or
//DATABASE DETAILS//
$DB_ADDR="127.0.0.1";
$DB_USER="zzz";
$DB_PASS="zzz";
$DB_NAME="zzz";
$DB_PORT=3314; // or "3314"
$conn = new mysqli($DB_ADDR,$DB_USER,$DB_PASS,$DB_NAME,$DB_PORT);
Hello.
In the php script, I added another text for every error message Bad .... and that's how I realized that it fails immediately on the first If....
if( isset($_POST['query']) && isset($_POST['key']) ){
query is: SELECT ID, Nazov FROM tblCisAlkohol;
and the SQLKEY is in the script and in the "tajomstvo" app
So I have no idea why….
Senior1954
Are you setting the secret key in your php file ?
If you believe you have a set of credentials that connect you to your database, write a simple php that returns "hello" when connected. That is the first test. If this works, you know you are connecting.
Hello.
The database connection works!
So, at my age, you just have to work step by step...
Many thanks for your patience and good advice!
Now all you have to do is write the right query in AppInventor...
Thank you again!
Senior1954
What credentials did you have to use in the end to get a connection ?
$DB_ADDR="127.0.0.1";
and the $DB_PORT
?