Hello guyz, I have this base 64 encoding and decoding script, I am stuck in middle because i am not able to execute this script, i need help in solving the issue..
wel here goes the script
<?php
/*///////////////////Base 64 encoding/decoding script ////////////////////////////*/
?>
<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="ar-kw">
<title>hacklearn.com</title>
</head>
<body text="#0066CC" bgcolor="#F3F4F6">
<div align="center">
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="300">
<TR>
<TD>
<IMG SRC="pic/l_up.gif" WIDTH=37 HEIGHT=29 ALT=""></TD>
<TD background="pic/bg_up.gif">
</TD>
<TD>
<IMG SRC="pic/r_up.gif" WIDTH=33 HEIGHT=29 ALT=""></TD>
</TR>
<TR>
<TD background="pic/m_l.gif">
<IMG SRC="pic/m_l.gif" WIDTH=37 HEIGHT=83 ALT=""></TD>
<TD bgcolor="#F3F4F6" width="100%" dir="rtl" valign="top" align="center">
<?php
if ($mode == "")
{
echo '<u><font color="red" size="2">Hacklearn.com </font></u><br>Base 64 Decrypting and Encrypting Tool <br> <br>
<center><form name="userinfo" method="post" action="index.php?mode=code_base64">
<input type="submit" value="base64 encode"><br><br></form>
<form name="userinfo" method="post" action="index.php?mode=taw_base64">
<input type="submit" value="base64 Decode"><br><br></form>';
}
else
if ($mode == "code_base64")
{
if ($type == "") {
echo '<center><form name="userinfo" method="post" action="index.php?mode=code_base64&type=insert">
<table style="width: 76%; height: 9%" cellpadding="4" cellspacing="1">
<tr>
<td style="height: 8px">Clear the Base64</td>
</tr>
<tr>
<td align="center"><br>
Enter the text you want to encrypt the data below
<br>
<textarea style="height: 147px; width: 400px;" name="code_base64"></textarea><br>
<br>
<input type="submit" value="Clear"><br>
<a href="JavaScript:history.go(-1)"><IMG SRC="pic/back.gif" alt="return"></a><br>
</td>
</tr>
</table>
</form>
</center>';
}
if ($type == "insert") {
$code_base = $_POST["code_base64"];
$base64_encode = base64_encode($code_base);
echo '
<br>
<center>
<table style="width: 76%; height: 9%" cellpadding="4" cellspacing="1"> <tr>
<td style="height: 26px">your text has been encrypted successfully</td>
</tr>
<tr>
<td align="center">
<textarea style="height: 147px; width: 400px;">Base64_Decode("'.$base64_encode.'");</textarea><br>
<a href="JavaScript:history.go(-2)"><IMG SRC="pic/back.gif" alt="return"></a><br><br></td>
</tr>
</table>
</center>';
}
}
if ($mode == "taw_base64"){
if ($type == "") {
echo '
<center>
<form name="userinfo" method="post" action="index.php?mode=taw_base64&type=insert">
<table style="width: 76%; height: 9%" cellpadding="4" cellspacing="1">
<tr>
<td style="height: 8px">Decrypt the Base64</td>
</tr>
<tr>
<td align="center"><font color="red">Place underneath the value to be decrypted</font>
<br>
<textarea style="height: 147px; width: 453px;" name="taw_base64"></textarea><br>
<br>
<input type="submit" value="decoding"><br>
<a href="JavaScript:history.go(-1)"><IMG SRC="pic/back.gif" alt="return"></a><br>
</td>
</tr>
</table>
</form>
</center>';
}
if ($type == "insert") {
$decode_base = $_POST["taw_base64"];
$base64_decode = base64_decode($decode_base);
echo '
<br>
<center>
<table style="width: 76%; height: 9%" cellpadding="4" cellspacing="1"> <tr>
<td style="height: 26px">Decryption was successful</td>
</tr>
<tr>
<td align="center"><br>This is the text that has been decoding for
<br>
<textarea style="height: 147px; width: 453px;">'.$base64_decode.'</textarea><br>
<br><a href="JavaScript:history.go(-2)">return</a><br><br></td>
</tr>
</table>
</center>';
}
}
echo'
<table style="border-style:solid; border-width:1px; border-color: #000000;" align="center">
<tr>
<td><center>
<font size="1">--- This Script Programmed By Z4ls ---<br>Copyright © 2009 - 2010</font></a></font>
</form>
</TD>
</td></tr></table>
<TD background="pic/m_r.gif">
<IMG SRC="pic/m_r.gif" WIDTH=33 HEIGHT=83 ALT=""></TD>
</TR>
<TR>
<TD>
<IMG SRC="pic/l_dwn.gif" WIDTH=37 HEIGHT=29 ALT=""></TD>
<TD background="pic/c_dwn.gif">
</TD>
<TD>
<IMG SRC="pic/l_dwn-12.gif" WIDTH=33 HEIGHT=29 ALT=""></TD>
</TR>
</td>
</tr>
</table>
</div>
</td></tr></table></div>';
?>
can i any1 tell me whats wrong goin on here ! take a loot this screenshot
http://www.phpbuilder.com/board/attachment.php?attachmentid=4014&stc=1&d=1266596209
Its exactly what i want it too look, but when i click Base64 encode or Base64 Decode buttons, it should show the text area to insert value for encoding or decoding, but nothing happens when i click the buttons ! .
can any1 tell me what am i doin wrong ?