123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|730|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> Need PHP->SQL Server function!

Thu, 28 Feb 2008, 12:48
Afr0
Right, I normally wouldn't ask about this, but seeing as I have a shitload to code myself right now, I hope that people might just be interested enough to help me out.

Could someone make me a PHP-based webpage that has a couple of textboxes and a button for creating an account in my game's database?

I don't know PHP myself, and as I said I have too much to do right now to sift through tutorials on connecting to SQL Server with it. :\

The Account table currently looks like so:

AccountName - varchar(50)
Password - varchar(50)

It would be nice if you made the PHP code as accessible as possible, as my server might not be available remotely for testing right off the bat, so I might have to tweak the connectionstring myself.

You are, however, free to test out connection on pokemononline.servebeer.com... just not sure what ports SQL Server are using, though it should be set to allow remote connections!

Thanks in advance!

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Thu, 28 Feb 2008, 19:12
Stealth
I wrote this real fast. Let me know if this isn't what you need.

This code is untested by the way. Also the code doesn't verify input accuracy. If you need that let me know.



-=-=-
Quit posting and try Google.
Fri, 29 Feb 2008, 05:13
Afr0
Wow, thanks alot!

Seems perfectly OK, except it works with MySQL. Is there anyway this could work with Microsoft SQL Server?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Fri, 29 Feb 2008, 06:52
Phoenix
I have not tested this, nor have I ever used MS SQL. But I believe these modifications should make it work:

Fri, 29 Feb 2008, 16:36
Afr0
Thanks alot dude!
Appreciate it.

I'll test it tommorrow, as I plan to set off most of tommorrow to find a decent webhost, install Joomla, a developer's Wiki, a forum and, obviously, an account creation page.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!