Postingan lainnya
Kelas Premium!
Belajar bikin website dari nol sekarang
Gunakan kupon "lebihcepat" untuk diskon 25%!
Error back to page
saya punya 3 halaman php dimana halaman 1 akan post ke halaman 2 dan dari halaman 2 post ke halaman 3 untuk ditampilkan. saat di halaman 3 ingin kembali ke halaman 2 terjadi eror.. bisa dilihat digambar berikut :
script page 1
<?php
include 'libraries/config.php';
if(!isset($_SESSION))
{
session_start();
}
if($_SESSION['id-cus']==''){
header('location: login.php');
}
?>
<form action="2.php" method="POST">
<table>
<tr>
<td>Name</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td>Address</td>
<td><input type="text" name="address"></td>
</tr>
<tr>
<td></td>
<td><button type="submit">Enter</button></td>
</tr>
</table>
</form>
page 2
<?php
include 'libraries/config.php';
if(!isset($_SESSION))
{
session_start();
}
header('location: login.php');
if($_SESSION['id-cus']==''){
}
$name = $_POST['name'];
$address = $_POST['address'];
?>
<form action="3.php" method="POST">
<table>
<tr>
<td>Name</td>
<td><input type="text" name="name" value="<?php echo $name;?>"></td>
</tr>
<tr>
<td>Address</td>
<td><input type="text" name="address" value="<?php echo $address;?>"></td>
</tr>
<tr>
<td></td>
<td><button type="submit">Enter</button></td>
</tr>
</table>
</form>
page 3
<?php
include 'libraries/config.php';
if(!isset($_SESSION))
{
session_start();
}
if($_SESSION['id-cus']==''){
header('location: login.php');
}
$name = $_POST['name'];
$address = $_POST['address'];
?>
<?php echo $name;?>
<br>
<?php echo $address;?>
0
2 Jawaban:
di cek untuk kode ini gan di page kedua
include 'libraries/config.php';
if(!isset($_SESSION))
{
session_start();
}
header('location: login.php');
if($_SESSION['id-cus']==''){
}
kayake maksute gini
include 'libraries/config.php';
if(!isset($_SESSION))
{
session_start();
}
if($_SESSION['id-cus']==''){
header('location: login.php');
}
0
@shobirin,, iya mas saya sudah ganti.. tapi tetep saja pas balik lagi eror -_-
0