Zwracam się do was z uprzejmą prośbą o sprawdzenie skryptu, który ma służyć rejestracji kont, gdyż posiada on chyba błędy skoro występują błędy.
Od razu zaznaczam że nie znam się zbytnio na php oraz mmysql dlatego też wziąłem skrypt dla Mysql i pozamieniałem fukcje dla mmsq. MIałem nadzieję że to wystarczy ale chyba jednak problem leży w czymś innym.
Otóż błąd wygląda następująco:
Fatal error: Call to undefined function mssql_query() in C:\Program Files\WebServ\httpd\config.php on line 12
A pliczki odpawiadające za to wyglądaja następująco:
index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Simple Register page </title> <?php require('config.php'); ?> <style type="text/css"> <!-- body,td,th { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #666666; background-image: url(03_1024.jpg); } .style1 { font-size: 16px; font-weight: bold; } .style2 { font-size: 14px; font-weight: bold; } .style3 { font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; } --> </style></head> <body> <div align="center"> <table width="1000" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="10"> </td> </tr> <tr> <td colspan="10"><div align="center" class="style1">Simple Register page </div></td> </tr> <tr> <td colspan="10"><div align="center"><strong>Nazwa serwera </strong></div></td> </tr> <tr> <td colspan="10"><div align="center">Wykonawcy: </div></td> </tr> <tr> <td colspan="10"> </td> </tr> <tr> <td colspan="3"><div align="center"></div></td> <td colspan="4" rowspan="15" valign="top"><div align="center"> <p align="center" class="style3"><span class="b01"><strong>Stworz konto! </strong></span><br /> </p> <form action="?op=register" method="post"> <table width="258" border="0" align="center"> <tr> <td width="107" height="20" class="b01"><strong>Login:</strong></td> <td width="141"><label> <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" /> </label></td> </tr> <tr> <td height="25" class="b01"><strong>Haslo:</strong></td> <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td> </tr> <tr> <td height="24" class="b01"><strong>Powtorz haslo: </strong></td> <td><input name="pass2" type="password" class="liteoption" id="pass2" size="15" maxlength="15" /></td> </tr> </table> <p align="center"> <input name="submit" type="submit" class="liteoption" value="Create Account" /> </p> </form> <div align="center"> <?php if(!$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) { } else { $user = $_POST['user']; } if(exi($user) != '0') { } if($pass != $pass2) { } $nww = nw($user, $pass); if ($nww){ }else { }} ?> </body> </html>
config.php
<?php $connection_string = 'DRIVER={SQL Server};SERVER=EMO\SQLEXPRESS;DATABASE=ACCOUNT_DBF'; $user = 'sa'; $pass = '123456'; $connection = odbc_connect( $connection_string, $user, $pass ); function nw($N, $C){ $reg = mssql_query("INSERT INTO ACCOUNT_TBL (account, password, isuse) VALUES( '$N', '$C', 'T')")or die(mssql_error()); return $reg; } function exi($user){ $check = mssql_query("SELECT * FROM ACCOUNT_TBL WHERE account = '$user'"); $check2 = mssql_num_rows($check); return $check2; } ?>
Jeszcze raz bardzo proszę o pomoc, gdyż nie mam pojęcia co to może być.
Pozdrawiam