Support the ongoing development of Laravel.io →
posted 8 years ago
Mail
Last updated 2 years ago.
0

If you remove the jquery validation does it work?

nb You should use server side (laravel) validation even if using client side (jquery) validation

0

Please try the below code..


public function postContact()
  {
            $from = Input::get('email');
            $name = Input::get('name');

    if ($from)
    {
      Mail::send('emails.contact', $data, function($message) use ($from, $name)
      {
            
            $message->from('[email protected]' , 'Your Name')->to($from)->subject('Contact Request');

      });
        
    }
      return View::make('contact')->with('success', 'You have registered successfully');

    else
    {
      return View::make('contact')->with('fail', 'An error occurred!');
    }
  }

Last updated 8 years ago.
0

elite123 said:

If you remove the jquery validation does it work?

nb You should use server side (laravel) validation even if using client side (jquery) validation

Without the jQuery validation it works, I know it better to use server side validation but how to use jquery validation?

0

Your problem is with your jquery code then - can you post that (or you might get more responses in a jquery forum)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.