Quote Originally Posted by image View Post
DAY 7 PHP PROGRAMMING

http://php.flashwebhost.com/tom/day_7_ex_2.html

Code:
<html>
<body>


<h1>Welcome to Online Booking Center</h1>


<p>Please enter your email id below to book your show.</p>


<form method="GET" action="http://www.catchmyseat.com">
    Enter Your Email ID: <input name="email" type="text">
    <button type="submit">Book Now</button>
</form>


</body>
</html>
http://php.flashwebhost.com/tom/day_7_ex_2.php

Code:
<?php


echo '<h1>Hello, ' . $_GET['email'] . ' Wecome to Online Booking Center</h1>';

I think many don't understand the concept. Why we have two files. In above example

http://php.flashwebhost.com/tom/day_7_ex_2.php

Is the PHP file. We need visitors enter their name, so that PHP script know name of visitor and show a personalized page with visitor name.

The solution here with toms script is to use following URL

Code:
http://php.flashwebhost.com/tom/[email protected]
Now you see

Hello, [email protected] Wecome to Online Booking Center
Now can we get our visitors to enter email ? Will visitors know how to get GET method or what is GET method ?

This is where we need an HTML form page, where we ask user what is his email. Like

http://php.flashwebhost.com/tom/day_7_ex_2.html

In toms code

Code:
<form method="GET" action="http://www.catchmyseat.com">
Action need to be set to our PHP file, that is

Code:
<form method="GET" action="day_7_ex_2.php">
Hope everyone will try to understand this concept, ask others or discuss here if you don't understand, someone will be able to explain it better than me, or i can try again