Postingan lainnya
Kelas Premium!
Belajar bikin website dari nol sekarang
Gunakan kupon "lebihcepat" untuk diskon 25%!
syntax error, unexpected 'Registrasi' (T_STRING), expecting ',' or ';' in index2.php on line 8
Parse error: syntax error, unexpected 'Registrasi' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\tubes\index2.php on line 8
ini errornya cuman ad apostrof yang kurang kah atau ada yg lain yg salah?
ini file index2.php nya
<?php
require 'koneksi.php';
if (isset($_POST["signup"])) {
if (tubesregistrasi($_POST) > 0) {
echo "<script>
alert('Registrasi Berhasil !');
document.location.href = 'index2.php';
</script>
";
} else{
echo "<script>
alert('Registrasi Gagal !');
</script>
";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Registrasi</title>
<!-- Font Icon -->
<link rel="stylesheet" href="fonts/material-icon/css/material-design-iconic-font.min.css">
<!-- Main css -->
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="main">
<!-- Sign up form -->
<form action="" method="post">
<section class="signup">
<div class="container">
<div class="signup-content">
<div class="signup-form">
<h2 class="form-title">Registrasi</h2>
<form method="POST" class="register-form" id="register-form">
<div class="form-group">
<label for="name"><i class="zmdi zmdi-account material-icons-name"></i></label>
<input type="text" name="name" id="name" placeholder="Your Name"/>
</div>
<div class="form-group">
<label for="email"><i class="zmdi zmdi-email"></i></label>
<input type="email" name="email" id="email" placeholder="Your Email"/>
</div>
<div class="form-group">
<label for="pass"><i class="zmdi zmdi-lock"></i></label>
<input type="password" name="pass" id="pass" placeholder="Password"/>
</div>
<div class="form-group">
<label for="re-pass"><i class="zmdi zmdi-lock-outline"></i></label>
<input type="password" name="re_pass" id="re_pass" placeholder="Repeat your password"/>
</div>
<div class="form-group">
<input type="checkbox" name="agree-term" id="agree-term" class="agree-term" />
<label for="agree-term" class="label-agree-term"><span><span></span></span>Saya telah menyetujui semua pernyataan di <a href="#" class="term-service">Terms of service</a></label>
</div>
<div class="form-group form-button">
<input type="submit" name="signup" id="signup" class="form-submit" value="Register"/>
</div>
</form>
</div>
<div class="signup-image">
<figure><img src="images/signup-image.jpg" alt="sing up image"></figure>
<a href="#" class="signup-image-link">Saya sudah punya akun</a>
</div>
</div>
</div>
</section>
<!-- JS -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="js/main.js"></script>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
</html>
0
2 Jawaban:
<div>kayanya karena php mendeteksi ada ; de mas</div>
0
<div>coba ga pake echo,,,</div><pre><?php if (tubesregistrasi($_POST) > 0) { ?>
&lt;script&gt;
alert('Registrasi Berhasil !');
document.location.href = 'index2.php';
&lt;/script&gt;
<?php } else{ ?>
&lt;script&gt;
alert('Registrasi Gagal !');
&lt;/script&gt;
<?php } ?></pre><div><br>soalnya kayaknya ga ada yang salah di Js nya,,, mungkin Js nya ga kebaca gagara echo,,,, belom ku cobain sih,,, tapi silakan di coba aja ^^<br><br></div>
0