Mas saya mau tanya tentang membuat sebuah redirect setelah submit from... kedenya formnya seperti ini mas..
<div class="datakamu">
<form action="<?php bloginfo('url')?>/mydata" enctype="multipart/form-data" method="post" name="data">
<script language="JavaScript"><!--
function validateForm()
{
var okSoFar=true
with (document.data)
{
if (nama.value=="" && okSoFar)
{
okSoFar=false
alert("Silahkan isi nama anda")
nama.focus()
}
if (email.value=="" && okSoFar)
{
okSoFar=false
alert("Silahkan isi Email anda")
email.focus()
}
if (No_Hp.value=="" && okSoFar)
{
okSoFar=false
alert("Silahkan No telpon anda")
No_Hp.focus()
}
if (Kota.value=="" && okSoFar)
{
okSoFar=false
alert("Silahkan isi alamat anda")
Kota.focus()
}
var foundAt = email.value.indexOf("@",0)
if (foundAt < 1 && okSoFar)
{
okSoFar = false
alert ("Masukkan alamat email yang Valid")
email.focus()
}
if (kategorihoby.value=="" && okSoFar)
{
okSoFar=false
alert("Silahkan Pilih kategori hobi")
kategorihoby.focus()
}
if (kegiatan.value=="" && okSoFar)
{
okSoFar=false
alert("Silahkan isi kegiatan anda")
kegiatan.focus()
}
if (spesifikkegiatan.value=="" && okSoFar)
{
okSoFar=false
alert("Silahkan isi detail kegiatan anda")
spesifikkegiatan.focus()
}
if (security_code.value=="" && okSoFar)
{
okSoFar=false
alert("masukkan kode sekurity")
security_code.focus()
}
if (okSoFar==true) submit();
}
}
// --></script>
<table width="100%" cellpadding="2">
<tr>
<td width="30%" align="left">Name</td>
<td width="70%"><input type="text" name="nama" size="30" id="nama" value="<?php echo $_POST['nama']?>"/></td>
</tr>
<tr>
<td width="30%" align="left">E-mail</td>
<td width="70%"><input type="text" name="email" size="30" id="email" value="<?php echo $_POST['email']?>" /><br />
</td>
</tr>
<tr>
<td width="30%" align="left">alamat</td>
<td width="70%"><input type="text" name="Kota" size="30" id="Kota" value="<?php echo $_POST['Kota']?>"/></td>
</tr>
<tr>
<td width="30%" align="left">Telpon</td>
<td width="70%"><input type="text" name="No_Hp" size="30" id="No_Hp" value="<?php echo $_POST['No_Hp']?>"/></td>
</tr>
<tr>
<td width="30%" align="left">Janis</td>
<td width="70%"><select name="type">
<option value="0">Laki-laki</option>
<option value="0">Perempuan</option>
</select></td>
</tr>
<tr>
<td width="30%" align="left" valign="top">Hoby:</td>
<td width="70%"><select name="kategorihoby" >
<option value="" size="40">====Pilih Kategori====</option>
<?php
$categories= get_categories('hide_empty=0');
foreach ($categories as $cat) {
$option = '<option value="'.$cat->cat_ID.'">';
$option .= $cat->cat_name;
$option .= ' ('.$cat->category_count.')';
$option .= '</option>';
echo $option;
}
?>
</select></td>
</tr>
<tr>
<td width="30%" align="left">kegiatan</td>
<td width="70%"><input type="text" name="kegiatan" size="30" id="kegiatan" value="<?php echo $_POST['kegiatan']?>" /></td>
</tr>
<tr>
<td width="30%" align="left" valign="top">Detail Kegiatan</td>
<td width="70%"><textarea rows="8" cols="24" name="spesifikkegiatan"><?php echo $_POST['spesifikkegiatan']?></textarea></td>
</tr>
<tr>
<td width="30%" align="left">Website</td>
<td width="70%">http://<input type="text" name="website" size="25" id="website" value="<?php echo $_POST['website']?>" /></td>
</tr>
<tr>
<td width="30%" align="left">Foto maks 125 x 125 px</td>
<td width="70%"><input type="file" name="banner" size="20"></td>
</tr>
<tr>
<td width="30%" align="left">Security Code </td>
<td width="70%"><img src="<?php bloginfo('template_url')?>/include/CaptchaSecurityImages.php?width=150&height=60&characters=5"/>
</td>
</tr>
<tr>
<td width="30%" align="left">Input Code </td>
<td width="70%"><input id="security_code" name="security_code" type="text" />
</td>
</tr>
<tr>
<td width="30%" align="left" valign="top"> </td>
<td><input type="button" class="button"
value="Pasang Iklan Gratis" name="B1" ONCLICK="javascript:validateForm()">
<input type="hidden" id="post_type" name="post_type" value="post" />
</td> </tr>
</table></form>
</div>
Mohon bantuannya mas...
Terima kasih...