And now I have also added a .php form that send the users info to the data base.
My question is: how can I get it to do both requests, send to database and email me the info,
can I combine the perl and php scripts or is there a better way in php to have the data sent to both the database and my email?
The code I have for the php that send to db is
Code: Select all
{
include("config.php");
$connection = mysql_connect("$server", "$db_user", "$db_pass");
$db = mysql_select_db("$database", $connection);
$query = "INSERT INTO login (`username`,`password`,`fname`,`sname`,`email`,`emailz`,`country`,`city`,`interests`,`street`,`prov`,`street2`,`post`,`phone`,`fax`,`hpage`,`pubs`,`clubs`,`dances`,`emale`,`efemale`,`eboth`,`mcountry`,`mrock`,`mhiphop`,`mdance`,`mrap`,`bgrills`,`mmetal`)".
"VALUES ('$username', '$password', '$fname','$sname', '$emaila', '$emailz', '$country', '$city', '$interests', '$street', '$prov', '$street2', '$post', '$phone', '$fax', '$hpage', '$pubs', '$clubs', '$dances', '$emale', '$efemale', '$eboth', '$mcountry', '$mrock', '$mhiphop', '$mdance', '$mrap', '$bgrills', '$mmetal')";
$result = mysql_query($query, $connection);
echo "$langїthanksregister]";
$ida= uniqid('message');
$ida2= uniqid('$ida');
$nr= uniqid($ida);
$date=date('m.j.Y');
$connection = mysql_connect("$server", "$db_user", "$db_pass");
$db = mysql_select_db("$database", $connection);
$query = "SELECT * FROM usermessages";
$query = "INSERT INTO usermessages (`nomer`, `to`, `from`, `date`, `title`, `message`, `new`) VALUES ('$nr', '$username', 'admin', '$date', '$langїadminwelcome]', '$langїadminwelcomemessage]', 'yes')";
$result = mysql_query($query, $connection);
} ї/code}
The perl mailForm.pl just called їcode]<form method='post' action="/td/scriptcss/FormMail.pl">any suggestions will be appreciated.