page 1................................................. ..............
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Welcome to the World of babies</title>
</head>
<body>
<form method="POST" action="Page2.php" name="B1">
<p>   ; & nbsp; &nb sp;
<marquee></marquee> &n bsp; &nbs p;
<font color="#FF6666"> <font face="Algerian" size="6">Welcome to the World
of babies</font></font></p>
<p> </p>
<p><font size="4" color="#008000">Enter Your Full Name --</font> &nb sp;   ;
<input type="text" name="Fullname" size="20"></p>
<p><font size="4" color="#008000">Annual Income in thousands --   ;
</font><input type="text" name="Income" size="20"></p>
<p><font size="4" color="#008000"><font face="Times New Roman">Address --</font><font face="Arial">
</font> &nb sp;   ; & nbsp; &nb sp;
</font><input type="text" name="Address" size="20"></p>
<p><font size="4" color="#008000">City -- </font> &nb sp;   ; & nbsp; &nb sp;   ; & nbsp;
<input type="text" name="City" size="20"></p>
<p><font size="4" color="#008000">State -- &n bsp; &nbs p; &n bsp;
</font><input type="text" name="State" size="20"></p>
<p><font color="#008000" size="4">Contact Number-- &n bsp; &nbs p;   ;
</font><input type="text" name="Contactnumber" size="20"></p>
<p>   ; & nbsp; &nb sp;   ; & nbsp; &nb sp;   ; & nbsp; </p>
<p>   ; & nbsp; &nb sp;   ; & nbsp; &nb sp;   ;
<b>
<input type="submit" value="Submit" onClick="page2.php" name="B1" style="font-family: Times New Roman; font-weight: bold; font-size: 12pt"></b> &n bsp; &nbs p; &n bsp; <b><input type="reset" value="Clear" name="B2" style="font-family: Times New Roman; font-size: 12pt; font-weight: bold"></b> </p>
</form>
<b><form method="POST" action="Page2.php" name="32">
</form> </p>
</body>
</html>
.................................................. ...page 2................................................. .
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>We Need Some More Information So That We Can Help You Better</title>
</head>
<body>
<form method="POST" action="Page3.php" name="B1">
<p><font size="5" face="Algerian" color="#800000">
We Need Some More Information So That We Can Help You Better...</font></p>
<p> </p>
<p><font face="Times New Roman" size="4" color="#008000">Message-- &n bsp; &nbs p; &n bsp;
</font><input type="text" name="Message" size="20"></p>
<p><font color="#008000"><font size="4">Are You Married? Give details --
</font></font><input type="text" name="Status" size="20"><font color="#008000">
</font></p>
<p><font size="4" color="#008000">Criminal Record -- </font><font size="4"> </font> &nb sp;   ; & nbsp;
<input type="text" name="Crecord" size="20"></p>
<p><font size="4" color="#008000">Reason To Adopt-- &n bsp; &nbs p;
</font><input type="text" name="Reson" size="20"></p>
<p> </p>
<p>   ; & nbsp; &nb sp;   ; & nbsp;
<input type="submit" value="Submit" onClick="page3.php" name="B1" style="font-family: Times New Roman; font-weight: bold; font-size: 12pt"> &n bsp; &nbs p;
<input type="reset" value="Clear" name="B2" style="font-family: Times New Roman; font-size: 12pt; font-weight: bold"></p>
<p> </p>
</form>
<b><form method="POST" action="Page3.php" name="32">
<?
$a1=$_POST['Fullname'];
$a2=$_POST['Income'];
$a3=$_POST['Address'];
$a4=$_POST['City'];
$a5=$_POST['State'];
$a6=$_POST['Contactnumber'];
$con=mysql_connect('localhost','root','password') or die('ERROR');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}if (mysql_query("CREATE DATABASE adoption",$con))
{
echo "Database created";
mysql_select_db("adoption",$con);
}
mysql_select_db("adoption",$con);
if (mysql_query("CREATE TABLE information(Fullname varchar(30),Income int(30),Address varchar(30),
City varchar(20),State varchar(20),Contactnumber int(12)",$con))
{
echo "Table created";
}
$p="insert into information(Fullname,Income,Address,City,State,Con tactnumber)values
('$a1','$a2','$a3','$a4','$a5','$a6')";
mysql_query($p);
?>
</body>
</html>
.................................................. ...........page 3................................................. .......
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/xml; charset=windows-1252">
<title>Thanks For Your Valuable Time We Will Get Back To You Within Next 48 Hrs
</title>
</head>
<body>
<?
$a7=$_POST['Message'];
$a8=$_POST['Status'];
$a9=$_POST['Crecord'];
$a10=$_POST['Reson'];
$con=mysql_connect('localhost','root','password') or die('ERROR');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}if (mysql_query("CREATE DATABASE adoption",$con))
{
echo "Database created";
mysql_select_db("adoption",$con);
}
else
mysql_select_db("adoption",$con);
if (mysql_query("alter table information add(Message varchar(50),Status varchar(10),Crecord varchar(30),
Reson varchar(30)",$con))
{
echo "Table created";
}
$p="insert into information(Message,Status,Crecord,Reson)values
('$a7','$a8','$a9','$a10')";
mysql_query($p);
if(!$dbconnect = mysql_connect('localhost', 'root', 'password')) {
echo "Connection failed to the host 'localhost'.";
exit;
} // if
if (!mysql_select_db('adoption')) {
echo "Cannot connect to database 'adoption'";
exit;
} // if
$table_id = 'information';
$query = "SELECT * FROM $table_id";
$dbresult = mysql_query($query, $dbconnect);
// create a new XML document
$doc = domxml_new_doc('1.0');
// create root node
$root = $doc->create_element('root');
$root = $doc->append_child($root);
$root = $doc->create_element('root');
$root = $doc->append_child($root);
// process one row at a time
while($row = mysql_fetch_assoc($dbresult)) {
// add node for each row
$occ = $doc->create_element($table_id);
$occ = $root->append_child($occ);
// add a child node for each field
foreach ($row as $fieldname => $fieldvalue) {
$child = $doc->create_element($fieldname);
$child = $occ->append_child($child);
$value = $doc->create_text_node($fieldvalue);
$value = $child->append_child($value);
} // foreach
} // while
// get completed xml document
$xml_string = $doc->dump_mem(true);
//echo $xml_string;
$fh = fopen("c:/testdir/file1.xml","w");
fwrite($fh,$xml_string);
fclose($fh);
//$handle = fopen($filename, "w");
//fwrite($handle, $csv_code);
//fclose($handle);
//where $filename ='\\parag.xml';
?>
<p> </p>
<p> </p>
<p> </p>
<p><font face="Algerian" size="5" color="#800000">Thanks For Your Valuable Time
We Will Get Back To You Within Next 48 Hrs & Will Fix the Appointment...</font></p>
</body>
</html>
.................................................. ....................................end........... .................................................. .