Search the web
Sign In
New User? Sign Up
phpresource · Storehouse of PHP Resources
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Link of the day [26/01/2006]   Message List  
Reply | Forward Message #35 of 2747 |
Frequently Asked Questions

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.
<?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.

Sat Jan 28, 2006 6:22 am

shimul39
Offline Offline
Send Email Send Email

Forward
Message #35 of 2747 |
Expand Messages Author Sort by Date

Hi All, Here's a nice link of JavaScript: http://www.javascriptkit.com/javatutors/ You can get helpful JS things from here. Happy Programming !! Rupom...
MA Razzaque Rupom
rupom_315
Offline Send Email
Jan 26, 2006
4:16 am

1. What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods? 2. Who is the...
Shimul
shimul39
Offline Send Email
Jan 27, 2006
9:34 am

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...
Shimul
shimul39
Offline Send Email
Jan 28, 2006
6:22 am

Thanks Shimul. This is a very much important set of questions. I am getting problems to solve many questions. Could you plz send the answers of the questions?...
Constant Constant
constbd
Offline Send Email
Jan 28, 2006
8:36 am

Hi all.. here are the answer for most of the questions post.. ... 1. What are the differences between Get and post methods in form submitting, give the case...
Shimul
shimul39
Offline Send Email
Jan 28, 2006
8:50 am

I shall give you tk 500/= from my own pocket if you know all answers of these questions. Let's try. Come to my house and give an examination. Ha ha ha. [I can...
Abul Ahsan Mani
ahsanmani
Offline Send Email
Jan 31, 2006
11:46 am

This one always gets asked. For a while the database interview questions were limited to Oracle and generic database design questions. This is a set of more...
Shimul
shimul39
Offline Send Email
Feb 1, 2006
4:14 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help