Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2004, 08:57 PM
Logitech-2004 Logitech-2004 is offline
 
Join Date: Nov 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default AddNew User Into........

I Build A Nifty Little Shoping Cart, And It Has It's Own Member Management System, But I Wanted To Add A Small Code To Add The User Into The VB3 Database, But My SQL Query Must Be Wrong.... Or Something. Worked Great In Vb2.3.3.

Code:
	$query="INSERT INTO user (usergroupid,username,password,passworddate,email,styleid,usertitle,salt,daysprune,reputation,pmpopup,startofweek,pmtotal,pmunread,threadedmode,autosubscribe,maxpost,referrerid,birthday_search,option,autosubscribe) VALUES ('$usergroupid','$username','$saltedpassword','$transactiondate','$email','0','$title','$salt','0','10','1','1','0','0','0','-1','-1','0','0000-00-00','6487','-1')";
	mysql_query($query);
	$userid=mysql_insert_id();
	$query="INSERT INTO userfield SET userid='$userid'";
	mysql_query($query);
	mysql_close();
Any Ideas?
Reply With Quote
  #2  
Old 04-29-2004, 09:01 PM
Mr. HillBilly Mr. HillBilly is offline
 
Join Date: Oct 2003
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wrong area.
Reply With Quote
  #3  
Old 04-29-2004, 09:02 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*moved*
Reply With Quote
  #4  
Old 05-01-2004, 06:34 PM
Logitech-2004 Logitech-2004 is offline
 
Join Date: Nov 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody?
Reply With Quote
  #5  
Old 05-01-2004, 06:38 PM
insanctus's Avatar
insanctus insanctus is offline
 
Join Date: Feb 2003
Location: Michigan
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you getting any errors ?

Or is it just not inserting?
Reply With Quote
  #6  
Old 05-01-2004, 07:49 PM
Logitech-2004 Logitech-2004 is offline
 
Join Date: Nov 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not Inserting.
Reply With Quote
  #7  
Old 05-01-2004, 07:52 PM
Logitech-2004 Logitech-2004 is offline
 
Join Date: Nov 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heres Some The Info:
Code:
				$membershipstatus="Active";
				$membershipexp=date('Ymd',time()+365*24*3600);
				$membershippackage="PackageC";
				$transactiontype="PackageC";
				$transactiondate=date('Ymd',time());
				$transactionamount=$HTTP_POST_VARS['mvc_MONEY'];
				$transactionid=$HTTP_POST_VARS['transaction_id'];
				$usergroupid="9";
				$transactionprocessor="MVC";
				$softwarekeys=2;
				$title='Private Memeber';

	$username=$HTTP_POST_VARS['mvc_NICK'];
	$password=$HTTP_POST_VARS['mvc_PASSWORD'];
	$nomd5pass=$HTTP_POST_VARS['mvc_PASSWORD'];
	$password=md5(md5($password));
	$email=$HTTP_POST_VARS['mvc_EMAIL'];
	$salt='AbC'; <- I Change That Every Day.
	$saltedpassword=md5(md5($password) . $salt);
Reply With Quote
  #8  
Old 05-02-2004, 03:57 AM
Logitech-2004 Logitech-2004 is offline
 
Join Date: Nov 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I Got That Fixed... Next Problem Is, Am I Doing The Password Encoding Correctly?
Code:
$nomd5pass=$HTTP_POST_VARS['mvc_PASSWORD'];
$salt="AbC";
$saltedpassword=md5(md5($nomd5pass) . $salt);
Reply With Quote
  #9  
Old 05-02-2004, 06:11 AM
Logitech-2004 Logitech-2004 is offline
 
Join Date: Nov 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I Think I Got The Passwird Thing Worked Out. But VBull. Is Saying The Password Is Wrong Or The User Name Is Invalid....

Heres The Entire Code.
Code:
//POST Vars.
	$username=$HTTP_POST_VARS['mvc_NICK'];
	$nomd5pass=$HTTP_POST_VARS['mvc_PASSWORD'];
	$password=md5(md5($password));
	$email=$HTTP_POST_VARS['mvc_EMAIL'];
	$salt="AbC";

//PASSWORD
	if (strlen(md5($nomd5pass)) == 32) {
		$saltedpassword=md5($nomd5pass . $salt);
	} else {
		$saltedpassword=md5(md5($nomd5pass) . $salt);
	}

//Add User To The VB3 Database.
	$query="INSERT INTO user (usergroupid,displaygroupid,username,password,passworddate,email,parentemail,usertitle,salt) VALUES ('$usergroupid','$usergroupid','$username','$password','$transactiondate','$email','$email','$title','$salt')";
	
	mysql_query($query);
	$userid=mysql_insert_id();
	$query="INSERT INTO userfield SET userid='$userid'";
	mysql_query($query);
	$query="INSERT INTO usertextfield (userid) VALUES ($userid)";
	mysql_query($query);
Help......
Reply With Quote
  #10  
Old 05-16-2004, 04:45 AM
Logitech-2004 Logitech-2004 is offline
 
Join Date: Nov 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did I Ask To Hard Of A Question? It Must Be Simple For You Advace Coders
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.16352 seconds
  • Memory Usage 2,252KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete