View Single Post
  #2 (permalink)  
Old 06-13-2007, 12:55 PM
Lee's Avatar
Lee Lee is offline
PT Staff*
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: Blackpool, UK
Posts: 616
iTrader: (0)
Lee is just really niceLee is just really niceLee is just really niceLee is just really nice
Quote:
Originally Posted by HelloWorld View Post
I've had programming background, but sometimes I'm just confused on where should I start? I've understood some conscept of PHP, but I'm just not sure on how does it work on web application. For example, I want to create a login page:

HTML Code:
<form> <input type="text" id="username"></input> <input type="submit" id="password"></input> </form>
And then, where do you call PHP? I'm sure that it's not like JavaScript right? where you can call it from external, or indented within HEAD tag? How can I process the information based on the ID with PHP? thanx
You could start <form action="handlingform.php"> at the start then it would carry out the instructions in that php file, at the moment i prefer this.

The other way is if you have a php page with the form on you can do:

PHP Code:
<?php

If (isset($_GET['password'])){ //password is name of submit button, thats why we use that.
//do statements like add to db here

} else {

echo 
"table code"// here echo your table
}
(i dont use id="" all that much, i use name="")
i hope i have done this correctly and that it helps.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote