Top
Home

Progressive Database Entry

This is the template to do progressive database entry.



<form name="Progressive" action="Progressive02.php" method="post">
<table border="0" cellpadding="5" cellspacing="2" width="600">
<tr>
<td valign=top>One<font color="red">*</font> </td>
<td valign="top"><input type="text" name="one" size="24" value=""> </td>
</tr>
<tr>
<td valign=top>Two<font color="red">*</font> </td>
<td valign="top"><input type="text" name="two" size="24" value=""> </td>
</tr>
<tr>
<td valign=top>Three<font color="red">*</font> </td>
<td valign="top"><input type="text" name="three" size="24" value=""> </td>
</tr>
<tr>
<td valign=top>Four<font color="red">*</font> </td>
<td valign="top"><input type="text" name="four" size="24" value=""> </td>
</tr>
<tr>
<td valign="top" colspan=4><center><input type="submit" Name="submit" value="submit" alt="Please Submit"></td>
</tr>
</table>
</form>


################################################################

<?php
session_start();
$sessionz = uniqid(MooseLoose_,true);
$_SESSION["sessionz"] = $sessionz;
?>

<form name="Progressive" action="Progressive03.php" method="post">
<table class="FearFarm" border="0" cellpadding="5" cellspacing="2" width="600">

<?php
$todae=date ("Y/m/d-G:i");
$ip = getenv('REMOTE_ADDR');
$hostname = "localhost";
$username = "The";
$password = "ooseoffreedom";
$dbName = "mooseloose";
$conn = mysql_connect($hostname, $username, $password, $dbName);

$one=$_POST['one'];
$two=$_POST['two'];
$three=$_POST['three'];
$four=$_POST['four'];
$one = filter_var($one, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$two = filter_var($two, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$three = filter_var($three, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$four = filter_var($four, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$sessionz=$_SESSION["sessionz"];

$result= mysql_select_db($dbName,$conn);
$query = "insert into progressive ( todae, ip, one, two, three, four, session) values ('$todae','$ip', '$one', '$two','$three','$four','$sessionz')" ;
$result1 = mysql_query($query, $conn);
echo "<p class=".success">Successfully Submitted!</p>";
?>

<tr>
<td valign=top>One<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="one" size="24" value="<?php echo $one; ?>"</td>
</tr>
<tr>
<td valign=top>Two<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="two" size="24" value="<?php echo $two; ?>"> </td>
</tr>
<tr>
<td valign=top>Three<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="three" size="24" value="<?php echo $three; ?>"> </td>
</tr>
<tr>
<td valign=top>Four<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="four" size="24" value="<?php echo $four; ?>"> </td>
</tr>
<tr>
<td valign="top" colspan=4><center><input type="submit" class="submit" Name="submit" value="submit" alt="Please Submit"></td>
</tr>
</table>
</form>

#####################################################################

<?php
session_start();
$sessionz=$_SESSION["sessionz"]
?>

<form name="Progressive" action="Progressive03.php" method="post">
<table class="FearFarm" border="0" cellpadding="5" cellspacing="2" width="600">

<?php
$th_sentto = "onclick@yahoo.com";
ini_set('error_reporting', E_ALL | E_STRICT);
ini_set('display_errors', 'On');
ini_set('log_errors', 'On');
ini_set('error_log', '/path/to/error_log');
$todae=date ("Y/m/d-G:i");
$ip = getenv('REMOTE_ADDR');
$hostname = "localhost";
$username = "The";
$password = "ooseoffreedom";
$dbName = "mooseloose";
$one=$_POST['one'];
$two=$_POST['two'];
$three=$_POST['three'];
$four=$_POST['four'];
$one = filter_var($one, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$two = filter_var($two, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$three = filter_var($three, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$four = filter_var($four, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);
$conn = mysql_connect($hostname, $username, $password, $dbName);
$result= mysql_select_db($dbName,$conn);
$query = "update progressive set
one='$one', two='$two', three='$three', four='$four' where session like '$sessionz'";
$result = mysql_query($query);
echo "Record # $$sessionz successfully edited!";
echo "<p class=".success">Successfully Submitted!</p>";
?>

<tr>
<td valign=top>One<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="one" size="24" value="<?php echo $one; ?>"</td>
</tr>
<tr>
<td valign=top>Two<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="two" size="24" value="<?php echo $two; ?>"> </td>
</tr>
<tr>
<td valign=top>Three<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="three" size="24" value="<?php echo $three; ?>"> </td>
</tr>
<tr>
<td valign=top>Four<font color="red">*</font> </td>
<td valign="top"><input class="texta" type="text" name="four" size="24" value="<?php echo $four; ?>"> </td>
</tr>
<tr>
<td valign="top" colspan=4><center><input type="submit" class="submit" Name="submit" value="submit" alt="Please Submit"></td>
</tr>
</table>
</form>