HEX
Server: Apache
System: Linux sg2plmcpnl492417.prod.sin2.secureserver.net 4.18.0-553.58.1.lve.el8.x86_64 #1 SMP Fri Jul 4 12:07:06 UTC 2025 x86_64
User: nyiet8349bzl (9207396)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/nyiet8349bzl/Backup/sbc_back/homedir/public_html/library-conference-registration.php
<?php include 'inc/header.php';?>
<?php include 'inc/slider.php';?>

<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script> 
<script src="//cdn.jsdelivr.net/webshim/1.14.5/polyfiller.js"></script>
<script>
webshims.setOptions('forms-ext', {types: 'date'});
webshims.polyfill('forms forms-ext');
$.webshims.formcfg = {
en: {
    dFormat: '-',
    dateSigns: '-',
    patterns: {
        d: "dd-mm-yy"
    }
}
};
</script>

<div class="container">
  <div class="row " >
    <div class="col-lg-12 ">
      <div class="sub_heading"> Library Conference on Building Digital India: Enhancing Capacities through Libraries and Information <a  class="btn btn-danger pull-right"href="pdf/REGISTRATION-FORM.pdf" target="_blank">Online Registration Form </a> </div>
      <br>
      


<form name="contactform" method="post" action="library-conference-registration.php">
 
<table width="600px">
 
<tr>
 
 <td valign="top">
 
  <label for="name">Name </label>
 
 </td>
 
 <td valign="top">
 
  <input  type="text" name="name" maxlength="50" size="30" required>
 
 </td>
 
</tr>
<tr>
 
 <td valign="top">
 
  <label for="Organization">Organization</label>
 
 </td>
 
 <td valign="top">
 
  <input  type="text" name="Organization" maxlength="30" size="30" required>
 
 </td>
 
</tr>
<tr>
 
 <td valign="top">
 
  <label for="Designation">Designation </label>
 
 </td>
 
 <td valign="top">
 
  <input  type="text" name="Designation" maxlength="30" size="30" required>
 
 </td>
 
</tr>

 
<tr>
 
 <td valign="top"">
 
  <label for="Address">Address</label>
 
 </td>
 
 <td valign="top">
 
  <textarea  type="text" name="Address" maxlength="50" size="30" required>
  </textarea>
 </td>
</tr>
 <tr>
 <td valign="top"">
   <label for="City">City</label>
  </td>
 <td valign="top">
   <input  type="text" name="City" maxlength="50" size="30" required />
  
 </td>
</tr>
 <tr>
 
 <td valign="top"">
 
  <label for="Country" >Country</label>
 
 </td>
 
 <td valign="top">
 
  <input type="text" name="Country" maxlength="50" size="30" required/>
  
 </td>
</tr>
 <td valign="top"">
 
  <label for="Postal">Postal</label>
 
 </td>
 
 <td valign="top">
 
  <input  type="text" name="Postal" maxlength="6" size="30" required />
  
 </td>
</tr>
 

<tr> 
 <td valign="top">
 
  <label for="telephone">Telephone</label>
 
 </td>
 
 <td valign="top">
 
  <input  type="text" name="telephone" maxlength="10" size="30" />
 
 </td>
 
</tr>

<tr> 
 <td valign="top">
 
  <label for="Mobile">Mobile</label>
 
 </td>
 
 <td valign="top">
 
  <input  type="text" name="Mobile" maxlength="10" size="30" required>
 
 </td>
 
</tr>
 
<tr>
 
<tr> 
 <td valign="top"> 
  <label for="Email">Email </label> 
 </td> 
 <td valign="top">
  <input  type="text" name="Email" maxlength="80" size="30" required>
 </td>
 </tr>
<tr>
<td>
<strong>Registration Fees </strong>
<td> <select name="Regtype">
<option value="Rs.2000/-">Rs.2000/- </option>
<option value="Rs.2250/-">Rs.2250/- </option>
<option value="Rs.2500/-">Rs.2500/- </option>  
</select>
</td> 
 </tr>
 <tr> 
 <td valign="top"> 
  <label for="Bank">Bank Name </label> 
 </td> 
 <td valign="top">
  <input  type="text" name="Bank" maxlength="80" size="30" required>
 </td>
 </tr>
  </tr>
 <tr> 
 <td valign="top"> 
  <label for="Branch">Branch Name </label> 
 </td> 
 <td valign="top">
  <input  type="text" name="Branch" maxlength="80" size="30" required>
 </td>
 </tr>
 <tr> 
 <td valign="top"> 
  <label for="Cheque">Cheque/DD Number </label> 
 </td> 
 <td valign="top">
  <input  type="text" name="Cheque" maxlength="80" size="30" required>
 </td>
 </tr>
 <tr> 
 <td valign="top"> 
  <label for="Date">Date</label> 
 </td> 
 <td valign="top">
  


<input min="2016-01-01" max="2016-12-31" type="date" name = "Date" />

 </td>
 </tr>
<!--
 <tr><td>Presenting Paper</td>
 <td><input type="radio" name="paper" value="Yes">Yes</input>
 <input type="radio" name="paper" value="No">No</input></td>
 </tr>
 </tr> 
 -->

<tr>
 <td colspan="2" style="text-align:center">
 
  <input type="submit" value="Submit" name="cc">
 
 </td>
 
</tr>
 
</table>
 
</form>

<?php


if(isset($_POST['Email'])) 
{
    // EDIT THE 2 LINES BELOW AS REQUIRED
 
    $email_to = "makingcitiesresilient@gmail.com";
 
    $email_subject = "Library Conference Registration";

    function died($error) {
 
        // your error code can go here
 
        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
 
        //echo "These errors appear below.<br /><br />";
 
        echo $error."<br /><br />";
 
        //echo "Please go backth and fix these errors.<br /><br />";
 
        die();
 
    }
 
    // validation expected data exists
 
    if(!isset($_POST['name']) ||
 
        !isset($_POST['Organization']) ||

        !isset($_POST['Designation']) ||

        !isset($_POST['Address']) ||
 
        !isset($_POST['City']) || 

        !isset($_POST['Country']) ||

        !isset($_POST['Postal']) ||

        !isset($_POST['telephone'])||
        
        !isset($_POST['Mobile']) ||

        !isset($_POST['Email']) ||
    
        !isset($_POST['Bank']) ||

        !isset($_POST['Branch']) ||

        !isset($_POST['Cheque']) ||

        !isset($_POST['Date']) ||

        !isset($_POST['Regtype'])) 
     {
      died('\nWe are sorry, but there appears to be a problem with the form you submitted.');       
 
    }
 
    $first_name = isset($_POST['name']); // required 
    $Organization = isset($_POST['Organization']); //  required
    $Designation = isset($_POST['Designation']); // required
    $address = isset($_POST['Address']); // required
    $City = isset($_POST['City']); // required
    $Country = isset($_POST['Country']); // required
    $Postal = isset($_POST['Postal']); // required
    $telephone = isset($_POST['telephone']); // not required
    $Mobile = isset($_POST['Mobile']); // not required
    $email_from = isset($_POST['Email']); // required 
    $Bank = isset($_POST['Bank']); // required
    $Branch = isset($_POST['Branch']); // required
    $Regtype = isset($_POST['Regtype']); // required
    $Cheque = isset($_POST['Cheque']); // required    
    $date = isset($_POST['Date']); // required
    
 
   /* $error_message = "";
 
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
 
  if(!preg_match($email_exp,$email_from)) {
 
    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
 
  }
 
    $string_exp = "/^[A-Za-z .'-]+$/";
 
  if(!preg_match($string_exp,$first_name)) {
 
    $error_message .= 'The Name you entered does not appear to be valid.<br />';
 
  }
 
  if(!preg_match($string_exp,$address)) {
 
    $error_message .= 'The Address you entered does not appear to be valid.<br />';
 
  }
 
  if($Regtype == '') {
 
    $error_message .= 'You did not Select Your Registration Type:.<br />';
 
  }
 
  if(strlen($error_message) > 0) {
 
    died($error_message);
 
  }*/

    $email_message = "Form details below.\n\n";
 
    function clean_string($string) {
 
      $bad = array("content-type","bcc:","to:","cc:","href");
 
      return str_replace($bad,"",$string);
 
    } 
    $email_message .= "Name : ".clean_string($_POST['name'])."\n";    
    $email_message .= "Organization   : ".clean_string($_POST['Organization'])."\n";
    $email_message .= "Designation : ".clean_string($_POST['Designation'])."\n";
    $email_message .= "Address : ".clean_string($_POST['Address'])."\n";
    $email_message .= "City : ".clean_string($_POST['City'])."\n";
    $email_message .= "Country : ".clean_string($_POST['Country'])."\n";
    $email_message .= "Postal : ".clean_string($_POST['Postal'])."\n";    
    $email_message .= "Telephone  : ".clean_string($_POST['telephone'])."\n";
    $email_message .= "Mobile : ".clean_string($_POST['Mobile'])."\n";
    $email_message .= "Email   : ".clean_string($_POST['Email'])."\n";
    $email_message .= "Registration Fee: ".clean_string($_POST['Regtype'])."\n";
    $email_message .= "Bank Name: ".clean_string($_POST['Bank'])."\n";
    $email_message .= "Branch Name: ".clean_string($_POST['Branch'])."\n";
    $email_message .= "DD/Cheque Number: ".clean_string($_POST['Cheque'])."\n";    
    $email_message .= "Submitted Date: ".clean_string($_POST['Date'])."\n";


    

    if($_SERVER['REQUEST_METHOD'] == 'POST'){ 
 $con = mysql_connect("localhost","sbsc_register","sbsc@123");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db("sbsc_register", $con);
$sql = "INSERT INTO `form2`(`Name`, `Organization`, `Designation`, `Address`, `City`, `Country`, `Postal`, `Telephone`, `Mobile`, `Email`, `RegistrationFee`, `Bank`, `Branch`, `Cheque`, `Date`) VALUES ('$_POST[name]','$_POST[Organization]','$_POST[Designation]','$_POST[Address]','$_POST[City]','$_POST[Country]','$_POST[Postal]','$_POST[telephone]','$_POST[Mobile]','$_POST[Email]','$_POST[Regtype]','$_POST[Bank]','$_POST[Branch]','$_POST[Cheque]','$_POST[Date]')";
if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo "Your Information Was Successfully Posted";
mysql_close($con);
     }
 
// create email headers
 
$headers = 'From: '.$_POST['Email']."\r\n".
 
'Reply-To: '.$_POST['Email']."\r\n" .
 
'X-Mailer: PHP/' . phpversion();
 
@mail($email_to, $email_subject, $email_message, $headers);  
 

?>
 
 
 
<!-- include your own success html here -->
 
 
 
Thank you for contacting us. We will be in touch with you very soon.
 
 
 
<?php
 
}

?>







 </div>
    <div class="clearfix"></div>
  </div>
</div>
</div>
<div class="clr"></div>
<?php include 'inc/footer.php';?>