Click to See Complete Forum and Search --> : Edit index.php to accept variable?


fdamuth
10-05-2006, 08:45 AM
Hey everybody--

Noob question (know enough to really cause damage)!

I'm trying to hack together Zencart and use Wordpress as my main page, in the middle column. The following typed into the address bar works:

http://mydomain.com/store/index.php?main_page=wordpress

What do I need to look for and edit / add in the index.php file so visitors who type http://mydomain.com/store automatically hit my wordpress blog.

I understand that in the first address above, wordpress is being passed as a variable? But I can't figure out where to make it "fixed" in the index.php file.

Any thoughts?
Thanks in advance
Fred the noob

Brooksie155
10-05-2006, 09:02 AM
You could set it by default:
$main_page = "wordpress";
-Or-
$_REQUEST['main_page'] = "wordpress"

safest way would probably be to put this at the top of yout page:

if (!isset($-REQUEST['main_page'])) {
$_REQUEST['main_page'] = "wordpress";
}