Viewing file: memberupdation.php (10.56 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include ('account.php'); ?> <?php include ('receipt.php'); ?> <script type="text/javascript"> function changeValue(){ var option=document.getElementById('filter').value;
if(option=="A"){ document.getElementById('field').value="A Selected"; } else if(option=="B"){ document.getElementById('field').value="B Selected"; }
} </script> <!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>Account Create</title> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } body { background-color: #CCC; } </style> <script language="JavaScript" type="text/javascript"> <!--
function Toggle(obj){ var val=obj.value; if (!obj.m){ obj.m=''; } if (!obj.m.match(val)){ obj.m+=','+val+','; } var hide=obj.m.split(','); for (var zxc0=0;zxc0<hide.length;zxc0++){ if (document.getElementById(hide[zxc0])){ document.getElementById(hide[zxc0]).style.display='none'; } } var show=val.split(','); for (var zxc1=0;zxc1<show.length;zxc1++){ if (document.getElementById(show[zxc1])){ document.getElementById(show[zxc1]).style.display=''; } } }
//--> </script> </head> <center> <body>
<table width="953" border="0" bgcolor="#FFFFFF"> <tr> <td width="182"><img src="images/basera logo.jpg" width="101" height="100" /></td> <td width="795"><h1>WELCOME IN BASERA BRANCH</h1></td> </tr> <tr> <td colspan="2"> <table width="945" border="0"> <tr> <td colspan="3" bgcolor="#CCCCCC"><?php include('menubar.php'); ?></td> </tr> <tr> <td width="210" bgcolor="#6699CC">Welcome <?php echo $login_session; ?></td> <td width="335" bgcolor="#6699CC"><a href="logout.php">Logout</a></td> <td width="386" bgcolor="#6699CC"><?php echo "Today is " . date("d/m/y") . "<br>";?></td> </tr> </table> </td> </tr> <tr> <td> <form action="" method="get" name="form"> Enter Member Code: <input type="text" name="q" /> <input type="submit" name="Submit" value="Search" /> </form> </td> </tr> <tr> <td> </td> </tr> <tr> <td colspan="2"> <td width="0"></td></tr></table> <form id="form1" name="form1" method="post" action="memberupdate.php" enctype="multipart/form-data"> <?php
// Get the search variable from URL
$var = @$_GET['q'] ; $trimmed = trim($var); //trim whitespace from the stored variable
// rows to return $limit=10;
// check for an empty string and display a message. if ($trimmed == "") { exit; }
// check for a search parameter if (!isset($var)) { echo "<p>We dont seem to have a search parameter!</p>"; exit; }
mysql_connect("localhost","baserain_dba838","rb!bsa838mau"); //(host, username, password)
//specify database ** EDIT REQUIRED HERE ** mysql_select_db("baserain_db838") or die("Unable to select database"); //select which database we're using
$field = 'membercode'; // Build SQL Query $query = "select * from addmember where $field like \"$trimmed\" order by $field"; // EDIT HERE and specify your table and field names for the SQL query
$numresults=mysql_query($query); $numrows=mysql_num_rows($numresults);
// If we have no results, offer a google search as an alternative
if ($numrows == 0) { echo " Sorry, $trimmed this Number is not found";
}
// next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; }
// get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query");
// begin to show results set $count = 1 + $s ;
// now you can display the results returned while ($row= mysql_fetch_array($result)) {
echo " <table width=\"1020\" border=\"0\">\n"; echo " <tr>\n"; echo " <td width=\"94\" height=\"22\">Rank</td>\n"; echo " <td width=\"161\" ><input bgcolor='#FF3300' name='code' type='hidden' id='code' tabindex=\"1\" value='$trimmed' size='10' maxlength='10' readonly/>\n"; echo " <td width=\"9\"> </td>\n"; echo " <td width=\"125\"><label for=\"textfield\"></label>\n"; echo " <select name='rankf' size=\"1\" id='rankf' required=\"required\" tabindex=\"1\">\n"; echo " <option selected='selected'>value='$row[rank]'</option>\n"; echo " <option selected='selected'>Rank1</option>\n"; echo " <option>Rank2</option>\n"; echo " <option>Rank3</option>\n"; echo " <option>Rank4</option>\n"; echo " <option>Rank5</option>\n"; echo " <option>Rank6</option>\n"; echo " <option>Rank7</option>\n"; echo " <option>Rank8</option>\n"; echo " <option>Rank9</option>\n"; echo " <option>Rank10</option>\n"; echo " <option>Rank11</option>\n"; echo " <option>Rank12</option>\n"; echo " <option>Rank13</option>\n"; echo " <option>Rank14</option>\n"; echo "</select>\n"; echo " </td>\n"; echo " <td width=\"146\">Member Code</td>\n"; echo " <td width=\"147\"><input name=\"membercode\" type=\"text\" required=\"required\" id=\"membercode\" value='$row[membercode]' readonly=\"readonly\" /></td>\n"; echo " <td width=\"126\">Branch</td>\n"; echo " <td width=\"270\"><input name=\"branch\" type=\"text\" value='$row[branck]' required=\"required\" id=\"branch\" tabindex=\"1\" value=\"Mau HO\"/></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Name</td>\n"; echo " <td> </td>\n"; echo " <td><input type=\"text\" name=\"name\" id=\"name\" value='$row[mname]' required=\"required\" tabindex=\"2\"/></td>\n"; echo " <td>Father/Hus./Wif.</td>\n"; echo " <td><input type=\"text\" name='fname' id='fname' value='$row[f_name]' required=\"required\" tabindex=\"3\"/></td>\n"; echo " <td>Date of Birth</td>\n"; echo " <td><input name=\"dob\" type=\"text\" required=\"required\" value='$row[dateofbirth]' id=\"dob\" tabindex=\"5\" value=\"00/00/0000\"/></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Occupation</td>\n"; echo " <td> </td>\n"; echo " <td><input name=\"occupation\" type=\"text\" required=\"required\" value='$row[occupation]' id=\"occupation\" tabindex=\"6\" value=\"Business\"/></td>\n"; echo " <td>Address</td>\n"; echo " <td><input name=\"address\" required=\"required\" id=\"address\" value='$row[address]' tabindex=\"7\"/></td>\n"; echo " <td>Phone No.</td>\n"; echo " <td><input type=\"text\" name=\"phoneno\" id=\"phoneno\" required=\"required\" value='$row[phone]' tabindex=\"8\"/></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>PAN/GIR No.</td>\n"; echo " <td> </td>\n"; echo " <td><input name=\"pan\" type=\"text\" required=\"required\" id=\"pan\" value='$row[pan]' tabindex=\"9\" value=\"000000000\"/></td>\n"; echo " <td>Experience</td>\n"; echo " <td><input type=\"text\" name=\"experience\" id=\"experience\" required=\"required\" value='$row[experience]' tabindex=\"10\"/></td>\n"; echo " <td>Nationality</td>\n"; echo " <td><input name=\"nationality\" type=\"text\" required=\"required\" id=\"nationality\" value='$row[nationality]' tabindex=\"11\" value=\"indian\"/></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Religion</td>\n"; echo " <td> </td>\n"; echo " <td><input name=\"religion\" type=\"text\" required=\"required\" value='$row[religion]' id=\"religion\" tabindex=\"12\" value=\"Hindu\"/></td>\n"; echo " <td>Class of member</td>\n"; echo " <td><input type=\"text\" name=\"clmember\" id=\"clmember\" value='$row[classmember]' required=\"required\" tabindex=\"13\"/></td>\n"; echo " <td>Nominee Name</td>\n"; echo " <td><input type=\"text\" name=\"nomineename\" id=\"nomineename\" value='$row[nomineename]' required=\"required\" tabindex=\"14\"/></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Relationship</td>\n"; echo " <td> </td>\n"; echo " <td><input type=\"text\" name=\"relationship\" id=\"relationship\" value='$row[relationship]' required=\"required\" tabindex=\"15\"/></td>\n"; echo " <td>Introducer Name</td>\n"; echo " <td><input type=\"text\" name=\"intname\" id=\"intname\" value='$row[intro_name]' required=\"required\" tabindex=\"16\"/></td>\n"; echo " <td>Introducer Code</td>\n"; echo " <td><input type=\"text\" name=\"code\" id=\"code\" value='$row[mcode]' required=\"required\" tabindex=\"17\"/></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Top Arranger</td>\n"; echo " <td> </td>\n"; echo " <td><input type=\"text\" name=\"toparrnager\" id=\"toparrnager\" value='$row[toparranger]' tabindex=\"18\"/></td>\n"; echo " <td>Arranger Code</td>\n"; echo " <td><input type=\"text\" name=\"code\" id=\"code\" tabindex=\"19\" /></td>\n"; echo " <td>Arranger Rank</td>\n"; echo " <td><input type=\"text\" name=\"rank\" id=\"rank\" tabindex=\"20\" value='$row[toparrangcode]'/></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td><input type=\"submit\" name=\"button\" id=\"button\" value=\"UPDATE RECORD\" tabindex=\"21\"/></td>\n"; echo " <td></td>\n"; echo " </tr>\n"; echo " </table>\n";
$count++ ; }
$currPage = (($s/$limit) + 1);
//break before paging echo "";
// next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print "<a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a> "; }
// calculate number of pages needing links $pages=intval($numrows/$limit);
// $pages now contains int of pages needed unless there is a remainder from division
?> </form>
</body></center> </html>
|