Jump to content

Include while passing a variable not working


freakus_maximus

Recommended Posts

Any reason why this include would not work?

I am trying to include this in the real page it needs to be represent on. Obviously from the error, the proper, valid url is created and passed, but it will not open.

All my other navigation options work fine, so I know it's not my case statements. If I open the edit.php manually with the defectnum value passed, that works fine too.

I just need it now to work inside my index.php file...

[code]case "ddrnedit":
   $param = $_GET['defectnum'];
   $activate = ('"http://localhost/releasenotes/edit.php?defectnum='. $param .'"');    
  break;  
[/code]

The error is:
[code]Warning: main("http://localhost/releasenotes/edit.php?defectnum=30608") [function.main]: failed to open stream: Invalid argument in C:\ITPUB KBASE\htdocs\itpublishing\index.php on line 246
[/code]

Line 246 is just an include() which works fine with all other 'cases':
[code]<TR>
<TD width="180" vAlign="top"><?php include ('../includes/dashnav.php')?></TD>
<TD vAlign="top"><?php include ($activate);?></TD>
</TR>
[/code]
Hehe...should have checked the ' and "" after the $param.

This works now.

[code]case "ddrnedit":
   $param = $_GET['defectnum'];
   $activate = ('http://localhost/releasenotes/edit.php?defectnum='. $param);     
  break;  
[/code]

Any mods on that want to go ahead and close this feel free.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.