Ok, well this is kinda complicated, but hopefully i can explain it right...

I have a page called "edit.php". Inside edit.php it'll have a submit button which will go to "page.php?id=edit.php?function=preview". Inside page.php, they'll be this coding...

PHP Code:
<?php
$data 
'data.html';
if(
$id == "edit.php?function=preview") { $data "$id"; }
?>

...

<?php include ("$data"); ?>
So, if id equals "edit.php?function=preview", then whatever will show up in edit.php when you do ?function=preview should be what's in edit.php....

PHP Code:
if ($function == "preview")
{
    
$i=0;
    while (
$i <= count($template))
    {
        
$cn "newcontent"."$i";
        
$newcontent[$i]  = $_POST["$cn"];
        
$i++;        
    }
    
    
$i=0;
    
$string=$mid.$table1.$newurl[$i].$table2.$newname[$i].$table3.$newcontent[$i].$table4;
    
$i++;

    while (
$i count($template))
    {
        
$stringy $mid.$table1.$newurl[$i].$table2.$newname[$i].$table3.$newcontent[$i].$table4;
        
$string $string $stringy
        
$i++;
    }

    print 
"$string";
    exit();

which will be placed before all the coding. Now, i've done where the form action is to another page, and page.php includes it sucessfully, but i'm trying to cut down on the amount of pages, so i tried query strings. The error i get is this...


Warning: main(edit.php?function=preview): failed to open stream: No such file or directory in /home/virtual/site95/fst/var/www/html/cms/page.php on line 99

Warning: main(): Failed opening 'edit.php?function=preview' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site95/fst/var/www/html/cms/page.php on line 99
The error is pointing to the line that has "<?php include ("$data"); ?> ". I'm really not sure what's up, can someone help?