Jump to content

Recommended Posts

Hi, i've been working on this for quite some time now and it seem not to be working. Can someone please help me out with this? The code are in the attachment. You can try to register on http://siteb.wine7000.com/Register.php

 

Thank you in advance!

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/186702-user-registration-with-activation-link/
Share on other sites

What exactly isn't working? Are you getting any errors? What have you validated and what haven't you validated? Don't expect us to do all the work for you. You should be able to validate what parts of the code are working properly and at least narrow down what part is not working correctly. Then you can provide the section of code that is in error and describe what it is doing differently than you expect.

 

For example:

 

When the form is submitted, is the data saved to the database correctly? Is the email sent? Etc.

Im sorry for the lack of information

 

When i register, an email was successfully sent to my email account.

All data is inserted in the database correctly.

 

1) When i clicked on the activation link, it did not update the table field 'Status' from verify to activated. It is kept at verify.

 

2) When new user tries to register, it says '"You are already activated." (Line 176 of Verify.php)

 

Let me attached an updated Verify.php file

 

[attachment deleted by admin]

Not sure about the first problem, but the second problem seems pretty obvious to me.

 

On this line are you meaning to assign a value to $queryString or are you wanting to do a comparison? = vs. ==

 

if($queryString = $_SERVER['QUERY_STRING'])

im assigning value to it, so it should be = instead of == right?

 

And for problem (1): It didnt update line 161. I dont know why, do u have any idea?

 

$query=mysql_query("update user set ActivationKey = '', UserStatus='activated' where ActivationKey=$queryString ");

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.