Android app using PHP and MySQL - Dreamweaver shows root error [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am making an android app using php and mysql. I am using Dreamweaver while making this using phonegap. If I create this using index.html file. It works fine, But I dont want to use .html extension. I want to use .php. Where I can fetch my data form MYSQL and display my results after logged in into my app. Please share your views that how can I use index.php and other .php files in it.
I am having this error while using index.php

You can't, you have to set the index page to make a HTTP request.
http://phonegap.com/about/faq/
Q: Can you use PHP/ASP/JSF/Java/.NET with PhoneGap?
A: A PhoneGap application may only use HTML, CSS, and JavaScript.
However, you can make use of network protocols (XmlHTTPRequest, Web
Sockets, etc) to easily communicate with backend services written in
any language. This allows your PhoneGap app to remotely access
existing business processes while the device is connected to the
Internet.

Related

Connecting iOS app to a mysql database connected to a website that is currently online [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have already created a website with a mysql database. Now, I am attempting to create an IOS app that will connect to the same database that my website "talks to". All of the tutorials I have seen have relied exclusively upon PHP and have walked through the process of creating the database. My website was not written with PHP, so I am completely lost on how I get PHP to help me in this case. I'm new to all this, so I am not sure what information is helpful, but so you know:
The website templates were written in HTML and CSS,
views page (functionality) written in python,
Flask is the microframework, and
pymysql is the ORM
Any pointers in the right direction would be much appreciated.
If you are using Flask then this is how you need to go through - there are other ways, but I would go for this -
Install Flask REST API to expose rest api from your site. You can get the documentation here - http://www.flaskapi.org/
Expose required API's from your website using flash rest api
Consume those API's with your mobile application.
NOTE: Don't ever expose your database directly to client side. BAD IDEA. Always use a middleware, could be php, python, .net - does not matter what it is.

Why web servers are needed even for local web application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm searching for a means to overpass the need for a web server when using a local web application. Why aren't there browser extensions or special browsers to do so? It seems very easy to code to me. The browser or extension would call a php interpreter to compose web pages from php files. Local urls (file:///) would be used. No web service or port would be necessary. Is this just nonsense? Or am I the first person to think about this? In fact, this does already work with static html files.
First edit: I was looking for a server for testing purposes, being able to compose output from php files, without the need to communicate through network ports. Maybe I should have started from here, but Stackoverflow does not allow this kind of posts.
That sounds nice, please go ahead and build that technology. I will also use it. But oh, for now that has nothing to do with SO.
Why web servers are needed even for local web application
Because they are web applications. Technically you don't need a web server for local stuff if all your application code relies on client side programming. You can just go ahead open your html files in browser.
Browsers know how to interpret client side code already, so why re-invent the wheel? If you ever wish to write 1 line of server side code then obviously you'd need a web server at that point.

Connect to mysql database without showing password [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I know you can connect to a database with mysqli_connect("example.com","user","pass");, but wouldn't anyone who has access to the file have access to the database since he can see the user and password? How to change that?
PHP is a server-side language. You can't see php code in your browser. Unless your php "echo" or "output" something out. You can see "html","css","javascript" codes by clicking veiw source on your browser. But you'll never see "PHP" or "ASP" code because they are server side. The server process the command , not the browser. So you can be sure that no one will see your password unless they gain access to your website's files.
You always will need the password and username to connect.
You can of course deny access to the file that contains you data by a .htaccess file. However it is always smart to keep those settings in a settings file that is placed outside of your browse able content (and preferably your git or svn repo as well).
Like that people need access to your server (or a big error in the code) to be able to access that file.

How to connect HTML to Phpadmin database? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Am currently working on a website(html 5) that calculate the expenses for the user, after the calculation, user has to save it as report for future purposes. So i wanna know if there is anyway to connect my website(html5) to database using phpadmin.
thankyou
html5 doesn't connect to SQL (phpmyadmin), but php does :)
html5 is for delivering static documents. To do things such as connecting to databases, you need a server side language like php.
html5 generally means javascript and modern html features. Neither of these things have anything to do with PHP. However, you can write php inside your html5 web page, and connect to a database from there.
How exactly you would go about doing this depends on what OS you are running, but if you want to start using php and SQL together with phpmyadmin, you'll need to setup an apache server, and install php and mysql.
A full tutorial on it is out of the scope of a stack overflow post, but I suggest researching LAMP, XAMPP, and WAMP keywords. By installing these, depending on your operating system, you should be able to start connecting php scripts with mysql and using phpmyadmin to simplify the process.
There are plenty tutorials on getting php up and running with databases, just use google.
Good luck :)
Maybe these will be helpful:
http://community.linuxmint.com/tutorial/view/486 (for linux)
http://www.w3schools.com/php/php_mysql_intro.asp (once you get started)
HTML5 is just a static document, You cannot access a server-side databases from a web browser without server side scripts.

How to setup remote php on my server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I made a PHP based webapp and a customer of my needs it on his website. Now I want to put the PHP code on my server and let the customer's website include it remotely. How do I set this up? And can I restrict the acces when the customer doesn't need the app anymore and is it secure?
There is nothing such as remote PHP. Doesn't work that way. However you can setup some API to communicate between the two servers on backend. You'd still need both servers to be capable of this interaction, that means both servers still need to be fully functional. And if your code on client's server can talk to your API on host server, then they can take that code and see how it interacts with your host and replicate it.
A very simple solution would be to put the PHP-generated content from your website in an <iframe> on their website.

Categories