i have 4 input box of credit card number and 2 boxes of credit card expire date month and year and one for the card holder name i have some code but is it ok or i have to do some thing else
<?php
$connection = mysql_connect("localhost","root","password") or die("error connect");
mysql_select_db("online_bus_project");
if(isset($_POST['submit']))
{
$first_name = $_POST["fname"];
$len = strlen($first_name);
if ($len >0)
{
$card_number = $_POST["card_number1","card_number2","card_number3","card_number4"];
$expiry_date = $_POST["card_exp_mm","card_exp_yy"];
}
$query = "INSERT INTO payment (name, number, expire) VALUES('$first_name', '$card_number', '$expiry_date')";
mysql_query($query, $connection) or die(mysql_error());
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="obrs.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixRtHdr #sidebar1 { width: 220px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixRtHdr #sidebar1 { padding-top: 30px; }
.twoColFixRtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
.style1 {
color: #FFFF00;
font-weight: bold;
}
.style2 {
color: #FFFF66;
font-weight: bold;
}
#payment_box {
height: 40px;
width: 150px;
margin-top: 100px;
}
#payment_form {
height: 150px;
width: 400px;
margin-top: 40px;
}
.style3 {
font-size: 16px;
font-weight: bold;
color: #333333;
}
-->
</style>
</head>
<body class="twoColFixRtHdr">
<div id="container">
<div id="header">
<!-- end #header -->
<img src="images/header" alt="OBTRS: Header" /></div>
<div id="sidebar1">
<!-- end #sidebar1 -->
<img src="images/sidebar_slideshow" alt="" />
<div id="blogarea">
<p class="style2">Casual Dining Restaurants</p>
<p><br />
Our family-style restaurants are the favorite of thousands of tourists and professional drivers alike. Our clean and friendly surroundings encourage people to stop and enjoy a wholesome meal with us when they travel. Our customers recognize our strong teamwork ethic as we provide them quality service.</p>
<p><br />
<span class="style1">Convenience Stores</span></p>
<p><br />
Our cashiers take pride in having the items on the shelf ready for our travelers when they stop. We know many are in a hurry and we need to be "fast" to meet their busy schedules. Some of our returning customers enjoy fresh coffee and we have it ready for them. The joint effort of our managers and associates creates a strong "team spirit" that provides the customers what they are looking for as they travel.</p>
</div>
</div>
<div id="mainContent">
<div id="nav">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','760','height','30','src','images/nav_bar2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/nav_bar2' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="760" height="30">
<param name="movie" value="images/nav_bar2.swf" />
<param name="quality" value="high" />
<embed src="images/nav_bar2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="760" height="30"></embed>
</object>
</noscript>
</div>
<CENTER>
<form name="payment" action="" method="post">
<div class="style3" id="payment_box"> Make Payment<br />
Card Details </div>
<center><div id="payment_form">
<div align="left">
<p class="style3">Card Holder's Name: <input type="text" name="chname" /><br /><br />
Card Number:
<INPUT name=card_number1 size=4 maxlength=4> <INPUT name=card_number2 size=4 maxlength=4> <INPUT name=card_number3 size=4 maxlength=4> <INPUT name=card_number4 size=4 maxlength=4> <br />
<br />
Card Expiry Date: <INPUT name=card_exp_mm size=2 maxlength=2> / <INPUT name=card_exp_yy
size=4 maxlength=4><br /><br /><center><input type="submit" value="Submit"></div>
</div>
</form>
</center>
<div id="features"></div>
<!-- end #mainContent -->
</div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
<br class="clearfloat" />
<div id="footer">
<p><a href="aboutus.html">About us</a> |<a href="feedback.html"> Feedback</a> |<a href="faqs.html"> FAQs</a> | <a href="terms.html">Terms & Conditions</a> | <a href="contactus.html">Contact us</a></p>
<p> 2009 Copyright - Shah Abdul Latif University Khairpur</p>
<!-- end #footer -->
</div>
<!-- end #container -->
</div>
</body>
</html>