include doesn't work..
Posted: Mon Dec 01, 2003 1:26 pm
Hello all,
I have a select drop down, and a value is passed.
based on that value, I do a php include $value.html.
It doesn't work, any idea why?
PHP:
--------------------------------------------------------------------------------
<form name="dwnld" action="./inst.php" method="POST">
<select name="brandSelect" onChange="submit()">
<option selected>Select a brand ----------</option>
<option value="1">1™</option>
<option value="2">2option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</form>
<?php include('./folder/$brandSelect.html') ?>
--------------------------------------------------------------------------------
The include doesn't work, yes I am doing a $_POST, but still, it doesn't get included.
The include is on the same page as the form, it's a postback.
File paths are all fine
yes, 1.html, 2.html are the pages to include
I tried this: <?php if(isset($brandSelect)) include 'folder/' . $brandSelect . '.html' ; ?> Still doesn't work!
Any idea why?
Thanks
I have a select drop down, and a value is passed.
based on that value, I do a php include $value.html.
It doesn't work, any idea why?
PHP:
--------------------------------------------------------------------------------
<form name="dwnld" action="./inst.php" method="POST">
<select name="brandSelect" onChange="submit()">
<option selected>Select a brand ----------</option>
<option value="1">1™</option>
<option value="2">2option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</form>
<?php include('./folder/$brandSelect.html') ?>
--------------------------------------------------------------------------------
The include doesn't work, yes I am doing a $_POST, but still, it doesn't get included.
The include is on the same page as the form, it's a postback.
File paths are all fine
yes, 1.html, 2.html are the pages to include
I tried this: <?php if(isset($brandSelect)) include 'folder/' . $brandSelect . '.html' ; ?> Still doesn't work!
Any idea why?
Thanks