That solved my Problem ....Thanks a lot jazz !!🙂.I changed it to "isset" and now it is working fine!!Ty so much and ty phpbuilder.I would like to get more help regarding going back to my edit page.I need all my data to be there in same text field when i press "Edit" button in preview form.How can i achive that .Im using "header(Location:quote.html) on the "Edit" though it takes me to the quote page the data is not there in textarea.Please help .The code is
quote.html
<html>
<head><title>quote</title></head>
<body>
<form action=preview.php method=post>
Address:<textarea name=address rows=3></textarea><br>
<INPUT type="submit" value="Preview"/>
<INPUT type=reset value="Clear"/>
</form>
</body>
</html>
preview.php
<?php
$addr=$_POST['address'];
echo'<form action=preview1.php method=post>';
echo $addr,'<input type=hidden name=address2 value="'.$addr.'">';
echo'<INPUT type="submit" value="Edit"/ name=edit><INPUT type="submit" value="Save"/ name=save>';
echo'</form>';
?>
preview1.php
<?php
$addr1=$_POST['address2'];
if(isset($_POST['edit'])) {
header('Location: quote.html');
}
elseif(isset($_POST['save'])) {
$host = "localhost";
$user = "username";
$pass = "password";
$dbname = "dbname";
$conn = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."<BR>");
mysql_select_db($dbname);
$request = "INSERT INTO tablename (address)value('".$addr1."')";
$results = mysql_query($request,$conn);
if($results)
{
echo "Document SAVED<br>";
}
else
{
echo "There was an error. Try Again.";
}
}
?>
Here is there any method for storing the input in three lines(The address) as it is
entered and to display it . Hope my problem will be solved out with so many seniors like you being here.
Thanking you
anoopd