ID:107214
 
I would like to make this announcement because BYOND itself is evolving to the point that ByMail I've been working on is obsolete. As a gift for it retiring, I will show ya the source that was used when it was on BYONDville.

http://files.byondhome.com/Bandock/ByMail_src.php

Yes, it is a downloadable file and not something of a normal link. If any problems arise from the download, let me know. I'll zip it up if I must. Since the support library contains the code that was used in this version (for the DM part), ya are now free to even modify it or just study it.
Lovely database password you've got there. I never would have guessed that.
Yep. :P
Also, why would you put that javascript all into separate lines? PHP is nice enough to allow you to interrupt strings by closing them, adding new data with the . operator and then resuming them:

$myVar = "This is another string.";
$myvar = "This is a string. " . $myVar . " lol.";
echo $myvar;


Etc.
Makes it easier to read. I used the '.' operator in several places where it was needed (mainly for dealing with certain information needing to be sent).
Easier to read!?!?

 echo "<script language=\"Javascript\">";
echo "function MailCall()";
echo "{";
echo "window.location = \"byond://?src=".$_POST["kref"].";keyname=".$keynamec.";sender=".$senderc.";topicname=".$topicnamec.";datec=".$datec.";message=".$messagec.";complete=".$complete."\";";
echo "var a = document.getElementById(\"mailrec\");";
echo "a.submit();";
echo "}";
echo "</script>";
echo "<body onload=\"MailCall()\">";
echo "<form action=\"http://www.byondville.com/bandock/ByMail/index.php\" method=\"post\" id=\"mailrec\">";
echo "<input type = \"hidden\" value=\"".$mailcount."\" name=\"mailcount\">";
echo "<input type = \"hidden\" value=\"".$minimum."\" name=\"minimum\">";
echo "<input type = \"hidden\" value=\"".$_POST["keyname"]."\" name=\"keyname\">";


Vs: (Syntax Highlighting works in Notepad++, but there could be errors here and there. But my point still remains valid. ;))

<?
echo("
<script language=\"Javascript\">
function MailCall() {
window.location = \"byond://?src=" . $_POST["kref"] . "keyname=" . $keynamec . "sender=" . $senderc . "topicname=" . $topicnamec . "datec=" . $datec . "message=" . $messagec . "complete=" . $complete . "
var a = document.getElementById(\"mailrec\");
a.submit();
}
</script>

<body onload=\"MailCall()\">
<form action=\"http://www.byondville.com/bandock/ByMail/index.php\" method=\"post\" id=\"mailrec\">
<input type = \"hidden\" value=\"".$mailcount."\" name=\"mailcount\">
<input type = \"hidden\" value=\"".$minimum."\" name=\"minimum\">
<input type = \"hidden\" value=\"".$_POST["keyname"]."\" name=\"keyname\">
" . ((!$complete) ? null : "<input type = \"hidden\" value=\"".$_POST["recmode"]."\" name=\"recmode\">") . "
<input type = \"hidden\" value=\"".$_POST["kref"]."\" name=\"kref\">
</form>
</body>
");


Incidentally, we have very different programming styles. I can imagine us working on a PHP project together, one of us would probably commit murder. ;)

For instance, I'd have generally gone with ' in place of " when calling the echo. echo(''); makes escaping all of those " completely pointless. =D
Hmmm, I didn't think about that when I worked on it originally. I was still a beginner with PHP (only used it for a few days or possibly weeks) when I first worked on it 3 1/2 years ago.
Using '' in echo does not let you embed variables:

$myvar = "Foo";
echo '$myvar'; // Outputs: $myvar
echo "$myvar"; // Outputs: Foo


Most of the inner "s can be changed to ' anyway (e.g. <input type="password"> is no different than <input type='password'>), so I stick with echo "";
Very interesting method Airjoe. Might try it sometime to prevent using the '.' operator too often.
I prefer echo('') myself. Mostly because I like to keep my variables separate from the string.

I prefer to have:
$myvar = 'lol';
echo('This is my var: ' . $myvar);


But that's just me.
Yeah, I still use the '.' operator for concatenation right now, though I haven't done much on the PHP front lately.
Me neither. ;)