$q = "select * from petitions where petition_id = '$id'";
$r = $petition->query($q);
$d = mysqli_fetch_array($r);
+ slack_general('OK POST: petition.php ('.$_COOKIE['invite'].')','md-petition');
}elseif($_COOKIE['pID'] != ''){
$id = $_COOKIE['pID'];
$q = "select * from petitions where petition_id = '$id'";
$r = $petition->query($q);
$d = mysqli_fetch_array($r);
+ slack_general('OK COOKIE: petition.php ('.$_COOKIE['invite'].')','md-petition');
}else{
slack_general('MAJOR ERROR: petition.php ('.$_COOKIE['invite'].')','md-petition');
header('Location: reset.php');
}
.sig {
font-family: "myFirstFont";
+ font-size: 60px;
}
</style>
+<script>
+function matchString1() {
+ var string = document.getElementById('myText').value;
+ var result = string.match(/<?PHP echo $_COOKIE['pNAME'];?>/i);
+ alert("Confirmed : " + result);
+}
+function matchString2() {
+ var string = document.getElementById('myTextb').value;
+ var result = string.match(/<?PHP echo $_COOKIE['pNAME'];?>/i);
+ alert("Confirmed : " + result);
+}
+</script>
<?PHP
if (isset($_POST['signed_name_as'])){
?>
function addTextb()
{
document.getElementById('text2b').innerHTML = document.getElementById('myTextb').value;
+ matchString2();
}
</script>
<?PHP
function addText()
{
document.getElementById('text2').innerHTML = document.getElementById('myText').value;
+ matchString1();
}
</script>
<?PHP
<?PHP
if(isset($_POST['signed_name_as'])){
- slack_general('petition.php ('.$_POST['signed_name_as'].') ('.$_COOKIE['invite'].')','md-petition');
+ slack_general('petition.php ('.$d['petition_name'].') ('.$_POST['signed_name_as'].') ('.$_COOKIE['invite'].')','md-petition');
+}else{
+ slack_general('petition.php ('.$d['petition_name'].') ('.$_COOKIE['invite'].')','md-petition');
}
include_once('footer.php');