Archive

Archive for the ‘PHP’ Category

How to Install PHPMyAdmin Tutorial

May 12, 2010 1 comment

I found this link http://www.aota.net/PHP_and_MySQL/phpmyadmin.php4 on how to install PHPMyAdmin. It’s rather straightforward. You download it. You remove “sample” from the config file name. You add a couple things to the config file. And finally you upload it to your server. That should do it for you. See the link above for details.

It’s a simple enough tutorial. It’s not cleanly laid out for you, but it’s simple enough to follow. It even explains some of the various items in the config file, so you aren’t doing everything blindly. If you’re looking just to get it up and running, then this tutorial will work just fine for you.

How to send emails via PHP on your web server tutorial.


Assuming you have a properly installed web server with PHP also properly installed, I want to explain very simply how to set up PHP to send an email. It is really a simple process how to set up PHP for this so this post will be short.

I have installed xampp on my local machine by which PHP is included, but the process is the same.

Open your php.ini file which, if you have xampp installed, is located in the C:\\xampp\php\ directory. Search for SMTP (simple mail transfer protocol) in the file. For me I start seeing my mail server information around line 1099. the SMTP and smtp_port are the two variables of interest. To find this information we use our good friend google.

public smtp servers

Search google for public email servers that you can use. Sometimes, but not always they will be in the format of smtp.somehost.com. The port is often port 25, but may be otherwised specified. When you find a public email server to use. Change that information. Makes sure it is not commented out (remove the ; at the beginning of the line if any). Save the file and restart the web server (or xampp if that is what you are using) so it can read the new configuration file. Now you can go Google for the code on how to send an email in PHP. Here is an example:

<?php
$to = “recipient@example.com”;
$subject = “Hi!”;
$body = “Hi,\n\nHow are you?”;
if (mail($to, $subject, $body)) {
echo(”

Message successfully sent!

“);
} else {
echo(”

Message delivery failed…

“);
}
?>
I got this from here

You can search elsewhere from this Google search or you can do your own search.

how to send an email in php

Categories: PHP