I am totally new to using server. I set up a database using phpMyAdmin. And I’d like to write a php program, save somewhere here and test how it works with the database. But I have no idea how to start and where to save php programs. What I want to test is to handle the database from my app (on the smartphone).
Can someone help me on this? I’m sorry for the very basic question.
@TankUserDavid You can try this,
You can find database related details by going to “Manage Database” Tab.
Thanks for your reply.
I guess the sentence in your comment should be the start in php, right?
My question is more basic - where in 000webhost should I put my php program to be performed by http connection?
Yes before your actual program starts.
Place your files in “public_html”.
Log in to File Manager and upload your files.
You can find FTP login details by going to “Settings” – "General"
If your don’t know the password then reset it,
“Settings” – “General” – “FTP Password”
I will try that. Thank you so much !!!
Any issue do post i’ll leave this topic open.
I’m sorry to keep asking basic questions.
- the 1st parameter of mysqli_connect is always ‘localhost’ or ‘127.0.0.1’, no matter where i access?
- is the URL ‘http://files.000webhost.com/my_web_site/public_html/my.php’ ?
I got an error on unity editor saying UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr).
It seems something wrong with my php source. Can I see the error details anywhere in phpMyAdmin?
Can you post screenshot of your issue??
For now, I got nothing to show you. I ran a Unity program accessing a database in 000webhost.
And that error came out. This is my Unity source.
…
private string urlSave = “http://vuniverse.000webhost.com/save.score.php”;
void Awake () {
instance = this;
}
public IEnumerator SaveScore(string user_name, int kill_count) {
WWWForm form = new WWWForm();
form.AddField("user_name", user_name);
form.AddField("kill_count", kill_count);
form.AddField("seq_no", seqNo);
var www = new WWW(urlSave, form);
yield return www;
if (string.IsNullOrEmpty(www.error)) {
Debug.Log(www.text);
} else {
Debug.Log("Error : " + www.error); <======
}
}
That line shows the error.
It’s OK for me that you look at my php source, if possible.
Yes, your visitors won’t see https://mywebsite.000webhost.com/public_html/my.php
They will see instead:
https://mywebsite.000webhost.com/my.php
In other words, to test your website, you won’t use public_html in the url
I made it finally^^. I may need to study more about php.
Thank you for all your help.