I'm trying to add some Javascript into my PHP to redirect a page after a user has posted a new topic in a forum.
Currently the user has to click a link to view their topic, which is one click too many for liking.
I have this code:
This code is inside newtopic.php.
The redirect doesn't work as I get this:
Can anyone see anything that is obviously wrong?
Thanks
Currently the user has to click a link to view their topic, which is one click too many for liking.
I have this code:
code:<HR>Code:$to = "<script language=\"JavaScript\">" . "location.href='modules.php?op=modload&name=Forum&file=viewtopic&topic=$topic_id&forum=$forum';" . "</script>"; print "$to";
This code is inside newtopic.php.
The redirect doesn't work as I get this:
code:<HR>Code:Warning: Failed opening 'modules//.php' for inclusion (include_path='.:/usr/share/php') in /home/e-smith/files/primary/html/modules.php on line 40
Can anyone see anything that is obviously wrong?
Thanks