Jump to content

Asking for Help


steven_elvisda

Recommended Posts

Hi All,

 

I new with phpfreaks. I have some problem with my php code that i was typping from my php and mysql book.

 

the problem is when i register completedi got the link but the code can not generate uid= but token variable is generated

 

Please kindly to check attached file for viewing the full code.

I really appreciate with your helping.

 

Kindly Regards,

Steve.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/214420-asking-for-help/
Share on other sites

In order to generate and return the userId, the query in the public function save(){} in the class User must execute without error.

 

In briefly looking at it, you are missing the closing ) that is part of the VALUES () term.

 

You should echo $query inside that function to see exactly what it contains and you can echo mysql_error() to find out why your query is failing.

 

Edit: Your public function setInactive(){} also needs some error checking logic in it. You are calling $this->save(); (which in the current code is returning a false value), but you are not checking that and blindly executing the INSERT INTO %sPENDING ... query. You should not be executing that query unless $this->save() returns a true value.

 

 

Link to comment
https://forums.phpfreaks.com/topic/214420-asking-for-help/#findComment-1116760
Share on other sites

Hi, Many thanks for your help I just add more ) at VALUE my $this->userId is turned but when I click on verify.php link

 

I alway get file by the last condition (Your Provided invalid data.

Please try again.) please check on file verify.php. I apologize that i did not change or add mor condition in function setInactive(){} because that code i typing follow my book.:(

 

Thanks for your helping and comment. your comment really mean to me.

 

Kindly Regards,

Steve.

Link to comment
https://forums.phpfreaks.com/topic/214420-asking-for-help/#findComment-1117259
Share on other sites

The other query in the public function save(){} is missing quotes around the EMAIL_ADDR = "%s" value.

 

Again, you can troubleshoot what you code is doing by echoing the $query variable and echoing mysql_query() to find out what the query looks like and what errors it produces.

Link to comment
https://forums.phpfreaks.com/topic/214420-asking-for-help/#findComment-1117312
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.