27, May 2012

registration issues - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: registration issues
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: registration issues  (Read 1395 times)
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« on: Jun 20, 2010, 02:51:25 am »

hey, first of all thanks for the great class, it has definitely helped me learn a bit more about php user management.

i have got the script to successfully login, pull info from user (manually inserted) and such, however for some reason the registration from example2.php is not working with my registration code.

Code:
<?php

if($_POST['register'] == "true"){
if (!empty($_POST['username'])){
require_once('inc/access.class.php');
$user = new flexibleAccess();
$data = array(
   'username' => $_POST['username'],
   'password' => $_POST['password'],
'email' => $_POST['email'],
   'active' => 1,
   'banned' => 'no'
);
  $userID $user->insertUser($data);
  if ($userID==0){
  
$register "display:none;";
$login "display:none;";
   echo '<center>Registration Failed.<br><a href="login.php?action=register" target="_self">Please Try Again.</center>';
  
  } else {

$register "display:none;";
$login "display:none;";
   echo 'User registered with user id '.$userID;

  }
} else {
$register "display:none;";
$login "display:none;";
echo '<center>Please fill in all required fields.<br><a href="login.php?action=register" target="_self">Please Try Again.</center>';
}
}

?>


that is what is in my login.php?action=register page, the form is set up properly, all fields match the required $_POSTs, yet any time i try to register i get $userID = 0 Sad
my usertable was created from the supplied sql code and the only thing i've changed is that i added the 'banned' userfield, which i have declared in the array. i've tried this with and without it and i am getting the same result.

if anyone is willing to give me a hand i'd be more than grateful for it. Smiley
Google dot what?
*
Posts: 2
16 credits
Members referred : 0


« Reply #1 on: Jun 20, 2010, 05:52:29 pm »

No one available to help?
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=10137
Tags : php login register help Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  Php User Class
Topic: registration issues
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 08:57:37 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 62.814
Total Topics: 11.028
Total Members: 21.451
Tutorials : 58
Resources : 929
Designs : 395
Latest Member: sobbin

92 Guests, 2 Users online :

12 users online today:




Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.