Lo he echo (no conozco mucho del tema), y cuando meto el usuario, me saltan multiples errores, os dejo el codigo del formulario y los errores.
Errores:
Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 30
Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 30
Warning: mssql_fetch_row(): supplied argument is not a valid MS SQL-result resource in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 31
Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 32
Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 32
Warning: mssql_fetch_row(): supplied argument is not a valid MS SQL-result resource in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 32
Warning: implode() [function.implode]: Argument must be an array in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 33
Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 36
Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in x:\inetpub\vhosts\xxx.es\httpdocs\donate\recargar2 .php on line 36
Código 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>
<!-- 123TICKET SCRIPT TO PROTECT YOUR PAYZONE AREA -->
<noscript>
<meta http-equiv="Refresh" content="0;URL=http://www.123ticket.com/Public_IA/check/error_code.php?IDS=50657&IDD=58954">
</noscript>
<script language="Javascript" src="http://www.123ticket.com/Public_IA/check/chk.php?IDS=50657&IDD=58954"></script>
<!-- END : 123TICKET SCRIPT -->
</head>
<?php
require "head.php";
?>
<body>
<p align="center"><img border="0" src="webzenlogo.jpg" width="256" height="195"><br>
<center><b>Escribe el nombre de tu cuenta</b><br>
<form method="get" action="<?php echo $_SERVER['PHP_SELF'];?>">
<input type="text" name="input" />
<input type="submit" name="submit" value="Go" />
</form></center>
<?PHP
if (isset($_GET['input'])){
$useracc = $_GET['input'];
$conexion = mysql_connect("ip", "user", "pass);
mysql_select_db("realmd", $conexion);
$sql_check = mssql_query("SELECT id FROM account where username='$useracc'");
$res = mssql_fetch_row($sql_check);
$cred = mssql_fetch_row(mssql_query("SELECT pints from voting_pints where id='$res'"));
$sumapuntos = implode($cred);
$puntosasumar = 150;
$allcsp = $sumapuntos+$puntosasumar;
$exe_credit = mssql_query("UPDATE voting_points Set points='$allcsp' Where id='$res'");
}
?>
</body>
</html>
Seguramente este codigo estea fatal, ya que es la primera vez que me lanzo a hacerlo.