Total members 11893 |It is currently Fri Nov 15, 2024 5:56 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





If you want to take data from the user you will need to do form to user entry .For example if you want to take the mail of visitor what you will do ? :grin: .you will do a form .the html of the form will be like the following :

Code:

 
<html>
 <form action='email.php' method='post'>
 <strong>Email:</strong><input type='text' name='email' size='50' maxlength='50' /><br/>
<
input type='submit' value='submit' />
</
form>
</
html>
 


In the preview code , you are sending a parameter 'email' to a page email.php .you are posting this parameter in the http request to the server .

in the email.php page you can receive this parameter using the function $_POST['paramtername'] .the paramter name here is email . here is the code :
Code:

<html>
<?php
  
   $visitoremail
=$_POST['email'];
   echo "your email is $visitoremail";

?>
</html>


The output from this code depend on the user enter .Assume the the entered email is [email protected] . So the output will be :
Code:

your email is admin
@codemiles.com


any problems send to me a private massage .
Thank you ,



_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : php forms
 Using forms with ASP     -  
 Secure forms without using captcha     -  
 Multipart HTTP forms submitter - With Progress Information     -  



Topic Tags

PHP Forms
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com