Hello,
INTRO:
I have one page, which is for data entery. Another page that run the SQL insert and stores the data in the database.
WORKING:
When the data is entered in data entry page and SUBMIT button is pressed then it takes the user to another page which saves the data in the database and shows the message that the data has been entered successfully.
PROBLEM:
I'd like to do the data saving by the same page upon data entry after pressing SUBMIT. How can I do this job? I would like to have a messagebox saying that the data has been entered, and reappearing the data entry page blank.
Here is the code of data saving page:
require ('application.php');
$user = $_POST['user'];
$timeofinsert = $_POST['timeofinsert'];
htmlentities($user);
htmlentities($timeofinsert);
mysql_query("INSERT INTO DataCollection (user,timeofinsert) VALUES ('$user','$timeofinsert')");
@mysql_close($mysql_link);
?>
<br />
<br />
<br />
<table><tbody><tr><td>Data has been entered successfully.</td></tr></tbody></table>
I also have problem when I use Polish/Czech characters. Finnish characters go successfully.The data in database is NOT saved like garbage but with ;&#somenumber (I used somenumber because when I write the actual number then this forum translates them back somehow