$_GET Not working with include virtual. PHP
How can I make GET requests to work if my website is built on includes?
for example in index.html I rely on <!--#include virtual="/includes/columns/col-2.shtml" -->
to show the content.
And in col-2.shtml
I got this simple script <?php $success = $_GET['success']; if($success == 1) { echo "User created!"; }?>
So when I browse to http://www.mysite.com/index.html?success=1 It do开发者_如何学JAVAesn't display my echo. And yes .shtml is set to parse php in .htaccess.
Any ideas?
You seem to be mixing your technologies here!!!
Rename index.html to index.php (or index.shtml), and change your include to be
<?php
include('/includes/columns/col-2.shtml');
?>
Includes don't naturally send GET/POST info... You can try this:
<?
$_POST[username]="123456";
include("login.php");
?>
精彩评论