I am trying to integrate google recaptcha, but it is not loading the req iframe on browser and showing nothing.
My contact.html:
<form ng-submit="processContactForm(contactForm.$valid)" name="contactForm"
method="POST" novalidate style="width: 100%">
<div class="form-group row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 res-padding-bottom-15" ng-class="{ 'has-error' : contactForm.firstName.$invalid && !contactForm.firstName.$pristine }">
<input ng-model="contactFormData.firstName" name="firstName" style="border-radius: 0" type="text" class="form-control" id="name" placeholder="{{'fnph' | translate}}" required>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<input ng-model="contactFormData.lastName" name="lastName" style="border-radius: 0" type="text" class="form-control" id="contact" placeholder="{{'lnph' | translate}}" required>
</div>
</div>
<div class="form-group row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 res-padding-bottom-15">
<input ng-model="contactFormData.email" name="email" style="border-radius: 0" type="email" class="form-control" id="email" placeholder="{{'emailph' | translate}}" required>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" >
<input ng-model="contactFormData.number" name="number" ng-minlength="10" ng-maxlength="10" style="border-radius: 0" type="tel" class="form-control" id="contact" placeholder="{{'cnph' | translate}}" required>
</div>
</div>
<div class="form-group row">
<div class="col-12">
<input ng-model="contactFormData.subject" name="subject" style="border-radius: 0" type="text" class="form-control" id="contact" placeholder="{{'subph' | translate}}">
</div>
</div>
<div class="form-group row">
<div class="col-12">
<textarea ng-model="contactFormData.message" name="message" style="border-radius: 0" type="text" class="form-control" id="message" placeholder="{{'msgph' | translate}}"></textarea>
</div>
</div>
<div class="form-group row">
<div class="col-12">
<!-- <div class="g-recaptcha" id="rcaptcha" data-sitekey="site key"></div>
<span id="captcha" style="color:red" /></span> -->
<div id="recaptcha" class="g-recaptcha" data-sitekey="site key"></div>
</div>
</div>
<div class="col-12" style="padding: 0;">
<button style="border-radius: 0" class="btn btn-md btn-primary" type="submit" ng-disabled="contactForm.$invalid">{{'sendMsgBtn' | translate}}</button>
</div>
</form>
And I have added below script inside <head> block of index.html :
<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="form-group row">
<div class="col-12">
<div id="recaptcha" class="g-recaptcha" data-sitekey="site key">
</div>
</div>
</div>
Related
At the moment I have this bootstrap login form which when you click Sign Up it switches to the sign up form. I've implemented the code for signing up in php along side some validation in PHP using $_POST to check to see if the fields are filled in and passwords match etc however, each time I submit the sign up for it switches back to the login form on the same page however, I want to it to remain on the sign up form if any of the validations fail. How would I go about doing this as simply changing the action="" in the form doesn't work. Here's the code for the bootrstrap login and sign up.
<div class="container">
<div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
<div class="panel panel-info" >
<div class="panel-heading">
<div class="panel-title">Sign In</div>
<div style="float:right; font-size: 80%; position: relative; top:-10px">Forgot password?</div>
</div>
<div style="padding-top:30px" class="panel-body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<form action="login.php" method="post" id="loginform" class="form-horizontal" role="form">
<h5 style="margin-top: 0px"><b>To place an order, please sign in.</b></h5>
<div id="error"></div>
<br>
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="login-username" type="text" class="form-control" name="username" value="" placeholder="username or email">
</div>
<div style="margin-bottom: 25px" class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="login-password" type="password" class="form-control" name="password" placeholder="password">
</div>
<div class="input-group">
<div class="checkbox">
<label>
<input id="login-remember" type="checkbox" name="remember" value="1"> Remember me
</label>
</div>
</div>
<div style="margin-top:10px" class="form-group">
<!-- Button -->
<div class="col-sm-12 controls">
<p><input id="btn-login" class="btn btn-success" type="submit" name="submit" value="Login" /></p>
<input type="hidden" name="submitted" value="TRUE" />
</div>
</div>
<div class="form-group">
<div class="col-md-12 control">
<div style="border-top: 1px solid#888; padding-top:15px; font-size:85%" >
Don't have an account!
<a href="#" onClick="$('#loginbox').hide(); $('#signupbox').show()">
Sign Up Here
</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="signupbox" style="display:none; margin-top:50px" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
<div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title">Sign Up</div>
<div style="float:right; font-size: 85%; position: relative; top:-10px"><a id="signinlink" href="#" onclick="$('#signupbox').hide(); $('#loginbox').show()">Sign In</a></div>
</div>
<div class="panel-body" >
<form action="" method="post" id="signupform" class="form-horizontal" role="form">
<div id="errorRegistration"></div>
<div id="signupalert" style="display:none" class="alert alert-danger">
<p>Error:</p>
<span></span>
</div>
<div class="form-group">
<label for="username" class="col-md-3 control-label">Username</label>
<div class="col-md-9">
<input type="text" class="form-control" name="newusername" placeholder="Username">
</div>
</div>
<div class="form-group">
<label for="email" class="col-md-3 control-label">Email</label>
<div class="col-md-9">
<input type="text" class="form-control" name="newemail" placeholder="Email Address">
</div>
</div>
<div class="form-group">
<label for="password" class="col-md-3 control-label">Password</label>
<div class="col-md-9">
<input type="password" class="form-control" name="newpassword" placeholder="Password">
</div>
</div>
<div class="form-group">
<label for="confirm-password" class="col-md-3 control-label">Confirm Password</label>
<div class="col-md-9">
<input type="password" class="form-control" name="newconfirm-password" placeholder="Confirm Password">
</div>
</div>
<div class="form-group">
<label for="forename" class="col-md-3 control-label">Forename</label>
<div class="col-md-9">
<input type="text" class="form-control" name="forename" placeholder="Forename">
</div>
</div>
<div class="form-group">
<label for="surname" class="col-md-3 control-label">Surname</label>
<div class="col-md-9">
<input type="text" class="form-control" name="surname" placeholder="Surname">
<div class="form-group">
<!-- Button -->
<div class="col-md-offset-3 col-md-9">
<p><input id="btn-signup" class="btn btn-info" type="submit" name="submittedRegister" value="  Sign Up" /></p>
<input type="hidden" name="submittedRegister" value="TRUE" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
Thanks again for the help! :D
There are many ways to do this, but a simple one would be something like this:
<div id="signupbox" style="<? if (empty($_POST['submittedRegister'])) echo 'display: none;' ?> margin-top:50px" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
(And a modified version for #loginbox)
However, I don't recommend to use style attributes, if you can use classes. It might be easier, but classes help keeping the code clean and maintainable
I'm working on a page for editing user profiles but I want the page am working on to submit to itself when it is submitted and show a message that the profile has been edited successfully. Please how do I do this ?
Here is what am working ?
<div class="row">
<div class="text-center title">Pricing</div>
<div class="text-center desc col-md-8 col-md-push-2">
{{$sitename}}
</div>
<div class="container" style="padding-top: 60px;">
<h1 class="page-header">Edit Profile</h1>
<div class="row">
<!-- left column -->
<form class="form-horizontal" role="form" method="post" action="/profile">
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="text-center">
<img id="ShowImage" src="#"/>
<img src="http://localhost:8234/img/index.png" class="avatar img-circle img-thumbnail" alt="avatar" width="200" height="200">
<h6>Upload a different photo...</h6>
<input type="file" class="text-center center-block well well-sm" name="avatar_path" id="avatar_path" onchange="readURL(this);">
</div>
</div>
<!-- edit form column -->
<div class="col-md-8 col-sm-6 col-xs-12 personal-info">
<div class="alert alert-info alert-dismissable">
<a class="panel-close close" data-dismiss="alert">×</a>
<i class="fa fa-coffee"></i>
This is the <strong>Profile Page</strong>. Use this to <strong>ONLY</strong> change your peronsal details
</div>
<h3>Personal info</h3>
<input class="form-control" value="{{$userInfo['data']['id']}}" type="hidden" name="user_id">
<div class="form-group">
<label class="col-lg-3 control-label">First Name:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['first_name']}}" type="text" name="first_name">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Last Name:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['last_name']}}" type="text" name="last_name">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Username:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['profile']['username']}}" type="text" name="username">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Email Address:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['email']}}" type="text" name="email">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Gender</label>
<div class="col-lg-8">
<div class="ui-select">
<select id="gender" class="form-control" name="gender">
<option value="{{$userInfo['data']['profile']['gender']}}" selected>{{$userInfo['data']['profile']['gender']}}</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">City:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['profile']['city']}}" type="text" name="city">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">State:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['profile']['state']}}" type="text" name="state">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Country:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['profile']['country']}}" type="text" name="country">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Mobile:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['profile']['mobile']}}" type="text" name="mobile">
</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">Occupation:</label>
<div class="col-lg-8">
<input class="form-control" value="{{$userInfo['data']['profile']['occupation']}}" type="text" name="occupation">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"></label>
<div class="col-md-8">
<input class="bkgrnd-blue text-white btn btn-primary" value="Update Profile" type="submit">
<span></span>
Cancel
</div>
</div>
</form>
</div>
</div>
</div>
This solution came from https://laravel.io/forum/01-30-2015-form-submission-to-the-same-page. Hope it helps
I have done a get route to display the page. I then did route a post to post form data.
Then I passed the $data variable to blade where I did an isset to check if it is created which displays the results
Display initial page
public function destinationSearchGet(){
$headData = array('pageTitle' => 'Admin Home - View all destinations');
return view('admin.destination_search', $headData);
}
post data back to the same page and create a new variable
public function destinationSearchPost(){
$headData = array('pageTitle' => 'Admin Home - Search results');
$formData = Request::input('destination');
$data = ParentRegionList::destinationSearch($formData);
return view('admin.destination_search', $headData)->with(compact('data'))
}
use blade to check if it exists
#if (isset($data))
<p>{{dd($data)}}</p>
#endif
I've created a form for a site that I'm developing as follows:
<div class="container contacts__container--02">
<? echo $this->Form->create('Email',array('class'=>'contact-form form','url'=>'/sendemail'));?>
<form class="contact-form form contacts__form--02">
<div class="contacts__form__inputs_box--02">
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-4 contact_item">
<input
type="text"
placeholder="Your name"
value=""
name="data[Email][fullname]"
class="input input--cloud-border input--white"
minlength="3"
required
>
</div>
<div class="col-md-4 contact_item">
<input
type="text"
required placeholder="Your business"
value="" name="data[Email][business]"
class="input input--cloud-border input--white"
>
</div>
</div>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-4 contact_item">
<input
type="email"
required placeholder="Your email"
value=""
name="data[Email][email]"
class="input input--cloud-border input--white"
required
>
</div>
<div class="col-md-4 contact_item">
<input
type="text"
placeholder="Your phone"
value=""
name="data[Email][phone]"
class="input input--cloud-border input--white"
>
</div>
</div>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-4 contact_item">
<input
type="email"
required placeholder="Your website"
value="" name="data[Email][website]"
class="input input--cloud-border input--white"
>
</div>
<div class="col-md-4 contact_item">
<input
type="text"
placeholder="How did you hear about us?"
value="" name="data[Email][referer]"
class="input input--cloud-border input--white"
>
</div>
</div>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8 contact_item">
<textarea
required placeholder="Your message"
value="" name="data[Email][message]"
class="contacts__form_textarea--02 input input--cloud-border input--white"
></textarea>
</div>
</div>
<div class="row submit_row">
<div class="col-md-2">
</div>
<div class="col-md-8 submit_button">
<div class="g-recaptcha" data-sitekey="<?php echo $siteKey ?>"></div>
</div>
</div>
<div class="row submit_row">
<div class="col-md-2">
</div>
<div class="col-md-8 contact_item">
<a id="sendForm" class="contacts__form_button--02 button button--yellow button--small-radius">send</a>
</div>
</div>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8 contact_item">
<div id="response">
</div>
</div>
</div>
</form>
<? echo $this->Form->end(); ?>
</div>
</div>
But for some reason when I go to fill the form in all the fields, except for phone number are populated with my email address:
How can I set what autocomplete field should be used?
It was interpreting 'Email' as the field name rather than the form array. Changed to 'ContactForm' and it works fine now:
<? echo $this->Form->create('ContactForm',array('class'=>'contact-form form','url'=>'/sendemail'));?>
<form class="contact-form form contacts__form--02">
<div class="contacts__form__inputs_box--02">
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-4 contact_item">
<input
type="text"
placeholder="Your name"
value=""
name="data[ContactForm][fullname]"
class="input input--cloud-border input--white"
minlength="3"
required
>
</div>
<div class="col-md-4 contact_item">
<input type="text" required placeholder="Your business" value="" name="data[ContactForm][business]" class="input input--cloud-border input--white">
</div>
</div>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-4 contact_item">
<input type="email" required placeholder="Your email" value="" name="data[ContactForm][email]" class="input input--cloud-border input--white">
</div>
<div class="col-md-4 contact_item">
<input type="text" placeholder="Your phone" value="" name="data[ContactForm][phone]" class="input input--cloud-border input--white">
</div>
</div>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8 contact_item">
<textarea required placeholder="Your message" value="" name="data[ContactForm][message]" class="contacts__form_textarea--02 input input--cloud-border input--white"></textarea>
</div>
</div>
<div class="row submit_row">
<div class="col-md-2">
</div>
<div class="col-md-8 submit_button">
<div class="g-recaptcha" data-sitekey="<?php echo $siteKey ?>"></div>
</div>
</div>
<div class="row submit_row">
<div class="col-md-2">
</div>
<div class="col-md-8 contact_item">
<a id="sendForm" class="contacts__form_button--02 button button--yellow button--small-radius">send</a>
</div>
</div>
<div class="row">
<div class="col-md-2">
</div>
<div class="col-md-8 contact_item">
<div id="response">
</div>
</div>
</div>
</form>
<? echo $this->Form->end(); ?>
I created a search page with jquery that will display result on same page and I succeed of doing it but the jquery that I made can only show data with index 0 and it will fail if I searched other data with differenct index. I am having Uncaught TypeError: Cannot read property 'StudentNumber' of undefined error in console log.How can I search json object with data matching what is type in the search bar then populate the textbox from db. Please help.... thanks....
$('#btnSearch').click(function(){
var txtValue = $("#txtsearch").val();
$.ajax({
type:"POST",
url:"<?php echo site_url('enrollment/studSearch');?>",
data: {q:txtValue},
dataType: "json",
success: function(data){
//console.log(data.studinfo[0].StudentNumber);
$("#studentnum").val(data.studinfo[0].StudentNumber);
$("#yearLevel").val(data.studinfo[0].YearLevel);
$("#lastname").val(data.studinfo[0].LastName);
$("#firstname").val(data.studinfo[0].FirstName);
$("#middlename").val(data.studinfo[0].MiddleName);
$("#txtTuition").val(data.studinfo[0].TuitionFee);
$("#txtMisc").val(data.studinfo[0].MiscFee);
$("#txtAddFee").val(data.studinfo[0].AdditionalFee);
$("#txtTotal").val(data.studinfo[0].Total);
$("#modeofpayment").val(data.studinfo[0].ModeOfPayment);
$("#payAmount").val(data.studinfo[0].PayableAmount);
},
});
});
my controller:
public function studSearch()
{
$str = $this->input->post('q');
$data['studinfo'] = $this->emodel->search_Student($str);
echo json_encode($data);
}
and the model:
function search_Student($str)
{
$this->db->select('*');
$this->db->from('studentinfo a');
$this->db->join('studFinance b','a.StudentNumber = b.StudentNumber');
$this->db->like('a.StudentNumber',$str);
$this->db->or_like('a.LastName',$str);
$this->db->or_like('a.FirstName',$str);
$query = $this->db->get();
$result = $query->result_array();
return $result;
}
this is the view:
<div id="page-wrapper">
<div id="page-inner">
<div class="row">
<div class="col-lg-12">
<h2>Billing Page</h2>
</div>
</div>
<hr />
<div class="row">
<div class="col-lg-12">
<?php
$attributes = array("class"=>"form- horizontal","id"=>"billform","name"=>"billform",
"autocomplete"=>"off");
echo form_open("enrollment/ebilling",$attributes);
?>
<div class="panel panel-primary">
<div class="panel-heading">
Personal Information
</div>
<div class="panel-body">
<div class="form-group col-lg-12">
<label class="control-label col-xs-2">Search:</label>
<div class="col-xs-3">
<input type="text" id="txtsearch" name="txtsearch" class="form-control"/>
</div>
<button type="button" class="btn btn-success" id="btnSearch" name="btnSearch">Search</button>
</div>
<div class="form-group col-lg-12">
<hr />
<label class="control-label col-xs-2">Student Number:</label>
<div class="col-xs-3">
<input type="text" readonly id="studentnum" name="studentnum" value="<?php echo set_value('studentnum');?>" class="form-control"/>
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-2">Year Level:</label>
<div class="col-xs-3">
<input type="text" readonly id="yearLevel" name="yearLevel" value="<?php echo set_value('yearLevel');?>" class="form-control"/>
</div>
<label class="control-label col-xs-2">Last Name:</label>
<div class="col-xs-3">
<input type="text" id="lastname" name="lastname" value="<?php echo set_value('lastname');?>" readonly class="form-control" />
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-2">First Name:</label>
<div class="col-xs-3">
<input type="text" id="firstname" name="firstname" value="<?php echo set_value('firstname');?>" readonly class="form-control" />
</div>
<label class="control-label col-xs-2">Middle Name:</label>
<div class="col-xs-3">
<input type=-"text" id="middlename" name="middlename" value="<?php echo set_value('middlename');?>" readonly class="form-control" />
</div>
</div>
</div>
</div>
<!-- END OF FIRST PANEL -->
<div class="panel panel-primary">
<div class="panel-heading">
Billing Mode
</div>
<div class="panel-body">
<div class="col-lg-6">
<div class="panel panel-info">
<div class="panel-heading">
Student Account
</div>
<div class="panel-body">
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">Tuition Fee:</label>
<div class="col-xs-7">
<input type="text" id="txtTuition" readonly name="txtTuition" value=" <?php echo set_value('txtTuition');?>" class="form-control"/>
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">Miscellaneous Fee:</label>
<div class="col-xs-7">
<input type="text" id="txtMisc" readonly name="txtMisc" value="<?php echo set_value('txtMisc');?>" class="form-control"/>
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">Additional Fee:</label>
<div class="col-xs-7">
<input type="text" id="txtAddFee" readonly name="txtAddFee" value="<?php echo set_value('txtAddFee');?>" class="form-control"/>
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">Total:</label>
<div class="col-xs-7">
<input type="text" id="txtTotal" readonly name="txtTotal" value="<?php echo set_value('txtTotal');?>" class="form-control"/>
</div>
</div>
</div>
</div>
<!-- END OF FIRST INSIDE PANEL -->
<div class="panel panel-info">
<div class="panel-heading">
Payment
</div>
<div class="panel-body">
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">Mode of Payment:</label>
<div class="col-xs-7">
<input type="text" id="modeofpayment" name="modeofpayment" value="<?php echo set_value('modeofpayment');?>" readonly class="form-control"/>
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">Payable Amount:</label>
<div class="col-xs-7">
<input type="text" id="payAmount" name="payAmount" value="<?php echo set_value('payAmount');?>" readonly class="form-control"/>
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">Date:</label>
<div class="col-xs-7">
<input type="date" id="pDate" name="pDate" value="<?php echo set_value('pDate');?>" class="form-control"/>
<span class="text-danger"><?php echo form_error('pDate');?></span>
</div>
</div>
<div class="form-group col-lg-12">
<label class="control-label col-xs-5">OR Number:</label>
<div class="col-xs-7">
<input type="text" id="orNum" name="orNum" value="<?php echo set_value('orNum');?>" class="form-control"/>
<span class="text-danger"><?php echo form_error('orNum');?></span>
<input type="hidden" id="balance" name="balance"/>
</div>
</div>
<!-- END OF SECOND INSIDE PANEL -->
</div>
</div>
</div>
<div class="col-lg-6">
<table id="billTable" class="table table-hover table-bordered table-striped">
<thead>
<tr>
<th>OR Number</th>
<th>Amount</th>
<th>Date</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<td>Balance</td>
</tfoot>
</table>
</div>
<!-- END OF TABLE -->
<div class="col-lg-6">
<div class="form-group col-lg-12">
<input type="button" class="btn btn-success" id="btnAddPayment" name="btnAddPayment"
value="Add Payment"/>
<button type="reset" class="btn btn-danger" id="btnReset" name="reset">Reset</button>
</div>
</div>
</div>
</div>
<?php echo form_close();
echo $this->session->flashdata('msg');?>
</div>
</div>
</div>
</div>
I am working on a PHP based application in which we are getting large amount of data including more than 5 images. The code was working fine for many days but now it just stopped working. When we click the submit button the page reloads but the form does not submit to PHP POST Method. When i remove enctype from form then it gets submitted but the images doesn't pass. And with enctype it is only working with 3 images. if i increase the number of images it stops working.
Code of my application:
<form role="form" name="app_form" id="app_form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
<div id="application_form"> <!-- Application Form Starts Here -->
<div class="container-fluid">
<div style="margin-top: 10px; border-top: 3px solid #37A8B3; padding-top: 10px;">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<div class="form-group" style="margin-top: 10px;">
<label class="control-label col-md-2" >Applied For:</label>
<div class="col-md-3">
<input type="text" class="form-control" name="app_for" id="app_for" required>
</div>
<label class="control-label col-md-1">ID No:</label>
<div class="col-md-2">
<input type="text" class="form-control" name="form_id" required>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div style="margin-bottom: 10px;">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-4">Upload1:</label>
<div class="col-md-2">
<input type="file" name="Upload_1" id="Upload_1" required>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-4">Upload2:</label>
<div class="col-md-2">
<input type="file" name="Upload_2" id="Upload_2" required>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-4">Upload3:</label>
<div class="col-md-2">
<input type="file" name="Upload_3" id="Upload_3" required>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-4">Upload4:</label>
<div class="col-md-2">
<input type="file" name="Upload_4" id="Upload_4" required>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-4">Upload5:</label>
<div class="col-md-2">
<input type="file" name="Upload_5" id="Upload_5" required>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-4">Upload6:</label>
<div class="col-md-2">
<input type="file" name="Upload_6" id="Upload_6" required>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-4">Upload7:</label>
<div class="col-md-2">
<input type="file" name="Upload_7" id="Upload_7" required>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="background-color: #37A8B3;">
<h4 style="padding: 5px; color: white;"> PLEASE COMPLETE IN BLOCK CAPITALS </h4>
</div>
<div style="border-bottom: 3px solid #37A8B3;">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label col-md-2 col-lg-2">Title Mr/Mrs/Ms/Other:</label>
<div class="col-md-1">
<select class="form-control" name="user_title" required>
<option value="">Select</option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Ms">Ms</option>
<option value="other">Other</option>
</select>
</div>
<label class="control-label col-md-1" >First Name:</label>
<div class="col-md-2">
<input type="text" class="form-control" name="user_fname" required >
</div>
<label class="control-label col-md-1" >Mid Name:</label>
<div class="col-md-2">
<input type="text" class="form-control" name="user_midname">
</div>
<label class="control-label col-md-1" >Surname:</label>
<div class="col-md-2">
<input type="text" class="form-control" name="user_surname">
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label col-md-3" >Maiden/Former Name<small><i> (List all previous first names and surnames)</i></small>:</label>
<div class="col-md-9">
<input type="text" class="form-control" name="user_formername" required>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label col-md-2" >Current Address:</label>
<div class="col-md-6 input-group-md">
<textarea class="form-control" name="user_curr_addr" rows="2" required></textarea>
</div>
<label class="control-label col-md-1" >Postcode:</label>
<div class="col-md-3 input-group-sm">
<input type="text" class="form-control" name="user_curr_post_code" required>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-12" style="margin-top: 20px; margin-bottom: 10px;">
<div class="col-md-2 col-md-offset-5">
<input type="submit" class="form-control btn btn-primary" name="submit_app" value="Submit Application">
</div>
</div>
</div>
</div>
<br>
<br>
<br>
</div>
</div>
</div>
</div>
</div> <!-- Application Form Ends Here -->
</form>
May be at first you tried small images and 5 pieces of small JPEGs didn't exceed your request size, then. Now, you're trying with bigger files and the total of your files are exceeding your request size value, thus you cannot complete your POST requests.
You should have got an error on the way somewherei though, but anyway.
I believe you should increase the request size in you PHP settings. Check the value of request size is bigger than the total size of files you're trying to POST.
I cannot provide you any code, because your question doesn't have any. I am just trying to help you out by pointing where to look.
EDIT:
As I am not a PHP expert, I know that the post size can be changed when you play with the "upload_max_filesize = xxM" and "post_max_size = xxM" which are located in the "PHP.ini" configuration file in your PHP installation directory. These are global values, though. If you're using a hosting panel, chances are you will find PHP specific settings in your panel. Just change or add these settings in order to override the global ones.