Welcome Guest, Not a member yet? Register   Sign In
email
#6

[eluser]dudeami0[/eluser]
Code:
<html>
<head>
   <title>Form Test</title>
</head>
<body>

<?php form_open('email/send1');?>
<input type="submit" value="Send" name="send" />
<?php form_close(); ?>

</body>
</html>

Make sure everything is configured in application/config/config.php, mainly URL related things. For testing the submit, try:

Code:
<?php

Class Email extends Controller {

   function __construct(){
      parent::Controller();
      $this->load->library('email');
      $this->load->helper('form');
   }

   function index(){
      $this->load->view('email_view.php');
   }

   function send1(){
      echo "Form was processed " . ($this->input->post('send') !== false ? "successfully" : "unsuccessfully");
   }
}
?>

Also note its __construct with 2 underscores.


Messages In This Thread
email - by El Forum - 11-24-2010, 12:13 AM
email - by El Forum - 11-24-2010, 12:25 AM
email - by El Forum - 11-24-2010, 12:29 AM
email - by El Forum - 11-24-2010, 01:09 AM
email - by El Forum - 11-24-2010, 01:12 AM
email - by El Forum - 11-24-2010, 01:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB