Forse sono rimbambito io ma nn riesco a venire fuori da questo problema:
Ho questo codice
che dopo essere stato compilato dal server mi rispedisce questocodice:<?php $nome = $_GET['name']; $punteggio = $_GET['score']; mysql_connect($host, $dbuser, $dbpass) or die( "Could not connect : " . mysql_error()); mysql_select_db($database) or die("Could not select database..."); mysql_query("INSERT INTO `tetris` (`Nome`, `Punteggio`) VALUES ( '$nome', '$punteggio');") or die(mysql_error()); echo "<html> <head> <title>V-Rain's Tetris</title> <script type=\"text/javascript\"> function class() { newin = window.open('www.google.it','titolo','scrollbars=yes,resizable=no, width=300,height=400,status=no,location=no,toolbar=no'); } </script> </head> <body bgcolor=\"#000000\" link=\"#FFFFFF\" vlink=\"#FFFFFF\" alink=\"#FFFFFF\"> <div align=\"center\"><font size=\"5\" color=\"#FFFFFF\">Dati aggiunti con successo!</font> <a href=\"#\" onclick=\"class()\">Guarda la classifica</a> </div> </body> </html>"; ?>
Perchè continua a dirmi che c'è un errore di sintassi nel javascrpt?codice:<html> <head> <title>V-Rain's Tetris</title> <script type="text/javascript"> function class() { newin = window.open('www.google.it','titolo','scrollbars=yes,resizable=no, width=300,height=400,status=no,location=no,toolbar=no'); } </script> </head> <body bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"> <div align="center"><font size="5" color="#FFFFFF">Dati aggiunti con successo!</font> Guarda la classifica </div> </body> </html>
Devo modificare qualcosa nel codice php?

Rispondi quotando
