Cita:
Parse error: syntax error, unexpected $end in /home/vhosts/expressohogwarts.6te.net/diagon/tiendas/ollivanders2.php on line 152
Página:
Código php:
Ver original
<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_general = "*************"; $database_general = "*************"; $username_general = "*************"; $password_general = "*************"; $general = mysql_pconnect($hostname_general, $username_general, $password_general) or trigger_error(mysql_error(),E_USER_ERROR); ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": break; case "double": break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_obj = "-1"; $colname_obj = $_POST['radio']; } $query_obj = sprintf("SELECT * FROM objetos WHERE id = %s", GetSQLValueString($colname_obj, "int")); $colname_banco = "-1"; $colname_banco = $_SESSION['MM_Username']; } $query_banco = sprintf("SELECT * FROM banco WHERE usuario = %s", GetSQLValueString($colname_banco, "text")); $colname_user = "-1"; $colname_user = $_SESSION['MM_Username']; } $query_user = sprintf("SELECT * FROM usuarios WHERE usuario = %s", GetSQLValueString($colname_user, "text")); ?><!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=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { background-color: #02021E; } .style2 { font-family: Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; } --> </style></head> <body> <div align="center" class="style2"> <p>Boleto de compra (Parte 2)</p> <p><strong>POR FAVOR, LEA.</strong></p> <p>Usted decidío agregar a su inventario y gastar:</p> <p> <label><?php echo $row_obj['nombre']; ?></label> </p> <p>Inventario:</p> <? VALUES ('$row_user[id]','$_POST[radio]')",$general); echo "Ocurrio un error. $my_error"; } else { echo "Exito al ingresar el objeto en su inventario"; } ?> <p>Gringotts:</p> <p><? if(($row_banco['oro'] > $row_obj['valor_oro']) && ($row_banco['plata'] > $row_obj['valor_plata'])) { $oronuevo = $row_banco['oro'] - $row_obj['valor_oro']; $platanueva = $row_banco['plata'] - $row_obj['valor_plata'] ; plata=$platanueva WHERE usuario = $row_user[usuario]",$general); echo "Ocurrio un error. $my_error"; } else { echo "Dinero actualizado"; } ?> </p> <p>Usted puede seguir comprando.</p> </div> </body> <?php ?> </html>
Edito: Me faltaba un cierre :D