Hi there all. i am not sure if this is possible and my php is pretty limited..(9 days old)
I have a function that receives a few values from the page that calls it and then uses the values to build and send an email.
is it possible to say call the function directly? like www.test.com/sms.php?email=test@1.com:amount=$50
can this be done so that if i hard code that link in my other non web apps and they can send the paramentres along?
the function is as below
<?php
include("common.php");
include("db.php");
function sms($amount,$policy,$mobile,$company,$co_cell) {
?>
<html>
<head>
<script language="JavaScript">
<!-- Email the new password to the person.
$message = " user_id:100\\n user:test\\n password:testpasswd\\n text:Your Policy Payment was received today.\\n \\n text:Payment of R<?=$amount?>\\n text:Mem No: <?=$policy?>\\n text:From ABC <?=$company?>\\n text:Info on <?=$co_cell?>\\n from:CORESYSTEM \\n to:<?=$mobile?>";
mail('sms@vodazone.co.za',"",
$message, "From:CORE IT<coreit@vodamail.co.za>");
history.back();
//-->
</script>
</head>
<body>
</body>
</html>
<?
exit;
}
?>