Register page PHP

Thx alot!
I just add a value to auto match about idnum in tb_user
heres the fix part

if ($error!=1){
$id_last = pg_query ("select id from accounts order by id desc");
$id_result = pg_fetch_array ($id_last);
$id_last = $id_result["id"] +1 ;
$id_get = $id_result["id"] +1 ;
//echo "$id_last";
$sql = pg_query("insert into accounts (id,username,password) values ('$id_last','$login','$login')");
$connn = pg_connect("host=youriphere dbname=ffmember user=postgres password=yourdbpassword port=5432");
$id_result = pg_fetch_array ($id_last);
$sql2 = pg_query ("insert into tb_user (mid,password,pwd,idnum) values ('$login','$login','$passcript',$id_get)");
 
I'm sorry to ask you this, but would it help me to pin it to my database? I do not understand very well but, it is what I was looking for to invite my friends to play on my server. thanks for your wonderful work
 
This page is not working
*** is currently unable to process this request.

HTTP ERROR 500

Does somebody has any idea?
my discord: 𝔇𝔢𝔳𝔦𝔩#3483

fixed //
restart apache2 and install
php-pgsql
 
Last edited:
yokohiro

Could you please create a small tutorial?
I'm kind of Leiog in this subject and I need this exact model you created, but gives the following error in CAD.php:

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: database "ffaccount" does not exist in C:\xampp\htdocs\site2\cad.php on line 2

Fatal error
: Uncaught Error: No PostgreSQL connection opened yet in C:\xampp\htdocs\site2\cad.php:7Stack trace:#0 C:\xampp\htdocs\site2\cad.php(7): pg_query('SELECT username...')#1 {main} thrown in C:\xampp\htdocs\site2\cad.php on line 7

I'm trying to test a virtual machine with Debian 11.

I can configure a launcher, I only have problems on the registration page.

Could you help me with this?

I would be very grateful.
 
Back