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
https://forums.phpfreaks.com/topic/93812-code-help/
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.