I've got a script that should mail the information a user submitted to his e-mail adres.... This is what I do:
<?
$myemail="webmaster@muzic-world.f2s.com";
$myname="Webmaster @ Muzic-World.com";
$onderwerp="Muzic-World LinqXchange";
$mesg="Message: You have been succesfully added to our LinqXchange script\n Your account name is: $ACCOUNT\n Your password is: $PASSWORD\n And the url to send us hits is: $phpclickdir/clickin.php?acct=$ACCOUNT\n";
// Load up the MySQL Config file
include("xchange.cfg");
//Try to connect to database
mysql_connect("$dbhost","$dbuser","$dbpasswd")
or die("Unable to connect to SQL server!");
@mysql_select_db("$db")
or die("Unable to select database!");
echo($email);
//Begin error checking of the inputed values
If ($EMAIL == "") {
Echo("<H1>Please enter in a email address!</H1><br>"); }
elseif ($ACCOUNT == "") {
Echo("<H1>Please enter in a account name!</H1><br>"); }
elseif ($URL == "") {
Echo("<H1>Please enter in a valid URL!</H1><br>"); }
elseif ($PASSWORD == "") {
Echo("<H1>Please enter in a valid password!</H1><br>"); }
else
{
//Enter the values into the database account's record from the MySql tabel
mysql_query("INSERT into $userdatabasetable (EMAIL, ACCT, TITLE, URL, PASSWORD) VALUES ('$EMAIL','$ACCOUNT','$TITLE','$URL','$PASSWORD')");
Echo("<H1>User added successfully!</H1><br>");
Echo("<H2>You may now begin sending links to $sitename by using the following URL $phpclickdir/clickin.php?acct=$ACCOUNT</H2>");
mail("$EMAIL","Added To LinqXchange","$mesg","From:$myname<$myemail>\nReply-To:$myname<$myemail>\nX-Mailer: PHP4\nContent-Type: text/html; charset=iso-8859-1");
}
?>