The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I'm really new to PHP so I'm sorry if any of these questions are really dumb. I am trying to check weather people registering on my site are part of my current database. So what I have done is the following: 1. I have added two fields to the registration template. User ID number and User Membership number. 2. I have added the following code to register.php: PHP Code:
![]() PHP Code:
Warning: mysql_query(): 1 is not a valid MySQL-Link resource in /includes/db_mysql.php on line 212 Warning: mysql_error(): 1 is not a valid MySQL-Link resource in /includes/db_mysql.php on line 357 Warning: mysql_errno(): 1 is not a valid MySQL-Link resource in /includes/db_mysql.php on line 358 There seems to have been a slight problem with the BB Test Forum Database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience. Warning: mysql_query(): 1 is not a valid MySQL-Link resource in /includes/db_mysql.php on line 212 Warning: mysql_error(): 1 is not a valid MySQL-Link resource in /includes/db_mysql.php on line 357 Warning: mysql_errno(): 1 is not a valid MySQL-Link resource in /includes/db_mysql.php on line 358 Any ideas where I might be going wrong? |
#2
|
|||
|
|||
![]()
I don't see hwere you go wrong right now.
Nut please remove your license number from the php code. PS Are you sure that thise code snippet is causing it? |
#3
|
||||
|
||||
![]()
@Killkenny
Please do not post files that contain your license number, as this violates the license agreement and our rules. Thank you. |
#4
|
|||
|
|||
![]() Quote:
I can't see what else the problem could be. I removed the code in the register.php file and the registration went through fine... Any ideas? |
#5
|
||||
|
||||
![]()
Do you use the same username/password for the other database as for vBulletin?
Then this is the problem: The code in check_membership will use the current connection (for vBulletin) - but you close the connection, so it won't be available in vBulletin any longer after the call. Try PHP Code:
Another approach would be to use vBulletins DB-Class, and change the DB upon call end return. Or use a different user/password. |
#6
|
|||
|
|||
![]() Quote:
PHP Code:
PHP Code:
However it was the username and password stuff that was stopping me from accessing the DB. So thanks SO much for your help. I would never had guessed that was the problem! So I'm sorted and happy and my programme is working great and all is right with the world! Again thanks for your help! |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|