ballhogjoni Posted April 26, 2007 Share Posted April 26, 2007 I am coming up with this error for this line of code: Parse error: syntax error, unexpected '.', expecting ')' in /home/realfina/public_html/tests/leads.php on line 167 function redirect($filename="http://\"".$_SERVER['PHP_SELF']."?page=$next\"", $delay="0", $die="0"){ Quote Link to comment Share on other sites More sharing options...
per1os Posted April 26, 2007 Share Posted April 26, 2007 In function definitions I do not think you can use concatonation...or $strings for that matter. Instead what I would do a constant variable defintion and use that. IE: <?php $next = 3; define('DEFAULT_REDIRECT', 'HTTP://' . $_SERVER['PHP_SELF'] . '?page=' . $next); function redirect($filename=DEFAULT_REDIRECT, $delay="0", $die="0") { } ?> Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted April 26, 2007 Author Share Posted April 26, 2007 thank you 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.