echo "<script type=\"text/javascript\">
function finishForm() {
var answer = confirm('Are you sure these are the teams you want to enter with?');
if (answer) {
if(document.getElementByID(emailconfirm).value == ".$_SESSION[Email].") {
form.action=\"esubmit.php\";
form.submit();
} else {
alert('E-mail address do not match');
return false;
}
}
}
function restartForm() {
var answer = confirm('Are you sure you want to start over?');
if (answer) {
form.action=\"e1.php\";
form.submit();
}
}
</script>";
I have a regular button calling this function. emailconfirm is a text input.
I want to confirm that they have chosen the right teams, then check if the email in the session and the email confirmation text match. If they do match Then i want to submit the form.
If they dont match, I want to alert the user they dont match, and just return to page so user can check emails and then resubmit.
This script is in my header.
DÜZENLEME: Haha ben önce bir teslim ve gitmedi üzgünüm, benim sorunum eklemek unuttum!
Eğer düğmesine tıkladığınızda şey yapmaz evet ya da tıklayarak onayı ile çıkageldi. Onlar maçı dont uyarı açılır değildir ve onlar maç yapmak eğer teslim etmiyor. Ayrıca ben e-posta onayı if ifadesi olmadan vardı dikkat etmek iyi olabilir ve (göndermek sayfasına giderek) iyi çalıştı