I am using Codeigniter framework.
My issue is:-
when I submit my booking form its shows me 503 service unavailable page
if form fields are empty.
If all form fields have value then form is success fully submitting.
I am using Codeigniter framework.
My issue is:-
when I submit my booking form its shows me 503 service unavailable page
if form fields are empty.
If all form fields have value then form is success fully submitting.
You do this by varrious ways:-
(1) Form Validation
you need to set rules for input fields
$this->form_validation->set_rules('username', 'Username', 'required');
if ($this->form_validation->run() == FALSE)
{
//run your code on success here
}
else
{
//run your code on failure here
}
(2) By if else statement Condition.
if ($_POST) {
$data = array(
'category' => $this->input->post('category'),
'name' => $this->input->post('name'),
'description' => $this->input->post('description'),
);
$this->model_name->method_name($data);
redirect(base_url().'Controller/method/');
} else {
redirect(base_url().'Controller/method');
}
Here are some additional tips to help you troubleshoot what might be causing the 503 Service Unavailable to appear on the server-side of things:
For more information follow these websites .
I will send proper solution regarding form handling. If possible please share code snippet.