Tarot Reading

[insert_php]
$remoteip = $_SERVER[‘REMOTE_ADDR’];
$myquestion = htmlspecialchars($_POST[‘question’]);
$mymysqli = new mysqli(“localhost”, “dig_g_tarot”, “Clarksburg71”, “dig_gaotu_tarot”);
$randomizer=md5($myquestion);
$chosencard = rand(1,78);
$cardresult = $mymysqli->query(“SELECT * from cards where id=$chosencard”);
$cardrow = $cardresult->fetch_assoc();
$card = $cardrow[‘filename’];
$desc = $cardrow[‘description’];
$cardname = $cardrow[‘cardname’];
if ($myquestion) {
echo “Inquiry: $myquestion”;
} else {
echo “General card drawn (for specific inquiry, enter your question below).”;
};
echo “\n”;
echo “

\n

\n

$cardname

$desc

\n”;

if ($myquestion) {
$to = ‘bobgerman@bobgerman.com’;
$subject = ‘Tarot Query’;
$message = “$remoteip\n$myquestion\n\n($card) $desc”;
$headers = ‘From: bobgerman@bobgerman.com’ . “\r\n” .
‘Reply-To: bobgerman@bobgerman.com’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();
mail($to, $subject, $message, $headers);
$storethis=$mymysqli->query(“INSERT INTO inquiries set qtime=now(), ip=’$remoteip’, question=’$myquestion’, answer=$chosencard,head=’blog'”);
} else {
$storethis=$mymysqli->query(“INSERT INTO inquiries set qtime=now(), ip=’$remoteip’, answer=$chosencard, head=’blog'”);
};

[/insert_php]

Inquiry:

One thought on “Tarot Reading”

Leave a Reply

Your email address will not be published. Required fields are marked *

putting more of myself out there