-------owned-------
Guru
Welcome to Saving time in php guide.
What applications/scripts is this guide meant for?
Larger applications, an online shop for example.
Can I use it in smaller scripts like ip-grabber?
You don't really need to.
Require_once - useful for MySQL
Using the require_once command, you can easy connect to a MySQL database fast. require_once executes the script you want, for MySQL databases conn.php is the most common name. Now how do I write the command? Since this isn't a guide for MySQL (to be honnest not my strong suit) I won't explain any MySQL-commands, but make your MySQL connections and save it as conn.php. Now move onto the php-file myconnector. Enter this code:
Code:
<?php
require_once 'conn.php';
?>
This executes the MySQL-connector command. This is most used to execute changes in a database, since you (I think) have to close the connection in conn.php. (Please pm me about it if I'm wrong). Also, make a die command in conn.php. Now load apache (or what web server you are using and try it out. If you used the die command you can see if it was successfull or not. I hope this can help out.

