• Networking: The investigation is still on the way, we've switched to backup telecom carriers since the episode but we're still working in settling everything as it must be. We'll add more updates as we have them available. Incoming and outgoing emails will be restricted, and user registration has been disabled until the issue is resolved.

Need Help On Reg PHP

Newbie Spellweaver
Joined
May 8, 2005
Messages
59
Reaction score
0
Location
philliphines
anyone can help me change this query to be compatible to my database? here is the script

//Run the querys if all goes well
function error_cex() {
echo "An account with that name already exists";
include('footer.php');
exit(); }
$queryc = "SELECT id FROM Account WHERE id = '$user'";
$resultc = mssql_query($queryc);
$numc = mssql_num_rows($resultc);
if ($numc > 0) {
error_cex(); }
else {
$query = "INSERT INTO Account (id, password) VALUES ('$user', '$pass')";
$result = mssql_query($query);
$queryb = "INSERT INTO StrokePoint (id, A_FirstLoginDate, A_LastLoginDate, A_Statue, A_Race, A_Level, A_PayMethod, A_LeftPoint, A_ServerNumber, A_CloseDate, A_TotalStrokePoint, A_LastStrokePoint, A_UsedPoint, A_OpenDate, A_UnlockDate, A_CreateDate, A_LastSaveDate) VALUES ('$user', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1')";
$resultb = mssql_query($queryb);
echo "Account " . $user . " successfully created with password " . $pass .""; }
include('footer.php');
mssql_close();

}
?>


how can i change the script to be compatible with mine i ran the sql insert to and it gives me this

INSERT INTO [test2].[dbo].[member]
([userid]
,[usernick]
,[sex]
,[passwd]
,[registdate]
,[id9you])
VALUES
(<userid, char(12),>
,<usernick, char(20),>
,<sex, bit,>
,<passwd, char(20),>
,<registdate, datetime,>
,<id9you, char(11),>)
 

Attachments

sage

...

Looks like you just copypasta'd something from the Internet and now you want us to do what you should be doing -.-

Seriously, how hard is it to read the relevant sections of the PHP/MySQL documentation and think?

And one more thing, compress your bloody images.
 
*khym* mssql. but doesn't matter,
Code:
unction error_cex() {
echo "An account with that name already exists";
include('footer.php');
exit(); }
$queryc = "SELECT id FROM Account WHERE id = '$user'";
$resultc = mssql_query($queryc);
$numc = mssql_num_rows($resultc);
if ($numc > 0) {
error_cex(); }
else {
$query = "INSERT INTO Account (id, password) VALUES ('$user', '$pass')";
$result = mssql_query($query);
$queryb = "INSERT INTO [test2].[dbo].[member]
([userid]
,[usernick]
,[sex]
,[passwd]
,[registdate]
,[id9you])
VALUES
(<userid, char(12),>
,<usernick, char(20),>
,<sex, bit,>
,<passwd, char(20),>
,<registdate, datetime,>
,<id9you, char(11),>)";
$resultb = mssql_query($queryb);
echo "Account " . $user . " successfully created with password " . $pass .""; }
include('footer.php');
mssql_close();

}
?>
ymmm, copy paste...
 
Back