iSelfSchooling.com - Since 1999  References  |  Job Openings  |
    Home  | Search more  | Oracle Syntax  | Instructor-Led in Class   | (Members to access to VIDEOS)
 

Copyright & User Agreement

   Suggestions Email2aFriendHomepage us! |  Bookmark

Services

  Vision/Mission

  Services

  Biography

  Contact Us

 FREE Training

  Start...

  SQL

  PL/SQL

  Forms 

  Reports

  DBA Fundamentals

  Performance

  Prepare for OCP

  ShareUrNotes

...

  Acknowledgement

  Who is who

  University Directory

  Links...

 

 

 

How to use GET or POST in PHP?

More Resources by Google:

How to use GET or POST in PHP?


The GET or POST in PHP is a method you may use to pass data information from the form to the processing script. The GET or POST is the same. The only difference is in how the information is passed. Always use POST. You have a limited amount of information to pass by using the GET method. In the GET method, user will be able to see all passing parameters and can be book marked. If the security is involve then the POST method is a must.

Now, let us write a PHP script called handle_ratingweb.php. It should receive and process the data generated by the ratingweb.html page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitionl.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title> Rating from users</title>
</head>

<body>

<?php 
// This page receives the data from ratingweb.html.
print “Thank you $title $name for your rating.” <br />
print “You stated that this web site is: $response” <br />
print “Your comments: <br /> $suggestions” 

// in the case that your register_globals is OFF then do this
print “Thank you {$_POST[‘title’]} {$_POST[‘name’]} for your rating.” <br />
print “You stated that this web site is: {$_POST[‘response’]}” <br />
print “Your comments: <br /> {$_POST[‘suggestions’]}” 
// Notice that you use $_POST or $HTTP_POST_VARS(‘title’) 
// because your method was POST, 
// if your method was GET then you should 
// use $_GET or $HTTP_GET_VARS(‘title’)

// To email it to you.
$to = “help@iselfschooling.com <mailto:help@iselfschooling.com>”;
$from = $_POST[‘email’];
$subject = “Rating iSelfSchooling Web Site.”
$body=$_POST[‘title’] . $_POST[‘name’] . “\n\r” . $_POST[‘response’] “\n\r” . $_POST[‘suggestions’];
Mail ($to, $subject, $body, “From:$from”);

?>
</body>
</html>

 

 

 
 
Google
 
Web web site