[Resolvido] Header Location não funciona
Boa tarde fiz um script em php chamado conta_clik_banner.php ai ele assim que executado ele atualiza o campo cliques da tabela tb_banner ai ele tem que redirecionar para o campo link_banner da tabela tb_banner mais esta dando um erro na linha 48 segue abaixo a linha com problema e mais abaixo meu script em php.
Erro: Parse error: parse error in C:\wamp\www\megame\banner\conta_click_banner.php on line 48
Linha do Script: header("Location: $link_cliente");
Aqui o codigo da pagina conta_click_banner.php
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$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":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_rs_banner = "-1";
if (isset($_GET['id_banner'])) {
$colname_rs_banner = $_GET['id_banner'];
}
mysql_select_db($database_megame, $megame);
$query_rs_banner = sprintf("SELECT * FROM tb_banner WHERE id_banner = %s", GetSQLValueString($colname_rs_banner, "int"));
$rs_banner = mysql_query($query_rs_banner, $megame) or die(mysql_error());
$row_rs_banner = mysql_fetch_assoc($rs_banner);
$totalRows_rs_banner = mysql_num_rows($rs_banner);
mysql_free_result($rs_banner);
mysql_query("update tb_banner set cliques_banner = cliques_banner +1 where id_banner=".$_GET['id_banner']);
$link_cliente = $row_rs_banner['link_cliente_banner']
header("Location: $link_cliente");
?>
<input name="id_banner" type="hidden" id="id_banner" value="<?php echo $row_rs_banner['id_banner']; ?>">Discussão (2)
Carregando comentários...