file include not working PLZ help
Posted: Thu Mar 27, 2008 2:16 am
i am creating a website and there is a page for uploading images...
i wrote a small piece of php code to upload the file to a specific predefined directory & a small form to provide the interface
i wrote both these in a single page:
*****************************************************************
<?php
.... code...
?>
<form name="newad" method="post" enctype="multipart/form-data" action="">
<table>
<tr><td><input type="file" name="image"></td></tr>
<tr><td><input name="Submit" type="submit" value="Upload image"></td></tr>
</table>
</form>
*****************************************************************
this worked perfectly fine.
then i kept the php code in a separate file to be included later as i require it in multiple pages.
I included it in one page where i needed it:
*******************************************************************
<html>
..
..
<?php
require_once("filename.php");
?>
<form name="newad" method="post" enctype="multipart/form-data" action="">
<table>
<tr><td><input type="file" name="image"></td></tr>
<tr><td><input name="Submit" type="submit" value="Upload image"></td></tr>
</table>
</form>
..
..
..
</html>
*******************************************************************
(this file is with the extenssion .php)
bt now i cant click on the submit button on this page!
plz help me
thanking in advance.
i wrote a small piece of php code to upload the file to a specific predefined directory & a small form to provide the interface
i wrote both these in a single page:
*****************************************************************
<?php
.... code...
?>
<form name="newad" method="post" enctype="multipart/form-data" action="">
<table>
<tr><td><input type="file" name="image"></td></tr>
<tr><td><input name="Submit" type="submit" value="Upload image"></td></tr>
</table>
</form>
*****************************************************************
this worked perfectly fine.
then i kept the php code in a separate file to be included later as i require it in multiple pages.
I included it in one page where i needed it:
*******************************************************************
<html>
..
..
<?php
require_once("filename.php");
?>
<form name="newad" method="post" enctype="multipart/form-data" action="">
<table>
<tr><td><input type="file" name="image"></td></tr>
<tr><td><input name="Submit" type="submit" value="Upload image"></td></tr>
</table>
</form>
..
..
..
</html>
*******************************************************************
(this file is with the extenssion .php)
bt now i cant click on the submit button on this page!
plz help me
thanking in advance.