Development Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsCommunityDevelopment Tutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 27th, 2003, 04:59 AM
benos benos is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 233 benos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Article Discussion: Creating a Membership System

Creating a Membership System If you have any questions or comments about this article please post them here.

You can read the article here .

Reply With Quote
  #2  
Old March 27th, 2003, 09:27 PM
foomal foomal is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 4 foomal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
After we issue the following query:

$sql = mysql_query("UPDATE users SET activated='1' WHERE userid='$userid' AND password='$code'");

to check whether the 'activated' filed really get updated we can use:

$checkupdate = mysql_affected_rows($sql);
if($checkupdate >= 0) {
// record updated
} else {
// record not updated
}

instead of issue a 'select' query.
NOTE: we check if $checkupdate is GREATER or EQUALS to zero


Foong.

Reply With Quote
  #3  
Old March 27th, 2003, 11:25 PM
lemkepf lemkepf is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 7 lemkepf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
also, did you know that the second page is copied 2 times? Great article, very simple and easy to follow! THanks!
Paul

Reply With Quote
  #4  
Old March 28th, 2003, 11:45 AM
jmc jmc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 8 jmc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Problem with e-mail for user and password details

I am having a problem with the e-mail part of the membership system. I see that the article mentions that register_globals is turned off.

Would this stop e-mail being sent from my web host or is there some other problem that I'm unaware of.

Any help you could give would be much appreciated.

Regards

jmc

Reply With Quote
  #5  
Old March 28th, 2003, 12:04 PM
lemkepf lemkepf is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 7 lemkepf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
There could be a problem with the mail() command. I had some problems with a different piece of software before.

Instead of this:
PHP Code:
 mail($email_address$subject$message"From: MyDomain Webmaster<admin@mydomain.com>\nX-Mailer: PHP/" phpversion()); 


Change it to this:
PHP Code:
 mail($email_address$subject$message"From: My Domain<mye-mailaddress>"); 


Also, if you are on a home server, make sure port 25 is let through the firewall to allow senmail to use the smtp port.

Paul

Reply With Quote
  #6  
Old March 28th, 2003, 01:53 PM
jmc jmc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 8 jmc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the help Paul.

I haven't used the e-mail account on my site yet, but I presumed the e-mail would have worked right away.

I'll give your suggestion a try and set up some e-mail accounts at the same time.

Thanks again,

Jim

Reply With Quote
  #7  
Old March 28th, 2003, 07:54 PM
benos benos is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 233 benos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Cool

Page 2 of this article has been changed. Sorry about this inconvience. Thank you Paul, well spotted.

Reply With Quote
  #8  
Old March 29th, 2003, 10:18 AM
jmc jmc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 8 jmc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

Paul,
I changed the file as you recommended and set up a new e-mail account on my site but still no success

Regards,

Jim

Reply With Quote
  #9  
Old March 29th, 2003, 04:16 PM
lemkepf lemkepf is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 7 lemkepf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Have you tried sending the e-mail to a different account? I do know that when i tried to send e-mail to my gmx.net e-mail account the e-mail never gets to me. Dont know why, i'm guessing they has some kind of filtering software.

Also you might want to check to see what version of PHP and MySql your server is running. Check with your sysadmin and ask him if their is something wrong with the mail() command on their server.

Does everything else work on the pages?
jmc might want to help you out some more. It might be something with the script. Did you pull down the zip file with all the pages? Use that instead of copying and pasteing from the site, that way you have everything correct.

Cna't think of anything else...
Paul

Reply With Quote
  #10  
Old March 30th, 2003, 01:00 AM
foomal foomal is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 4 foomal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
email problem

I used to have the same problem where mail not sending out but the mail() function return true.

My solution is to set the corresponding values to sendmail_* properties in php.ini (I forgot the value that i used to set). All I can remember is to tell php where sendmail (I am using linux) is.

Not sure about Windows platform.


Foong

Reply With Quote
  #11  
Old March 30th, 2003, 11:33 AM
jmc jmc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 8 jmc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Paul,
I downloaded the zip file and changed the line that you mentioned earlier and nothing else. I have only used the files in the zip folder.

I presumed that if I uploaded the files to my site they would work as required, that is why I asked the question about the register_globals turned off; my site has them turned on and I don't know if I can change this or whether I need an administrator.

In answer to your question, I was sending the e-mail to an AOL account. I'll try sending it to the domain account and see if that works.

The account is on a Unix box, Foong, not Windows.

Thanks for your help.

jmc

Reply With Quote
  #12  
Old March 30th, 2003, 01:11 PM
lemkepf lemkepf is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 7 lemkepf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I can't see why the Register_Globals would be the problem. But if you can turn them on it might work.... just try anything to fix the problem... Maybe JNC might be able to get in on this and see if he has come across anything that might not let the e-mail from being sent? Talk to your Sysadmin, he might be able to shed some light on it. What version of PHP are they running?
Paul

Reply With Quote
  #13  
Old March 31st, 2003, 10:38 AM
foomal foomal is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 4 foomal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello jmc,

After digging up my php.ini file. this is the setting i have used.

sendmail_path=/usr/sbin/sendmail -t -f URL

In case you don't have access to php.ini file, put the following before you call mail():

ini_set(sendmail_path, "/usr/sbin/sendmail -t -f URL");


However, you should check with your sys admin to find out if you have sendmail installed.

Foong

Reply With Quote
  #14  
Old April 1st, 2003, 12:47 PM
jmc jmc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 8 jmc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for everyones help with this mail problem but I have to apologise for wasting your time.

I contacted my web host and after telling me to read an article on this site (http://www.devarticles.com/art/1/309/2) and trying out the script again, I have been told that the mail function has been disabled on the server to stop spam.

Thanks again for your help.

Lesson learned; Check with the site admin before trying to run scripts

jmc

Reply With Quote
  #15  
Old April 9th, 2003, 07:37 PM
axcelia axcelia is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 axcelia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
parse error

I tried out your tutorial but when I tried to test it out by registoring from the join_form.html on my site I got

Parse error: parse error, expecting `','' or `';'' in /users/iwebland.com/pmta/register.php on line 43

any suggetions as to what might be wrong?

thanks Axcelia

Reply With Quote
  #16  
Old April 9th, 2003, 07:39 PM
lemkepf lemkepf is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 7 lemkepf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
what does line 43 look like?
Copy and paste that into here.
Paul

Reply With Quote
  #17  
Old April 9th, 2003, 08:06 PM
axcelia axcelia is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 axcelia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
echo "<strong>Your email address has already been used by another member in our database. Please submit a different Email address! Please don't try to make multiple accounts, if u have lost the password go to <a href="lost_pw.html">The lost Password page</a>. If you are having problems email me at URL and I will try to fix the problem.<br />";

it's somewhere around that area.

thanks

Reply With Quote
  #18  
Old April 11th, 2003, 01:03 PM
foomal foomal is offline
Junior Member
<