Bom dia pessoal.Espero que possam me ajudar. Bem, estou desenvolvendo um site e estou usando querystring.Bem
na index do site eu inseri o seguinte codigo :
[codebox]
<?php
$acao = $_GET["acao"];
if(empty($acao)) {
include("home.php");
}elseif(eregi("http|ftp|https|www|wget", $acao) || !is_file($acao.".php")){
include("ilegal.php");
}else{
include($acao.".php");
}
?>
[/codebox]
e no menu eu dou o seguinte href="?acao=modulos/aviso/admin"
Beleza.. até ai sem problema..eu clico e ele carrega a pagina sem problemas, sinal de que a QS até ai funcionou
(modulos/aviso/admin.php)no menu dela contem um link que se chama atualizar com o seguinte href="http://www.enredeco.com/modulos/aviso/alterar.php?id=<?=$linha['id']?>"
o problema é que quando eu clico.. ele carrega a pagina.. mas nao na index.php e sim em outra pag .Como fazer para carregar em outra pag.(_blank)
ps: a target está correta.
Obrigado.

Problemas Com Querystring
Started By Gustavo_Botega, 01/08/2009, 21:35
2 replies to this topic
#1
Posted 01/08/2009, 21:35
#2
Posted 01/08/2009, 23:58
Bom, eu achei confuso o final do seu post.
[...] mas nao na index.php e sim em outra pag .Como fazer para carregar em outra pag.(_blank)
Felipe Pena
[...] ó terra, terra, terra; ouve a palavra do Senhor. — Jeremias 22:29
[...] ó terra, terra, terra; ouve a palavra do Senhor. — Jeremias 22:29
#3
Posted 04/08/2009, 14:43
<?
$pag = addslashes(htmlentities($_GET['page']));
$sub = addslashes(htmlentities($_GET['sub']));
if($pag{1}){
// Verifica a existencia do mesmo (se existir inclue)
if (is_file($pag.'/'.$sub.'.php')) {
include($pag.'/'.$sub.'.php');
}elseif(is_file($pag.'.php')){
include($pag.'.php');
}else{
include('404.php');
}
}else{
// Caso o arquivo não exista inlue a padrão
include('home.php');
}
?>
$pag = addslashes(htmlentities($_GET['page']));
$sub = addslashes(htmlentities($_GET['sub']));
if($pag{1}){
// Verifica a existencia do mesmo (se existir inclue)
if (is_file($pag.'/'.$sub.'.php')) {
include($pag.'/'.$sub.'.php');
}elseif(is_file($pag.'.php')){
include($pag.'.php');
}else{
include('404.php');
}
}else{
// Caso o arquivo não exista inlue a padrão
include('home.php');
}
?>
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)