Saturday, April 20, 2013

Editing a flash file in linux

Editing a flash file can be done simply by two commands :

1.  Convert the flash(.swf) file to xml file using :

                         swfmill swf2xml flash.swf flash.xml


2.  Now, edit the xml file, save changes and convert the xml file back to flash(.swf) file using :

                     swfmill xml2swf flash.xml flash.swf

Friday, February 1, 2013

Sending form details to admin via e-mail on clicking Submit button

We need a mail server for this purpose. For example : for sending mails to gmail, we have smtp server. There are various other softwares that are available on internet. If you have all the requirements then you can easily perform this task with the following code :

HTML code for this :

<html>
<body>
    <form action="mail.php" method="post">
FIRST NAME : <input type="text" name="firstname"><br></br>
LAST NAME : <input type="text" name="lastname"><br></br>
Date Of Birth : <input type="text" name="dob"><br></br>
GENDER : <input type="radio" name="gender" value="male">Male
             <input type="radio" name="gender" value="female">Female<br></br>
EMAIL : <input type="text" name="email"><br></br>
CITY : <input type="text" name="city"><br></br>
               <center><input type="submit"></font></center>
</form>
</body>
</html>

PHP code i.e. "mail.php" file : 

<?php
$to="example@gmail.com";
$subject="Registration";
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$dob=$_POST['dob'];
$gender=$_POST['gender'];
$email=$_POST['email'];
$city=$_POST['city'];
$msg_body="First Name : $firstname\n";
$msg_body.="Last Name : $lastname\n";
$msg_body.="Date of Birth : $dob\n";
$msg_body.="Gender : $gender\n";
$msg_body.="E-Mail : $email\n";
$msg_body.="City : $city\n";
mail( $to, $subject,$msg_body);
header("Location: thankyou.html");
?>