sul vecchio server con php 4 nessun errore con questo script, mentre ora sul nuovo server con php5 mi da questo errore:
Parse error: syntax error, unexpected '}' in /home/..../infoconfirm.php on line 1
allego il file.. ho controllato le parentesi ma mi pare tutto ok.. qualcosa mi sfugge riguardo php5?
Codice PHP:
<?
include("../config.php");
?><html><head><title><? echo"$exchange_name"; ?> - Registrazione</title><LINK REL=stylesheet HREF="../style.css" TYPE="text/css">
</head>
<body>
<CENTER>
<TABLE>
<TR><TD>
<?
$error=0;
if($submit){
// Validate the Name
if(strlen(trim($name)) < 2){
$error = 1;
$error_html .= "Nome non valido, (deve essere lungo almeno 2 caratteri).
\n";
}
if(strlen(trim($name)) > 100){
$error = 1;
$error_html .= "Nome non valido, (deve essere lungo massimo 100 caratteri).
\n";
}
// Validate the Login
if(strlen(trim($login)) > 15){
$error = 1;
$error_html .= "Username non valido, (deve essere lungo massimo 15 caratteri).
\n";
}
if(strlen(trim($login)) < 2){
$error = 1;
$error_html .= "Username non valido (deve essere lungo almeno 2 caratteri).
\n";
}
if($oldlogin == $login){
}else{
$check_login=mysql_query("select * from banneruser where login='$login'");
$get_login=@mysql_fetch_array($check_login);
$exists=$get_login[login];
if($exists == $login){
$error = 1;
$error_html .= "Username non valido, (già presente nel database).
\n";
}
}
// Validate the Email Address
if(!ereg("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}\$",$email)){
$error = 1;
$error_html .= "Indirizzo Email non valido.
\n";
}
// Validate the Password
if(strlen(trim($pass)) < 4){
$error = 1;
$error_html .= "Password non valida, (deve essere lunga almeno 4 caratteri).
\n";
}
if($error=="1"){
echo "
<font color=\"#FF0000\">[b]La tua registrazione non è stata completata per i seguenti motivi:[/b]</font>";
echo "<blockquote>".$error_html."</blockquote>\n";
echo "Please <a href=\"javascript:history.go(-1)\">Riprova</a> ancora.";
} else {
$get_info=mysql_query("select * from banneruser where id='$uid'");
$get_rows=@mysql_fetch_array($get_info);
$url=$get_rows[url];
$exposures=$get_rows[exposures];
$credits=$get_rows[credits];
$clicks=$get_rows[clicks];
$siteclicks=$get_rows[siteclicks];
$approved=$get_rows[approved];
$update=mysql_query("update banneruser set login='$login',pass='$pass',name='$name',email='$email' where id='$uid'");
echo "
Submission Complete.
";
echo "
Nome e Cognome: $name
Username: $login
Password: $pass
Email: $email
ID Utente: $uid
";
echo "$url $exposures $credits $clicks $siteclicks $approved";
?>
<form method="POST" action="<? echo"$base_url"; ?>/client/stats.php">
<input type=hidden name=login value=<? echo "$login"; ?>>
<input type=hidden name=pass value=<? echo "$pass"; ?>>
<input type="submit" value="Login">
<?
}
}
?>
</cENTER>
</TD></TR>
</TABLE>
non penso che riguardi il file config.php che viene incluso alla prima riga perchè dentro contiene solo variabili tipo $dbhost = "localhost";
e poi se il problema era quello me lo dava per ogni file dove viene incluso.. invece per esempio nel login non lo da..