Shadow Blade
Morrowland Presents Apron Tutorials
game - design - multimedia - web - programming - tutorials - There are currently viewers visiting Apron Tutorials.
   
 
TECHNICAL
GRAPHICAL
SOUND
GAME
WEB
ARTICLE
TOOL
PROJECT
 
 NEWS

  news

  history


 TECHNICAL TUTORIALS

  opengl

  direct3d

  c/c++

  visual basic

  java

  c#


 WEB TUTORIALS

  html

  dhtml

  asp

  php


 IMAGE EDITING

  photoshop

  draw sketch


 3D MODELING

  3d studio


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 DEMOS

  win32 api


 ARTICLES

  general

  opengl


 COMMUNITY

  about us

  credit

  contact






FORMS IN PHP
I will in this tutorial show you how to use forms in php. Forms is used when you want to pass information either over to another site, into a textfile, database, etc.



The Form

You put your form around the variables you want to pass. In this example I will use a textbox that you can pass on. It is the submit input type shown below that trigger the form. The action here is sat the newpage.php. So when you press the submit button you will go to the newpage.php and the values written in the textfield is past along to this site.
The method has two alternative: post and get. The post method is more secure because the user cannot see the variable passed along, while the get-method sends the variable visible in the adresse bar. So if you will make a login system, use the post method :)


See Code In Action


Getting the data from the form

In the form above, we pass the content of the textfile to the newpage.php. We get hold since we use the post method, we get the variable with $HTTP_POST_VARS['txtMyField'] in the newpage.php file.



If you want to use the get method, simply change the method="get" in the form and $HTTP_GET_VARS['txtMyField'].

Download the Source for this tutorial.


PROJECT DESCRIPTION
Category Programming with PHP
Author Tommy Johannessen





Ronny André Reierstad
Morrowland All rights reserved Morrowland © 2002 Apron Tutorials

 LINKS

  morrowland home



 GAME DEVELOPEMENT

  nvidia

  gamedev

  polycount


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 MATH AND PHYSICS

  mathworld

  physicsworld







PLEASE LINK TO


  All rights reserved Morrowland © 2007  
Ronny André Reierstad