Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML
<html>
<head>
<meta id="_moz_html_fragment">
<title>F.H.M.S</title>

 <meta name="viewport" content="width=device-width, initial-scale=1"/>
 
<link type="text/css" rel="stylesheet" href="css/materialize.min.css"  media="screen,projection"/>
 
 <link type="text/css" rel="stylesheet" href="css/sweet-alert.css"  media="screen,projection"/>
</head>

	<nav>
	<img src="logo.png" align="left" height="75px" style="margin-left:5%;">
			<div class="nav-wrapper z-depth-1">
				<div class="container">
					<div class="col s12 m12 l12">
				        <a href="#" class="brand-logo">Food Handlers Management System</a>
						<ul class="right hide-on-med-and-down">
				          	<li class="active"><a href="index.html">Home</a></li>
				          	<li><a href="about1.php">^__i class="mdi-editor-mode-edit left">About</a></li>
				          	

				        </ul>
		      		</div>
				</div>
		  	</div>
		</nav>
	
	<br />
$id=$_POST['Client id'];
$name=$_POST['Client name'];
$Company=$_POST['Name Of The Company'];
$Sex=$_POST['Sex'];
$Specimen=$_POST['Specimen'];
$Mobile=$_POST['Mobile'];
$Type=$_POST['Type'];
$Comments=$_POST['Comments'];
$con=@mysql_connect("localhost","root","root") or die(mysql_error());
$db=@mysql_select_db("fhms.sql",$con)or die(mysql_error());
$query = "select * from client";
$qno = mysql_query($query)
or die("Query error: $query<hr />" . mysql_error());
$query = "select * from client";
$n = mysql_num_rows ($qno);
print "<table border="1">\n";
while ($user = mysql_fetch_assoc($qno)) // While a record is retrieved...
{
// Print column headings if first row
if (!$header_printed)
{
print "\t<tr>\n";
$fields = array_keys ($user);
$str="insert into client values('$Clientid','$Clientname','$NameOfTheCompany','$Sex','$Specimen','$Mobile','$Type','$Comments)";
$res=@mysql_query($str)or die(mysql_error());
if($res>=0)
{
echo'<br><br>Thank you,the Client you registered as been added to Food Handlers Management System!!<br>';
}

?>
<html>
<br>
<a href="agent.html" class="btn">Back</a>
	<footer class="page-footer">
    <div class="container">
      <div class="row">
        <div class="col l6 s12">
          <h5 class="white-text">Research Bio</h5>
          <p class="grey-text text-lighten-4">Food Handlers is found in CPHR center where.....<form method="post" action="index.html" style="margin-left:10%">
					<input value="Read More" name="Read More" type="submit" class="btn"><br>
					
				</form></br></p>

        </div>
        <div class="col l3 s12">
          <h5 class="white-text">More </h5>
          <ul>
            <li><a class="white-text" href="pat.html">View Patners</a></li>
            <li><a class="white-text" href="mat.html">Site Map</a></li>
            <li>webmaster meru hospital.
      </li></ul></div>
    </div>
  </div></footer>
	</body>
	<script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/materialize.min.js"></script>
    <script type="text/javascript" src="js/sweet-alert.js"></script>
	<script type="text/javascript">
      		$(document).ready(function(){
		       $('.slider').slider({full_width: false});
		    });
		function validate(){

			var name=document.myForm.username.value;
			var password=document.myForm.password.value;

	if(name=="" || password==""){
 sweetAlert("Oops...", "Wrong Password/Username", "error");
return false;window.location="index.html";}}
  </script>

  </html></br></br></br></br></tr></table>
Posted
Updated 15-Jun-15 0:01am
v2
Comments
Andy Lanng 15-Jun-15 6:02am    
please specify which line is 122? You may have formatting that was missed here
Jochen Arndt 15-Jun-15 6:08am    
Your posted code has less than 122 lines and seems not to be the file addpatient.php.

1 solution

This is horrible code dump that does not make sense at all, discard it asap. The only way is to learn to write the code yourself http://www.w3schools.com/php/[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900