Location: PHPKode > scripts > Full Payment and Registration > full-payment-and-registration/class.php
<?php
/*
	This class will make the hole payment and registration proccess
	Made by Ashraf Gheith - NurAzije
	for more information please visit http://nurazije.blogspot.com
	or email me at hide@address.com
	Thank you Harish for your credit card validator
*/
class connect_easy
{

	var $host = "localhost"; // default host
	var $user = "root"; // default user
	var $db = "register"; // default database
	var $pass = ""; // default password
	var $query; // default query string
	var $error = NULL; // default msg array
	var $numrow; // rows number
	var $numfield; // fields number
	var $twoD; // 2D fetched result array
	
	function connect_easy_function() // DB function doing all the work
	{
		if(!$connect = mysql_connect($this->host,$this->user,$this->pass)){ // connect to the DB server
			$this->error = mysql_error($connect);
		}
		if(!mysql_select_db($this->db)){ // select the DB
			$this->error = mysql_error($connect);
		}
		if(!($result = mysql_query($this->query))){ // make the query statement
			$this->error = mysql_error($connect);
		}
		$this->numrow = @mysql_num_rows($result); // count the rows
		$this->numfield = @mysql_num_fields($result); // count the fields
		for($x=0;$x<$this->numrow;$x++)
		{
			$oneD = mysql_fetch_array($result); // fetched result in 1D array
				for($i = 0;$i<$this->numfield;$i++)
				{
					$this->twoD[$x][$i] = $oneD[$i]; // convert the result to 2D array
				}
		}
		return $this->twoD;
	}
}
// this class have been made by Harish Chauhan, thank you Harish..
class CCVAL
	{
	
		function _checkSum($ccnum)
		{
			$checksum = 0;
			for ($i=(2-(strlen($ccnum) % 2)); $i<=strlen($ccnum); $i+=2)
			{
				$checksum += (int)($ccnum{$i-1});
			}
			// Analyze odd digits in even length strings or even digits in odd length strings.
		    for ($i=(strlen($ccnum)% 2) + 1; $i<strlen($ccnum); $i+=2) 
			{
			  $digit = (int)($ccnum{$i-1}) * 2;
			  if ($digit < 10) 
				  { $checksum += $digit; } 
			  else 
				  { $checksum += ($digit-9); }
		    }
			if (($checksum % 10) == 0) 
				return true; 
			else 
				return false;

		}

		function isVAlidCreditCard($ccnum,$type="",$returnobj=false)
		{
			$creditcard=array(  "visa"=>"/^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/",
								"mastercard"=>"/^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/",
								"discover"=>"/^6011-?\d{4}-?\d{4}-?\d{4}$/",
								"amex"=>"/^3[4,7]\d{13}$/",
								"diners"=>"/^3[0,6,8]\d{12}$/",
								"bankcard"=>"/^5610-?\d{4}-?\d{4}-?\d{4}$/",
								"jcb"=>"/^[3088|3096|3112|3158|3337|3528]\d{12}$/",
								"enroute"=>"/^[2014|2149]\d{11}$/",
								"switch"=>"/^[4903|4911|4936|5641|6333|6759|6334|6767]\d{12}$/");
			if(empty($type))
			{
				$match=false;
				foreach($creditcard as $type=>$pattern)
					if(preg_match($pattern,$ccnum)==1)
					{
						$match=true;
						break;
					}

				if(!$match)
					return false;
				else
				{
					if($returnobj)
					{
						$return=new stdclass;
						$return->valid=$this->_checkSum($ccnum);
						$return->ccnum=$ccnum;
						$return->type=$type;
						return $return;
					}
					else
						return $this->_checkSum($ccnum);
				}
			
			}
			else
			{
				if(@preg_match($creditcard[strtolower(trim($type))],$ccnum)==0)
					return false;
				else
				{
					if($returnobj)
					{
						$return=new stdclass;
						$return->valid=$this->_checkSum($ccnum);
						$return->ccnum=$ccnum;
						$return->type=$type;
						return $return;
					}
					else
						return $this->_checkSum($ccnum);
				}
			}
		}
}

class registration
{
	var $status; // default status

	function view_registration()
	{
		if(!empty($_POST["status"]))
		{
			$this->status  = $_POST["status"];
		}else{
			$this->status  = $_SESSION["status"];
		}
		
		switch($this->status)
		{
			case "login_form":
				session_destroy();
				die("Here our script ends, please link your login page to this page on line 141 file class.php");
				break;
			case "db_proc":	
				$this->db_proc();
				break;
			case "confirmation":
				$this->confirmation_proc();
				break;
			case "check_proc3":
				$this->check_proc_three();
				break;
			case "check_proc1":
				$this->check_proc_one();
				break;
			case "profile_form":
				$this->display_form_profile();
				break;
			case "check_proc2":
				$this->check_proc_two();
				break;
			case "cc_form":
				$this->display_form_cc();
				break;
			default:
				$this->display_form_start();
				break;
		}
	}
	
	function db_proc()
	{
		$sub_option = addslashes($_SESSION["sub_option"]);
		$email = addslashes($_SESSION["email"]);
		$pass = $_SESSION["pass"];
		$passmd5 = md5(addslashes($_SESSION["pass"]));
		$first_name = addslashes($_SESSION["first_name"]);
		$last_name = addslashes($_SESSION["last_name"]);
		$company = addslashes($_SESSION["company"]);
		$position = addslashes($_SESSION["position"]);
		$telephone = addslashes($_SESSION["telephone"]);
		$revenues = addslashes($_SESSION["revenues"]);
		$residence = addslashes($_SESSION["residence"]);
		$owner_name = addslashes($_SESSION["owner_name"]);
		$address = addslashes($_SESSION["address"]);
		$city = addslashes($_SESSION["city"]);
		$zip = addslashes($_SESSION["zip"]);
		$cc_num = addslashes($_SESSION["cc_num"]);
		$security_code = addslashes($_SESSION["security_code"]);
		$cc_type = addslashes($_SESSION["cc_type"]);
		$exp_date = addslashes($_SESSION["exp_date"]);
		$operations = new connect_easy();
		$operations->query = "INSERT INTO `info` ( `user_id` , `company` , `position` , `telephone` , `revenues` , `residence` , `address` )VALUES ( NULL , '$company', '$position', '$telephone', '$revenues', '$residence', '$address' )";
		$operations->connect_easy_function();
		$operations->query = "INSERT INTO `sub_cc` ( `user_id` , `sub_option` , `owner_name` , `city` , `zip` , `cc_num` , `cc_type` , `security_code` , `exp_date` )VALUES (NULL , '$sub_option', '$owner_name', '$city', '$zip', '$cc_num', '$cc_type', '$security_code', '$exp_date')";
		$operations->connect_easy_function();
		$operations->query = "INSERT INTO `users` ( `user_id` , `email` , `pass` , `first_name` , `last_name` )VALUES (NULL , '$email', '$passmd5', '$first_name', '$last_name')";
		$operations->connect_easy_function();
		$to = $email;
		$subject = 'You have been registered succesfuly!';
		$message = '<br>Thank you for registration on our site!<br>Your login is : $email<br>Your passowrd : $pass<br><br><br>regards,<br>Ashraf Gheith';
		$headers = "From: hide@address.com\r\n" .
       'X-Mailer: PHP/' . phpversion() . "\r\n" .
       "MIME-Version: 1.0\r\n" .
       "Content-Type: text/html; charset=utf-8\r\n" .
       "Content-Transfer-Encoding: 8bit\r\n\r\n";
		// Send email
		mail($to, $subject, $message, $headers);
		$_SESSION["status"] = "login_form";
		header("Location: index.php");
	}
	
	function confirmation_proc()
	{
		print "<h2>Review Info!</h2>
					<p>Please read and submit</p>
					<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"90%\" style=\"border-top: 1px solid #9FB7CD; border-left: 1px solid #9FB7CD; border-right: 1px solid #9FB7CD; border-bottom: 1px solid #9FB7CD;\">
					 <tr><td align=\"left\" bgcolor=\"#00CCFF\">Subscription information</td></tr>
					 <tr><td align=\"right\"><form action=\"index.php\" method=post name=edit_first><input type=hidden name=status value=\"form\"><input type=submit value=Edit></form></td></tr>
					<tr><td align=\"left\">Subscription Option : <font color=green>".$_SESSION["sub_option"]."</font></td></tr>
					<tr><td align=\"left\">Your email : <font color=green>".$_SESSION["email"]."</font></td></tr>
					<tr><td align=\"left\">Your password  : <font color=green>".$_SESSION["pass"]."</font></td></tr></table>
					<br>
					<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"90%\" style=\"border-top: 1px solid #9FB7CD; border-left: 1px solid #9FB7CD; border-right: 1px solid #9FB7CD; border-bottom: 1px solid #9FB7CD;\">
					 <tr><td align=\"left\" bgcolor=\"#00CCFF\">Personal information</td></tr>
					 <tr><td align=\"right\"><form action=\"index.php\" method=post name=edit_second><input type=hidden name=status value=\"profile_form\"><input type=submit value=Edit></form></td></tr>
					<tr><td align=\"left\">You have agreed to terms and conditions <a href=\"#\">Read Again</a></td></tr>
					<tr><td align=\"left\">Frist Name : <font color=green>".$_SESSION["first_name"]."</font></td></tr>
					<tr><td align=\"left\">Last Name  : <font color=green>".$_SESSION["last_name"]."</font></td></tr>
					<tr><td align=\"left\">Company  : <font color=green>".$_SESSION["company"]."</font></td></tr>
					<tr><td align=\"left\">Position  : <font color=green>".$_SESSION["position"]."</font></td></tr>
					<tr><td align=\"left\">Telephone : <font color=green>".$_SESSION["telephone"]."</font></td></tr>
					<tr><td align=\"left\">Company Revenues  : <font color=green>".$_SESSION["revenues"]."</font></td></tr>
					<tr><td align=\"left\">Conutry of Residence  : <font color=green>".$_SESSION["residence"]."</font></td></tr>
					</table>
					<br>
					<table align=\"center\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"90%\" style=\"border-top: 1px solid #9FB7CD; border-left: 1px solid #9FB7CD; border-right: 1px solid #9FB7CD; border-bottom: 1px solid #9FB7CD;\">
					  <tr><td align=\"left\" bgcolor=\"#00CCFF\">Credit Card information</td></tr>
					  <tr><td align=\"right\"><form action=\"index.php\" method=post name=edit_third><input type=hidden name=status value=\"cc_form\"><input type=submit value=Edit></form></td></tr>
					<tr><td align=\"left\">Owner Name (as it is written on credit card): <font color=green>".$_SESSION["owner_name"]."</font></td></tr>
					<tr><td align=\"left\">Address: <font color=green>".$_SESSION["address"]."</font></td></tr>
					<tr><td align=\"left\">City: <font color=green>".$_SESSION["city"]."</font></td></tr>
					<tr><td align=\"left\">Zip Code: <font color=green>".$_SESSION["zip"]."</font></td></tr>
					<tr><td align=\"left\">CC Number: <font color=green>".$_SESSION["cc_num"]."</font></td></tr>
					<tr><td align=\"left\">Security Code: <font color=green>".$_SESSION["security_code"]."</font></td></tr>
					<tr><td align=\"left\">Credit Card Type: <font color=green>".$_SESSION["cc_type"]."</font></td></tr>
					<tr><td align=\"left\">Exipration Date: <font color=green>".$_SESSION["exp_date"]."</font></td></tr>
					</table>
					<center>
									<p>If all of above is correct and understud Please proceed by click on submit.</p></center>
					<br>
					<center>
					<form action=\"index.php\" method=\"post\" name=\"confirmation\"><input type=\"hidden\" name=\"status\" value=\"db_proc\">
					<input type=\"submit\" value=\"Submit\">
					</form></center>";
	}

	function display_form_start()
	{	
		print "<div><font color=red size=1>".$_SESSION["error"]."</font></div><form action=\"index.php\" method=\"post\" name=\"reg_form\">
					<table width=\"50%\" border=\"0\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\"><tr><td align=\"left\"><div align=\"left\">Subscription Option :
					</div></td><td align=\"left\">
					<select name=\"sub_option\" size=\"1\" id=\"sub_option\">";
		if($_SESSION["sub_option"])
		{
			print "<option value=\"".$_SESSION["sub_option"]."\" selected>".$_SESSION["sub_option"]."</option>";
		}			
		print "<option value=\"24 hours subscription\">24 hours subscription</option>
					<option value=\"1 month subscription\">1 month subscription</option>
					<option value=\"6 months subsciption\">6 months subsciption</option>
					<option value=\"1 year subscription\">1 year subscription</option>
					</select>
					</td>
				  	</tr>
				  	<tr> 
					<td align=\"left\">
					<div align=\"left\">Your email :</div></td>
					<td align=\"left\">
					<input type=\"text\" name=\"email\" value=\"".$_SESSION["email"]."\">
					</td>
				  	</tr>
				  	<tr> 
					<td align=\"left\">
					<div align=\"left\">Your password :</div></td>
					<td align=\"left\">
					<input name=\"pass\" type=\"password\" id=\"pass\" value=\"".$_SESSION["pass"]."\">
					</td>
				  	</tr>
				  	<tr> 
					<td align=\"left\">
					<div align=\"left\">Verificate password :</div></td>
					<td align=\"left\">
					<input name=\"ver_pass\" type=\"password\" id=\"ver_pass\" value=\"".$_SESSION["ver_pass"]."\">
					</td>
				  	</tr>
				  	<tr> 
					<td align=\"left\">
					</td>
					<td align=\"left\"> 
					<input name=\"terms\" type=\"checkbox\" value=\"checked\">
					I agree to <a href=\"#\">terms and conditions</a></td>
				  	</tr>
				  	<tr> 
					<td align=\"left\"></td>
					<td align=\"left\"><input type=hidden name=status value=check_proc1><input type=\"submit\" value=\"OK\"></td>
				  	</tr></table></form>";
	}
	
	var $error=NULL;
	
	function check_proc_three()
	{
		$owner_name = $_POST["owner_name"];
		$address = $_POST["address"];
		$city= $_POST["city"];
		$cc_num = $_POST["cc_num"];
		$security_code = $_POST["security_code"];
		$cc_type = $_POST["card_type"];
		$exp_date = $_POST["exp_date"];
		$zip = $_POST["zip"];
		if(($owner_name == "")||($owner_name == NULL))
		{
			$this->error .= "Please insert the owner name.<br>";
		}
		if(($address == "")||($address == NULL))
		{
			$this->error .= "Please insert the address.<br>";
		}
		if(($city == "")||($city == NULL))
		{
			$this->error .= "Please insert the city.<br>";
		}
		if(($security_code == "")||($security_code == NULL))
		{
			$this->error .= "Please insert credit cards security code.<br>";
		}
		if(($cc_type == "")||($cc_type == NULL))
		{
			$this->error .= "Please select your credit card type.<br>";
		}
		if(($exp_date == "")||($exp_date == NULL))
		{
			$this->error .= "Please select an expiration date of the credit card.<br>";
		}
		$cc = new CCVAL;
		$ccnum = $cc_num;
		$cctype = $cc_type;
		if(!$cc->isVAlidCreditCard($ccnum,$type))
		{
			$this->error .= "Please insert a regular credit card number. <br>";
		}
		if(!empty($this->error))
		{
			$_SESSION["status"] = "cc_form";
			$_SESSION["owner_name"] = $owner_name;
			$_SESSION["address"] = $address;
			$_SESSION["city"] = $city;
			$_SESSION["security_code"] = $security_code;
			$_SESSION["cc_type"] = $cc_type;
			$_SESSION["exp_date"] = $exp_date;
			$_SESSION["cc_num"] = $cc_num;
			$_SESSION["zip"] = $zip;
			$_SESSION["error"] = $this->error;
			header("Location: index.php");
		}else{
			$_SESSION["status"] = "confirmation";
			$_SESSION["owner_name"] = $owner_name;
			$_SESSION["address"] = $address;
			$_SESSION["city"] = $city;
			$_SESSION["security_code"] = $security_code;
			$_SESSION["cc_type"] = $cc_type;
			$_SESSION["exp_date"] = $exp_date;
			$_SESSION["cc_num"] = $cc_num;
			$_SESSION["zip"] = $zip;
			$_SESSION["error"] = "";
			header("Location: index.php");
		}
	}
	
	function check_proc_two()
	{
		$first_name = $_POST["first_name"];
		$last_name = $_POST["last_name"];
		$company = $_POST["company"];
		$position = $_POST["position"];
		$telephone = $_POST["telephone"];
		$revenues = $_POST["revenues"];
		$residence = $_POST["residence"];
		if(($first_name == "")||($first_name == NULL))
		{
			$this->error .= "Please insert your first name.<br>";
		}
		if(($last_name == "")||($last_name == NULL))
		{
			$this->error .= "Please insert your last name.<br>";
		}
		if(($company == "")||($company == NULL))
		{
			$this->error .= "Please insert your company.<br>";
		}
		if(($position == "")||($position == NULL))
		{
			$this->error .= "Please select your postion.<br>";
		}
		if(($telephone == "")||($telephone == NULL))
		{
			$this->error .= "Please insert your telephone number.<br>";
		}
		if(($revenues == "")||($revenues == NULL))
		{
			$this->error .= "Please select your company revenues.<br>";
		}
		if(($residence == "")||($residence == NULL))
		{
			$this->error .= "Please select your country residence.<br>";
		}
		if(!preg_match('/^(\+|00)[1-9]{1,3}(\.|\s|-)?([0-9]{1,5}(\.|\s|-)?){1,3}$/', $telephone))
		{
			$this->error .= "Please insert a regular international telephone number.<br>";
		}
		if(!empty($this->error))
		{
			$_SESSION["status"] = "profile_form";
			$_SESSION["first_name"] = $first_name;
			$_SESSION["last_name"] = $last_name;
			$_SESSION["company"] = $company;
			$_SESSION["position"] = $position;
			$_SESSION["telephone"] = $telephone;
			$_SESSION["revenues"] = $revenues;
			$_SESSION["residence"] = $residence;
			$_SESSION["error"] = $this->error;
			header("Location: index.php");
		}else{
			$_SESSION["status"] = "cc_form";
			$_SESSION["first_name"] = $first_name;
			$_SESSION["last_name"] = $last_name;
			$_SESSION["company"] = $company;
			$_SESSION["position"] = $position;
			$_SESSION["telephone"] = $telephone;
			$_SESSION["revenues"] = $revenues;
			$_SESSION["residence"] = $residence;
			$_SESSION["error"] = "";
			header("Location: index.php");
		}
	}
	
	
	function check_proc_one()
	{
		$sub_option = $_POST["sub_option"];
		$email = $_POST["email"];
		$pass = $_POST["pass"];
		$ver_pass = $_POST["ver_pass"];
		$terms = $_POST["terms"];
		$regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]+\.[A-z0-9]{2,6}$/';
		if(!preg_match($regex, $email))
		{
			$this->error .= "Please insert a regular email address .<br>";
		}elseif(($email == "")||($email == NULL))
		{
			$this->error .= "Please insert and email address .<br>";
		}
		if(($pass == "")||($pass == NULL))
		{
			$this->error .= "Please insert a password .<br>";
		}
		if(($ver_pass == "")||($ver_pass == NULL))
		{
			$this->error .= "Please insert a password confirmation .<br>";
		}
		if(($pass != $ver_pass)&&((!empty($pass))&&(!empty($ver_pass))))
		{
			$this->error .= "Please check your password confirmation, passwords did not match .<br>";
		}
		if($terms != "checked")
		{
			$this->error .= "Please read and agree to the Terms and Conditions .<br>";
		}
		if(!empty($this->error))
		{
			$_SESSION["status"] = "";
			$_SESSION["sub_option"] = $sub_option;
			$_SESSION["email"] = $email;
			$_SESSION["pass"] = $pass;
			$_SESSION["ver_pass"] = $ver_pass;
			$_SESSION["error"] = $this->error;
			header("Location: index.php");
		}else{
			$_SESSION["status"] = "profile_form";
			$_SESSION["sub_option"] = $sub_option;
			$_SESSION["email"] = $email;
			$_SESSION["pass"] = $pass;
			$_SESSION["error"] = "";
			header("Location: index.php");
		}
	}
	
	function display_form_cc()
	{
		print "<div><font color=red size=1>".$_SESSION["error"]."</font></div><form action=\"index.php\" method=\"post\" name=\"cc_form\"><input type=hidden name=status value=\"check_proc3\">
		<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\" width=\"70%\" align=center>
		  <tr> 
			<td colspan=\"2\" >You have selected : ".$_SESSION["sub_option"]."</td>
		  </tr>
		  <tr> 
			<td ><font face=\"Arial\">Owner Name</font></td>
			<td ><input name=\"owner_name\" size=\"70\" value=\"".$_SESSION["owner_name"]."\"></td>
		  </tr>
		  <tr> 
			<td >Address </td>
			<td ><input name=\"address\"  size=\"75\" value=\"".$_SESSION["address"]."\"></td>
		  </tr>
		  <tr> 
			<td >City</td>
			<td > <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >
				<tr> 
				  <td><input type=\"text\"  size=\"36\" name=\"city\" value=\"".$_SESSION["city"]."\"></td>
				  <td>&nbsp;Zip&nbsp;</td>
				  <td><input name=\"zip\"  size=\"15\" value=\"".$_SESSION["zip"]."\"></td>
				</tr>
			  </table></td>
		  </tr>
		  <tr> 
			<td >Card #</td>
			<td ><input name=\"cc_num\"  size=\"75\" value=\"".$_SESSION["cc_num"]."\"></td>
		  </tr>
		  <tr> 
			<td >Security Code#</td>
			<td > <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >
				<tr> 
				  <td><input type=\"text\"  size=\"12\" name=\"security_code\" value=\"".$_SESSION["security_code"]."\"></td>
				  <td><nobr>&nbsp;&nbsp;&nbsp;Click here for information on your <a href=\"#\">security 
					code</a>.</nobr></td>
				</tr>
			  </table></td>
		  </tr>
		  <tr> 
			<td >Type of Card : </td><td > <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >
				<tr> 
				  <td><input type=\"radio\" value=\"visa\" name=\"card_type\" value=\"\"></td>
				  <td>Visa</td>
				  <td><input type=\"radio\" value=\"mastercard\" name=\"card_type\" value=\"\" ></td>
				  <td>Mastercard</td>
				  <td><input type=\"radio\" value=\"amex\" name=\"card_type\" value=\"\" ></td>
				  <td>American Express</td>
				  <td><input type=\"radio\" value=\"discover\" name=\"card_type\" value=\"\"></td>
				  <td>Discover</td>
				</tr>
			  </table></td>
		  </tr>
		  <tr> 
			<td >Expiration Date</td>
			<td ><select name=\"exp_date\">";
		if(!empty($_SESSION["exp_date"]))
		{
			print "<option value=\"".$_SESSION["exp_date"]."\">".$_SESSION["exp_date"]."</option>";
		}else{
			print "<option value=\"\">Select Expiration Date</option>";
		}
		for($i=0;$i<24;$i++){
			print "<option value=\"".date("M-Y", mktime(0, 0, 0, date("m")+$i-1, 32, 2006))."\">".date("M-Y", mktime(0, 0, 0, date("m")+$i-1, 32, 2006))."</option>";
		}
		print "</select></td>
		  </tr>
		  <tr> 
			<td>&nbsp;</td>
			<td align=\"left\"><input type=\"submit\" value=\"Pay\" align=\"left\"></td>
		  </tr>
		</table></form>";
	}
	
	function display_form_profile()
	{
		print "<div><font color=red size=1>".$_SESSION["error"]."</font></div><form action=\"index.php\" method=\"post\" name=\"form_two\"><input type=hidden name=status value=\"check_proc2\">
		<table width=\"50%\" border=\"1\" align=\"center\" cellpadding=\"5\" cellspacing=\"0\">
		  <tr> 
			<td colspan=\"2\">You have selected : ".$_SESSION["sub_option"]."</td>
		  </tr>
		  <tr> 
			<td>First name :</td>
			<td><input type=\"text\" name=\"first_name\" value=\"".$_SESSION["first_name"]."\"></td>
		  </tr>
		  <tr> 
			<td>Last name:</td>
			<td><input type=\"text\" name=\"last_name\"  value=\"".$_SESSION["last_name"]."\"></td>
		  </tr>
		  <tr> 
			<td>Company :</td>
			<td><input type=\"text\" name=\"company\" value=\"".$_SESSION["company"]."\"></td>
		  </tr>
		  <tr> 
			<td>Position :</td>
			<td><select name=\"position\">";
		if($_SESSION["position"])
		{
			print "<option value=\"".$_SESSION["position"]."\" selected>".$_SESSION["position"]."</option>";
		}
		print "<option value=\"\">Select One</option><option value=\"Mr\">Mr.</option><option value=\"Ms\">Ms.</option><option value=\"Miss\">Miss.</option></select></td>
		  </tr>
		  <tr> 
			<td>Telephone :</td>
			<td><input type=\"text\" name=\"telephone\" value=\"".$_SESSION["telephone"]."\"></td>
		  </tr>
		  <tr> 
			<td>Company revenues :</td>
			<td><select name=\"revenues\">";
		if(!empty($_SESSION["revenues"]))
		{
			print "<option value=\"".$_SESSION["revenues"]."\" selected>".$_SESSION["revenues"]."</option>";
		}
		print "<option value=\"\">Select One</option><option value=\"$1,000,000\">$1,000,000</option><option value=\"$2,000,000\">$2,000,000</option><option value=\"$3,000,000\">$3,000,000</option></select></td>
		  </tr>
		  <tr> 
			<td>Country of residence :</td>
			<td><select name=\"residence\">";
		if(!empty($_SESSION["residence"]))
		{
			print "<option value=\"".$_SESSION["residence"]."\" selected>".$_SESSION["residence"]."</option>";
		}	
		print "<option>Select One</option>
				  <option>Jordan</option>
				  <option>England</option>
				  <option>Algeria</option>
				  <option>France</option>
				  <option>BiH</option>
				</select></td>
		  </tr>
		  <tr> 
			<td>&nbsp;</td>
			<td><input type=\"submit\" value=\"OK\"></td>
		  </tr>
		</table></form>";
	}
}
?>
Return current item: Full Payment and Registration