-2

Hi m i want to display some page via the variable ?page= its giving error Parse error: syntax error, unexpected '/' in C:\AppServ\www\index.php on line 11

<?php
include 'assets/config.php';
$page = $_GET["page"];
if ($page == "script") {
include("/pages/script.php");
}
if ($page == "how") {
include(/pages/"how.php");
?>

Please i need help on that and also

i want to redirect urls via a new variable ?go= page on my website my code Please customize it ....

*<?php
include '/assets/config.php';
$goto = $_SERVER['QUERY_STRING'];
$RedirectTo = "$goto";
header("Location: $RedirectTo");
exit;
?>*

Thanks

2 Answers2

1

Change this as well

$RedirectTo = "$goto";

To:

$RedirectTo = $goto;
Professor Zoom
  • 339
  • 1
  • 4
  • 13
0

Change

include("/pages/script.php");
include(/pages/"how.php");

to

include("pages/script.php");
include("pages/how.php");
Daniel
  • 10,641
  • 12
  • 47
  • 85