Jump to content

COde help


darkfreaks

Recommended Posts

ok i think i have this nearly solved but i made a huge if statement of issets or !empty to assure no blank values went into the database. but i still get some blank values mainly blank usernames  when i try to signup it errors " error please fill out the form and try again" but it still is submitting somehow and cannot figure it out.

 

 

<?php

if (isset($_POST['process'])||!empty($_POST['process'])||
!empty($_POST['random_id'])||!empty($_POST['username'])
||!empty($_POST['password'])||!empty($_POST['password_c'])||
!empty($_POST['email'])||!empty($_POST['email_c'])
||!empty($_POST['security_code'])||isset($_POST['random_id'])||
isset($_POST['username'])||isset($_POST['password'])
||isset($_POST['password_c'])||isset($_POST['email'])||isset($_POST['email_c'])
||isset($_POST['security_code'])){
	// Try to register the user
	if ($qls->User->register_user()) {
		switch ($qls->config['activation_type']) {
			default:
			echo REGISTER_SUCCESS_NO_ACTIVATION;
			break;
			case 1:
			echo REGISTER_SUCCESS_USER_ACTIVATION;
			break;
			case 2:
			echo REGISTER_SUCCESS_ADMIN_ACTIVATION;
			break;
		}
	}
	else {
	// Output register error
	echo $qls->User->register_error . REGISTER_TRY_AGAIN;
	}
}
else {
// Get the random id for use in the form
$random_id = $qls->Security->generate_random_id();
require_once('html/register_form.php');
}
}
else {
echo REGISTER_ALREADY_LOGGED;
}?>



 

 

 

Link to comment
Share on other sites

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.