answersLogoWhite

0

How to connect php my admin to my source code?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

Here's the code

<?php

$host = '127.0.01'; // add localhost or server ip address in place of '127.0.01'

$user = 'root'; // add username of your phpmyadmin in place of 'root'

$pass = 'password_here'; // put your password in place of 'password_here'

$connect = mysql_connect($host, $user, $pass);

if(!$connect)

{

// default statement if cannot

die("Could not connect to server".mysql_error());

}

?>

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to connect php my admin to my source code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to you connect in mysql database?

Use the following code to connect to your mysql database from the php file. variables are hostname, db_username, db_password - see the code below for the exact connection example. &lt;?php mysql_connect("localhost", "admin", "1admin") or die(mysql_error()); echo "Connected to MySQL&lt;br /&gt;"; ?&gt;


What is meaning of PHP is an open source software?

It means that the source code of PHP (not PHP code, but the C/C++ code used to build the PHP binary) is published and available to anyone. It also means that anyone can contribute fixes and improvements to the source code.Read more here: open-source


Why you do not see any PHP code when you view the source code of a PHP page in the browser?

PHP is server-side, the browser itself does not interpret it. Rather, the browser sends a query to the server, and the PHP scripting generates custom HTML document. It is this HTML that you are seeing the source code of.


Where would one find information online on how to use the php admin?

One can use a Php admin to store information which can be easily accessed. If one uses the Php my admin one can have it to keep updated automatically.


Can i use php without a php admin or account?

Yes, you can use PHP without any admin account. It is a programming language you can install on any computer and does not have accounts inherently.


How do you compile php code?

If you are looking to create an executable (.exe) file on windows then I highly recommend this program to compile your php source code to an exe file.


Free source code on online examination using PHP and MySQL?

yes


What is a tool that converts PHP source to Java source?

Converting PHP code into Java code would not work correctly; The two languages work in two completely different ways, rendering such a tool practically useless.


What does an index php signify?

PHP is an open-source scripting language used to code websites and webpages. An index php is a page used on a web server as the main frontpage for the website.


How do you encrypt PHP source code?

There are many options to encode and encrypt PHP source code, the most common one being Zend Guard. However it must be noted that using any encryption method will require that the server on which the application is run to have the correct extension to decrypt and decode the PHP source code. An alternative to encryption is to compile to bytecode. Bytecode is used as intermediate by the compiler, so it has no problem using it, and it provides a little speed boost (one step is already completed). Bytecode is less secure because the code is not encrypted, but simply rendered into a format hard to read for humans but native to computers.


What is the purpose of the Planet source code?

The Planet Source Code website is dedicated to providing millions of lines of source code examples and thousands of tutorials. Programing languages covered include PHP. Java, C++, SQL and Delphi.


How can you connect php to msql?

Use mysql_connect() php function to connect to the mysql.Please refer related link for more details.