auto email |
[eluser]learning_php[/eluser]
Hi, I have created a very basic login system where users have to register to gain access to certain areas. The code below moves them from one table to another. Code: function updatemembers() does anyone know how difficult it is to send a auto email to either confirm or reject a user membership request?
[eluser]Mike Ryan[/eluser]
Hi, If you just want to let the user know if their request was accepted or denied, you could do this quite easily with the Email Class. Code: //snip You could extend the email class with "send_confirmed" and "send_denied" functions to move the email body/subject out of the controller logic if you wanted that level of abstraction.
[eluser]Dam1an[/eluser]
Instead of moving users between tables, could you not just have a boolean field for pending?
[eluser]learning_php[/eluser]
Hi, I have changed the function to this: Code: function updatemembers() But I get the error: [code] A PHP Error was encountered Severity: Notice Message: Undefined index: email Filename: controllers/homepage.php Line Number: 53 [/code
[eluser]Dam1an[/eluser]
Can you maybe tell us which line is number 53? As there are numerous 'email' variables
[eluser]Dam1an[/eluser]
And whats the view for the form? Cause it would appear you don;t havea field named email?
[eluser]learning_php[/eluser]
This is the form i am using: Code: <?= form_open('homepage/update_register') ?>
[eluser]learning_php[/eluser]
Hi, Sorry forgot to add this. it'a the form to decide to approve members or not: Code: <?PHP |
Welcome Guest, Not a member yet? Register Sign In |