The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto account PHP web
Author Message
admin_teclis
Journeyman
*

Posts: 51
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2012
Reputation: 0

Age of Apocalypse

Post: #11
RE: Auto account PHP web
hi Charm,
i was trying to configure this script on my shard... Buti found this line :

DB.QUERY "SELECT * FROM accounts WHERE status='0'"

in your script php for the register misses the set line "status"

Bug?

moreover... I have to add this code

[Function f_sphere_MySQL_connect]
DB.CONNECT
IF ( <DB.CONNECTED> )
SERV.LOG "Connection with MySQL... [ OK ]"
ELSE

DB.CONNECT
DB.EXECUTE "CREATE DATABASE IF NOT EXISTS `sphere`"
DB.EXECUTE "USE `sphere`"
serv.MySqlDatabase=sphere
serv.f_sphere_MySQL_connect
//SERV.LOG "Connection with MySQL... [ FAILED ]"
ENDIF

and also miss checks on empty fields. Email already included
01-09-2013 12:07 AM
Find all posts by this user Like Post Quote this message in a reply
htid4life
Journeyman
*

Posts: 162
Likes Given: 27
Likes Received: 4 in 3 posts
Joined: Mar 2012
Reputation: 2



Post: #12
RE: Auto account PHP web
hey guys would this work for mysql hosted on a webserver or have it got to be on local computer?

[Image: htid.jpg]
01-09-2013 01:59 AM
Find all posts by this user Like Post Quote this message in a reply
Ultima One
Journeyman
*

Posts: 238
Likes Given: 7
Likes Received: 10 in 6 posts
Joined: Jan 2013
Reputation: 6

Ultima One

Post: #13
RE: Auto account PHP web
Its for a web server.


For 'status' when you create the database, set the DEFAULT value to be 0. We never need to touch status from the website.

As for creating the table, you should not be creating tables through Sphere. Create the table via a sql script on phpMyAdmin or another mysql client.

Script below:

Code:
/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`sphere` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `sphere`;

/*Table structure for table `accounts` */

DROP TABLE IF EXISTS `accounts`;

CREATE TABLE `accounts` (
  `userid` int(4) NOT NULL AUTO_INCREMENT,
  `login` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `joindate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

ULTIMA ONE
The modern, sphere powered Ultima Online server
(This post was last modified: 01-09-2013 11:55 AM by Ultima One.)
01-09-2013 11:53 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
TopCat
Apprentice
*

Posts: 6
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: Sep 2015
Reputation: 0



Post: #14
RE: Auto account PHP web
(01-07-2013 01:04 PM)Ultima One Wrote:  Then, create signup.php:


PHP Code:
<?php
session_start
();
if(isset(
$_SESSION['account'])){
echo 
"Thank you for Registering. Your account will be activated within 10 minutes.";
}else{
?>
<h1>Fill in the form below to sign up!</h1>
<form id="regForm" action="register.php" method="post">
            <?php if(isset($_GET['regError'])){ echo "<span class='error'>".$_GET['regError']."</span><br />"; } ?>
            <label for="accountr">Account:</label>
            <input id="accountr" type="text" value="" name="account" />
            <label for="passwordr">Password:</label>
            <input id="passwordr" type="password" value="" name="password" />
            <label for="emailr">Email:</label>
            <input id="emailr" type="email" value="" name="email" />
            <input id="register" type="submit" value="Register" />
        </form>
<?php


No Post method for form regForm? =|
11-03-2015 12:07 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)