rscott7706 Posted July 20, 2007 Share Posted July 20, 2007 Hi all... I have a registration page for our members only area that works perfectly, except I want to add the registrants email in addition to existing info. What I have now is a validation setup. When the registrant clicks send, it sends and email to the site administrator, with a link to automatically change the MySql validation field from 0 to 1. But, only current site members can gain access to the members only area. So I need the registrants email in the validation email so our site administrator can send them an application to join the site prior to validating them for the members only area. The email variable is $email Too much info? Anyway, here is the truncated coding - I can post the whole script if necessary: ============================================================== if (mail ("admin@egca.org", "Confirm EGCA Members Only Registration","Dear EGCA Administrator.\n\n If this is not a current EGCA Member, please send them an application package. Email=<need to put their email right here )$email)>\n\n If this is a current EGCA member, click on the link below to activate their membership.\n\n If you are unable to click on the link, just paste the url given below in the address field of your browser and press enter to activate this account.\n\n $path/activate.php?email=$email&password=$password&key=$validkey","From: no-reply@egca.org")) ============================================================== Hope this is clear yet not too wordy..... Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 20, 2007 Share Posted July 20, 2007 I don't get it... what isn't working? Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted July 20, 2007 Author Share Posted July 20, 2007 Daniel0 You may have replied to me instead of someone else - your reply seems to have nothing to do with my question. Let me know if i am wrong.... Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 20, 2007 Share Posted July 20, 2007 Nope. It is the correct one. I don't get what you need help with. Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted July 20, 2007 Author Share Posted July 20, 2007 OK, thanks. Every thing is working, except the existing code does not have the registrants email coded in. Right where I have the red comment, I need to put the variable "$email" so it appears in the email that is sent to the site administrator. This way, if the person registering is not a current site member, and is trying to gain access to the members only area, the site administrator can send them an email with an Adobe Acrobat application to join EGCA. So, if the registering person is an existing member, the adminitrator simply clicks on the validation link below, if not she sends the person an email. I hope that clears it up some. Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted July 20, 2007 Author Share Posted July 20, 2007 What a goof, I guess I should have said - Putting the variable "$email" there alone creates an error message. And crashes the routine. Quote Link to comment Share on other sites More sharing options...
corbin Posted July 20, 2007 Share Posted July 20, 2007 Edit: I just reread your post, and I don't think this will help.... Anyway, I think you need to post more code so we can see where things are getting defined. You'll need to get their email address and store it in your database.... Forexample: //first off run something like: /* ALTER TABLE your_table ADD email varchar(50) */ //then you'll need to add the email field to your reg form: echo '<form action="some place" method="method here"> <!-- some other stuff here --> <input type="text" name="email" value="" maxlength="50" /> <!-- maybe some more fields and a submit button here --> </form>'; //then your processing could look something like this (no error checking or anything in this example): mysql_connect(blah, blah, blah); mysql_select_db(blah); //define all the stuff to variables and clean them or what ever.... $email = $_GET['email']; if(mysql_query("INSERT INTO your_table (`name`, `password`, `email`) VALUES ('{$name}', '{$password}', '{$email}')")) { //basically you would just need to alter your insert statement to include the email address echo 'Success'; } Quote Link to comment Share on other sites More sharing options...
rscott7706 Posted July 20, 2007 Author Share Posted July 20, 2007 Got you... Let's call this resolved. I am good to go. Thanks All!! 8) Quote Link to comment Share on other sites More sharing options...
corbin Posted July 20, 2007 Share Posted July 20, 2007 Ummm..... not sure how I helped exactly, but what ever ;p. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.