This is a list of questions that are commonaly asked so if you look here and you may find your answer which will save you time in waiting for other members to post replies.
Please add more as you think of them
Q. How can i set up PHP or mySQL on my own Computer.
A. You can either compile each part of the install your self by downloading the Apache Webserver then installing the PHP parsing engine and the mySQL database engine.
Alternatively a All-in-one package for windows operating systems is xampp.
------------------------------------------------------------------------------------------------------------
Q. My PHP script wont go and there are no errors?
A. At the top of your code put this code.
Q. How can I send mail with PHP?
A.There are many resources that help you with sending mail in PHP. Direct from the PHP Website, or my using phplib class or by phpmailer class. find my post for an example of "sending mail using phplib" or just visit this link.
http://lwest.free.fr/doc/php/lib/index.php3?page=mail&lang=en
_____________________________________________________
Q. I can't connect to my Database?
A. Are your connection settings right? Sometimes you develop your scripts on your own computer, then when it comes time to upload it on to the World Wide Web nothing happens, No dsatabase connection, No queries, No Results. Then you realise you have to change one setting, so you have to edit every page, Nightmare! So i propose this. Use an external Connection script.
Then just include or require it into each page where you need database access.
This way means if there is an error you change one script and its done.
Possible errors could be:
Server Address the address you entered is 90% of the time localhost, if your are connecting to a remote mySQL Databse then either use the domain name of the Host or the IP address. Some Remote host's may require you to enter in a port number, If so you will need to contact your Host.
Username Issues Make sure your name is correct to the name assigned to the database (case sensitive). Also make sure that the user name assigned to the db has enough permission set to do what you want it to do.
Password It must be the right one, just like always and make sure its case sensitive.
Database name You must be trying to connect to a valid database where all the location, username and passsword match.
as with any and every SQL query ales put this peice of code right after your request.
_____________________________________________________
Best Regards
Stranger
Please add more as you think of them
Q. How can i set up PHP or mySQL on my own Computer.
A. You can either compile each part of the install your self by downloading the Apache Webserver then installing the PHP parsing engine and the mySQL database engine.
Alternatively a All-in-one package for windows operating systems is xampp.
------------------------------------------------------------------------------------------------------------
Q. My PHP script wont go and there are no errors?
A. At the top of your code put this code.
<?php
/* In addition to that add this to the very top of your script */
@error_reporting('E_ALL');
@ini_set('display_errors', '1');
/* This will print any errors that your page may have */
?>
------------------------------------------------------------------------------------------------------------Q. How can I send mail with PHP?
A.There are many resources that help you with sending mail in PHP. Direct from the PHP Website, or my using phplib class or by phpmailer class. find my post for an example of "sending mail using phplib" or just visit this link.
http://lwest.free.fr/doc/php/lib/index.php3?page=mail&lang=en
_____________________________________________________
Q. I can't connect to my Database?
A. Are your connection settings right? Sometimes you develop your scripts on your own computer, then when it comes time to upload it on to the World Wide Web nothing happens, No dsatabase connection, No queries, No Results. Then you realise you have to change one setting, so you have to edit every page, Nightmare! So i propose this. Use an external Connection script.
PHP Code:
<?php
//db_connect.php
$db_server = "localhost";
$db_user = "username";
$db_password = "password";
$db_name = "database";
$db_connect = mysql_connect($db_server, $db_user, $db_password)
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ($db_name) or die ('I cannot connect to $db_name because: ' . mysql_error());
<?Then just include or require it into each page where you need database access.
PHP Code:
<?php
//we need to connect
to the database so
require('db_connect.php');
?> This way means if there is an error you change one script and its done.
Possible errors could be:
Server Address the address you entered is 90% of the time localhost, if your are connecting to a remote mySQL Databse then either use the domain name of the Host or the IP address. Some Remote host's may require you to enter in a port number, If so you will need to contact your Host.
Username Issues Make sure your name is correct to the name assigned to the database (case sensitive). Also make sure that the user name assigned to the db has enough permission set to do what you want it to do.
Password It must be the right one, just like always and make sure its case sensitive.
Database name You must be trying to connect to a valid database where all the location, username and passsword match.
as with any and every SQL query ales put this peice of code right after your request.
PHP Code:
echo(mysql_error());
Best Regards
Stranger
Do you Yahoo!?
With a free 1 GB, there's more in store with Yahoo! Mail.