gaugeboson Posted February 14, 2008 Share Posted February 14, 2008 syntax error, unexpected T_VARIABLE on line 12 <?php include("config.php"); if(isset($_GET['id']) == TRUE) { if(is_numeric($_GET['id']) == FALSE) { header("Location: " . $config_basedir); } $validforum = $_GET['id']; } else { header("Location:" $config_basedir); } require("header.php"); Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted February 14, 2008 Share Posted February 14, 2008 It be great if we knew which line was line 12 (considering you showed us 10 lines that seems to be impossible!!!) Quote Link to comment Share on other sites More sharing options...
AndyB Posted February 14, 2008 Share Posted February 14, 2008 I give up. You quote 10 lines of code and an error message for line 12. Best guess. config.php might have an error. Quote Link to comment Share on other sites More sharing options...
gaugeboson Posted February 14, 2008 Author Share Posted February 14, 2008 oops <?php include("config.php"); if(isset($_GET['id']) == TRUE) { if(is_numeric($_GET['id']) == FALSE) { header("Location: " . $config_basedir); } $validforum = $_GET['id']; } else { header("Location:" $config_basedir); } require("header.php"); it is the line: header("location: " $config_basedir); Quote Link to comment Share on other sites More sharing options...
trq Posted February 14, 2008 Share Posted February 14, 2008 Should be... <?php include("config.php"); if (isset($_GET['id'])) { if (!is_numeric($_GET['id'])) { header("Location: " . $config_basedir); } $validforum = $_GET['id']; } else { header("Location:" . $config_basedir); } require("header.php"); ?> Quote Link to comment Share on other sites More sharing options...
gaugeboson Posted February 14, 2008 Author Share Posted February 14, 2008 I added in that period previously, though I got a 404 not found message (and still do). Quote Link to comment Share on other sites More sharing options...
haku Posted February 14, 2008 Share Posted February 14, 2008 If thats the case then your base directory probably doesn't hold the correct value. What happens when you echo $config_basedir? Quote Link to comment Share on other sites More sharing options...
gaugeboson Posted February 14, 2008 Author Share Posted February 14, 2008 I get a blank page. Quote Link to comment Share on other sites More sharing options...
haku Posted February 14, 2008 Share Posted February 14, 2008 Then you need to set a value for $config_basedir somewhere. Right now its empty. Quote Link to comment Share on other sites More sharing options...
gaugeboson Posted February 14, 2008 Author Share Posted February 14, 2008 I do have a value there: http://127.0.0.1/sites/forums/ When I input the period as you recommended I get the 404 error, and it links to that url. Whereas the code was written for viewforum, which should come up through localhost/viewforum.php Quote Link to comment Share on other sites More sharing options...
haku Posted February 14, 2008 Share Posted February 14, 2008 What is the value contained in $config_basedir The period is required. There is no way around it. Quote Link to comment Share on other sites More sharing options...
gaugeboson Posted February 14, 2008 Author Share Posted February 14, 2008 $config_basedir = "http://127.0.0.1/sites/forums/"; Quote Link to comment Share on other sites More sharing options...
haku Posted February 14, 2008 Share Posted February 14, 2008 There is your problem - that page doesn't exist. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.