HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank

Reply to topic Page 1 of 1
I have a form question.
Message  

Reply with quote
Post I have a form question. 
I have a form and I was wondering how to create a confirmation page that can go back and edit the information. I was going to make the boxes invisible but I heard there is a security risk with it. I also was wondering how I can include the time and date in the email when they submit the form. Eventually I would like to learn how to send the information to a database which can create an excel sheet does anyone know a good tutorial or and sample which I could learn off of?
Thanks for reading!

View user's profile Send private message

Reply with quote
Post  
The best way to do that is use JQuery or AJAX for confirmation. Otherwise you can use the PHP variables within the form:

Code:

<?php
 $username=trim($_POST['username']);
 $password=$_POST['password'];

 if(strlen($username)<3)
  echo 'your username should be more than 3 symbols long';

?>

<form action="" method="post">
username <input type="text" value="<?=@$username?>" />
password <input type="password" value="" />
</form>


something like this.

About time and the date - use the date function. for instance:

Code:

date('Y-m-d H:i:s');


If you want to store time and date in the database, you should create a field with "datetime" type and when you insert or update a row use the NOW() function. for instance

Code:

INSERT INTO mytable(mytime, username) VALUES (NOW(), 'myusername')



_________________
First free hosting reseller program
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  




FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Web Hosting
Web Hosting and Dedicated Servers Advertise Here $10 a Month Designer Children
Insurance HGH Domain name registration
Affordable web-hosting Dedicated Server Management

Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com