Hi
I am very new to PHP - actually, this is my second day at it, as I've only
recently started a new job last week. We're a charity.
I have a "No input file selected" problem. A Google search has shown me that
this is a common problem, but I have tried to follow all the various
instructions but none of them make any difference.
First of all... Some background on the page it links from.....
(I know about the broken gif at the bottom, but that's unimportant at the
moment).
When you click on Europe (I haven't written the PHP pages for the other
areas yet) it comes up with "no input file selected". Or it does my end
anyway. I am of course talking about
Which is very odd, as I've done everything right (I think).
FILE STRUCTURE:
In the root we have all the various PHP files: here is the file called
worldmap1.php
Sorry if the word wrapping makes it really hard to read
<?php
/*
$Id: privacy.php,v 1.21 2003/02/13 04:23:23 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
Copyright (c) 2003 osCommerce
Released under the GNU General Public
License
*/
require('includ es/application_top .php');
require(DIR_WS_ LANGUAGES . $language . '/' . FILENAME_WORLDM AP1);
$breadcrumb->add(NAVBAR_TIT LE,
tep_href_link(F ILENAME_WORLDMA P1));
?>
<!doctype html public "-//W3C//DTD
HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta
http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;
?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo
(($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;
?>">
<link rel="stylesheet " type="text/css"
href="styleshee t.css">
</head>
<body marginwidth="0" marginheight="0 "
topmargin="0" bottommargin="0 " leftmargin="0" rightmargin="0" >
<!-- header
//-->
<?php require(DIR_WS_ INCLUDES . 'header.php'); ?>
<!-- header_eof
//-->
<!-- body //-->
<table border="0" width="100%" cellspacing="3"
cellpadding="3" >
<tr>
<td width="<?php echo BOX_WIDTH; ?>"
valign="top"><t able border="0" width="<?php echo BOX_WIDTH; ?>"
cellspacing="0" cellpadding="2" >
<!-- left_navigation //-->
<?php
require(DIR_WS_ INCLUDES . 'column_left.ph p'); ?>
<!-- left_navigation _eof
//-->
</table></td>
<!-- body_text //-->
<td width="100%"
valign="top"><t able border="0" width="100%" cellspacing="0"
cellpadding="0" >
<tr>
<td><table border="0" width="100%"
cellspacing="0" cellpadding="0" >
<tr>
<td
class="pageHead ing"><br><?php echo HEADING_TITLE; ?></td>
<td></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separa tor('pixel_tran s.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><br><tabl e border="0" width="100%"
cellspacing="0" cellpadding="2" >
<tr>
<td
class="main"><? php echo TEXT_INFORMATIO N; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right"
class="main"><b r><?php echo '<a href="' . tep_href_link(F ILENAME_DEFAULT ) .
'">' . tep_image_butto n('ContinueArro wDots.gif', IMAGE_BUTTON_CO NTINUE) .
'</a>'; ?></td>
</tr>
</table></td>
<!-- body_text_eof //-->
<td>
<!-- right nav insertable here //-->
</td>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php
require(DIR_WS_ INCLUDES . 'footer.php'); ?>
<!-- footer_eof
//-->
<br>
</body>
</html>
<?php require(DIR_WS_ INCLUDES .
'application_bo ttom.php'); ?>
Oh, the includes/application_top .php is just the banner, and yes, I do
define
define('FILENAM E_WORLDMAP1', 'worldmap1.php' );
Along with all the other definitions.
NOW for the meaty bit. The PHP file proper is saved, again with all the
other PHP files, in includes/languages/english/worldmap1.php
This is the contents of the file. Which I've gone through with a toothcomb.
<?php
/*
$Id: privacy.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $
osCommerce, Open Source E-Commerce Solutions
Copyright (c) 2002 osCommerce
Released under the GNU General Public
License
*/
define('NAVBAR_ TITLE', 'WORLDMAP1');
define('HEADING _TITLE',
'<font color="#FF9933" >Guilt Trips</font>');
define('TEXT_IN FORMATION', '
<table width="90%" border="0" cellpadding="5" height="339">
<tr>
<td width="20%">&nb sp;</td>
<td width="51%">
<p><font size="7" face="Verdana, Arial, Helvetica, sans-serif"><b>Guilt
Trips!</b></font><font size="4" face="Verdana, Arial, Helvetica,
sans-serif"><b> <br>
</b></font><font size="4"
face="Verdana, Arial, Helvetica, sans-serif"><b>How many trees will your
journey consume?<br>
</b></font></p>
</td>
<td width="11%">&nb sp;</td>
</tr>
<tr>
<td width="20%"
valign="middle" >
<div align="right">
<p></p>
</div>
</td>
<HR>
<td width="51%"
valign="top">
<HR>
<p><font size="2"
face="Verdana, Arial, Helvetica, sans-serif">I need to plant....</font></p>
<BR>
<IMG SRC="images/tree.gif" ALT="beech tree"
height="195" width="158"><BR >
<h1><b>One
Tree!</b></h1>
<p><font size="2" face="Verdana, Arial,
Helvetica, sans-serif">to counterbalance my destructive carbon-emitting
trip.</font></p>
<p><font size="2" face="Verdana, Arial,
Helvetica, sans-serif">However, remember that the figures are <i>for one
person travelling</i>. If there are five of you travelling in your party,
multiply the figure by five!</font></p>
<div
align="right">
<hr>
<p><font
size="-2"> </font></p>
</div>
</td>
<td width="11%">&nb sp;</td>
</tr>
<tr>
<td
width="20%">&nb sp;</td>
<td width="51%" valign="middle" >
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Some
immediate ways to make a difference...</b></font></p>
<ul>
<li><font size="1" face="Verdana, Arial,
Helvetica, sans-serif"><b>Plant trees</b> to counterbalance my destructive
carbon-emitting trip</font>
<li><font size="1"
face="Verdana, Arial, Helvetica, sans-serif"><b>Plant </b> <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=197" target="_blank" >mango</a> trees in India, <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=118" target="_blank" >fruit trees</a> in Africa and <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=100" target="_blank" >beech</a> trees in UK woodland</font>
<li><font size="1" face="Verdana, Arial, Helvetica,
sans-serif"><b>Prese rve</b> an <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=73" target="_blank" >acre of rainforest</a></font>
</ul>
<p><font size="1" face="Verdana, Arial, Helvetica,
sans-serif">For these and other similar gifts, see the <i><a
href="http://www.goodgifts.o rg/" target="_blank" >Good Gifts
Catalogue</a></i>. </font></p>
<p><font size="1"
face="Verdana, Arial, Helvetica, sans-serif">Other ways of making a
difference could include:</font></p>
<ul>
<li><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Payin g
</b>for a holiday for a poor family</font>
<li><font
size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Provi ding </b>21
meals for school children in Africa (the equivalent number of meals on my
week\'s holiday)</font>
</ul>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">We spend an
absolute fortune on holidays every year, travelling in a world where people
are starving to death all around us. Imagine how much better the world would
be if everyone donated just 1% of his or her holiday\'s expense to make the
planet a better place. Start assuaging your guilt now!</font></p>
</td>
<td width="11%">&nb sp;</td>
</tr>
<hr>
<p><font size="-2"> </font></p>
</div></td>
<td width="11%">&nb sp;</td>
</tr>
<tr>
<td
width="20%">&nb sp;</td>
<td width="51%" valign="middle" ><a
href="guilttrip s.php">Back to map</a></td>
<td width="11%">&nb sp;</td>
</tr>
</table>
');
?>
Again, apologies about the dreadful wrapping - it doesn't look as bad as
that in Go!Live but when I copy and paste it into Entourage it looks awful.
As I said, this is only my second day using PHP and only my fifth day using
a Mac, but I think you can see I'm a pretty fast learner. :-) (I've been
typing in raw HTML on PCs most of my web authoring life ;-))) )
In case any of you want to see roughly what the original HTML file that I
wrote last week looks like, before copying the relevant table into the PHP
file, it is
ml
Now, as you will hopefully see, I have defined the filenames, I have
remembered to add the backslashes before the apostrophes, and I just can't
seem to find out why the thing won't work. Apologies if this seems so very
basic and newbie - I'm trying to get to grips with what is for me still a
very new way of writing code... But I HAVE tried to find the answer out on
various newsgroups, and reading old posts in Google, to try and avoid
wasting your time unnecessarily so.
As I said, we're a Charity so any help is very much appreciated!! Thanks
again!
Tristán White
I am very new to PHP - actually, this is my second day at it, as I've only
recently started a new job last week. We're a charity.
I have a "No input file selected" problem. A Google search has shown me that
this is a common problem, but I have tried to follow all the various
instructions but none of them make any difference.
First of all... Some background on the page it links from.....
(I know about the broken gif at the bottom, but that's unimportant at the
moment).
When you click on Europe (I haven't written the PHP pages for the other
areas yet) it comes up with "no input file selected". Or it does my end
anyway. I am of course talking about
Which is very odd, as I've done everything right (I think).
FILE STRUCTURE:
In the root we have all the various PHP files: here is the file called
worldmap1.php
Sorry if the word wrapping makes it really hard to read
<?php
/*
$Id: privacy.php,v 1.21 2003/02/13 04:23:23 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
Copyright (c) 2003 osCommerce
Released under the GNU General Public
License
*/
require('includ es/application_top .php');
require(DIR_WS_ LANGUAGES . $language . '/' . FILENAME_WORLDM AP1);
$breadcrumb->add(NAVBAR_TIT LE,
tep_href_link(F ILENAME_WORLDMA P1));
?>
<!doctype html public "-//W3C//DTD
HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta
http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;
?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo
(($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;
?>">
<link rel="stylesheet " type="text/css"
href="styleshee t.css">
</head>
<body marginwidth="0" marginheight="0 "
topmargin="0" bottommargin="0 " leftmargin="0" rightmargin="0" >
<!-- header
//-->
<?php require(DIR_WS_ INCLUDES . 'header.php'); ?>
<!-- header_eof
//-->
<!-- body //-->
<table border="0" width="100%" cellspacing="3"
cellpadding="3" >
<tr>
<td width="<?php echo BOX_WIDTH; ?>"
valign="top"><t able border="0" width="<?php echo BOX_WIDTH; ?>"
cellspacing="0" cellpadding="2" >
<!-- left_navigation //-->
<?php
require(DIR_WS_ INCLUDES . 'column_left.ph p'); ?>
<!-- left_navigation _eof
//-->
</table></td>
<!-- body_text //-->
<td width="100%"
valign="top"><t able border="0" width="100%" cellspacing="0"
cellpadding="0" >
<tr>
<td><table border="0" width="100%"
cellspacing="0" cellpadding="0" >
<tr>
<td
class="pageHead ing"><br><?php echo HEADING_TITLE; ?></td>
<td></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separa tor('pixel_tran s.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><br><tabl e border="0" width="100%"
cellspacing="0" cellpadding="2" >
<tr>
<td
class="main"><? php echo TEXT_INFORMATIO N; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right"
class="main"><b r><?php echo '<a href="' . tep_href_link(F ILENAME_DEFAULT ) .
'">' . tep_image_butto n('ContinueArro wDots.gif', IMAGE_BUTTON_CO NTINUE) .
'</a>'; ?></td>
</tr>
</table></td>
<!-- body_text_eof //-->
<td>
<!-- right nav insertable here //-->
</td>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php
require(DIR_WS_ INCLUDES . 'footer.php'); ?>
<!-- footer_eof
//-->
<br>
</body>
</html>
<?php require(DIR_WS_ INCLUDES .
'application_bo ttom.php'); ?>
Oh, the includes/application_top .php is just the banner, and yes, I do
define
define('FILENAM E_WORLDMAP1', 'worldmap1.php' );
Along with all the other definitions.
NOW for the meaty bit. The PHP file proper is saved, again with all the
other PHP files, in includes/languages/english/worldmap1.php
This is the contents of the file. Which I've gone through with a toothcomb.
<?php
/*
$Id: privacy.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $
osCommerce, Open Source E-Commerce Solutions
Copyright (c) 2002 osCommerce
Released under the GNU General Public
License
*/
define('NAVBAR_ TITLE', 'WORLDMAP1');
define('HEADING _TITLE',
'<font color="#FF9933" >Guilt Trips</font>');
define('TEXT_IN FORMATION', '
<table width="90%" border="0" cellpadding="5" height="339">
<tr>
<td width="20%">&nb sp;</td>
<td width="51%">
<p><font size="7" face="Verdana, Arial, Helvetica, sans-serif"><b>Guilt
Trips!</b></font><font size="4" face="Verdana, Arial, Helvetica,
sans-serif"><b> <br>
</b></font><font size="4"
face="Verdana, Arial, Helvetica, sans-serif"><b>How many trees will your
journey consume?<br>
</b></font></p>
</td>
<td width="11%">&nb sp;</td>
</tr>
<tr>
<td width="20%"
valign="middle" >
<div align="right">
<p></p>
</div>
</td>
<HR>
<td width="51%"
valign="top">
<HR>
<p><font size="2"
face="Verdana, Arial, Helvetica, sans-serif">I need to plant....</font></p>
<BR>
<IMG SRC="images/tree.gif" ALT="beech tree"
height="195" width="158"><BR >
<h1><b>One
Tree!</b></h1>
<p><font size="2" face="Verdana, Arial,
Helvetica, sans-serif">to counterbalance my destructive carbon-emitting
trip.</font></p>
<p><font size="2" face="Verdana, Arial,
Helvetica, sans-serif">However, remember that the figures are <i>for one
person travelling</i>. If there are five of you travelling in your party,
multiply the figure by five!</font></p>
<div
align="right">
<hr>
<p><font
size="-2"> </font></p>
</div>
</td>
<td width="11%">&nb sp;</td>
</tr>
<tr>
<td
width="20%">&nb sp;</td>
<td width="51%" valign="middle" >
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Some
immediate ways to make a difference...</b></font></p>
<ul>
<li><font size="1" face="Verdana, Arial,
Helvetica, sans-serif"><b>Plant trees</b> to counterbalance my destructive
carbon-emitting trip</font>
<li><font size="1"
face="Verdana, Arial, Helvetica, sans-serif"><b>Plant </b> <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=197" target="_blank" >mango</a> trees in India, <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=118" target="_blank" >fruit trees</a> in Africa and <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=100" target="_blank" >beech</a> trees in UK woodland</font>
<li><font size="1" face="Verdana, Arial, Helvetica,
sans-serif"><b>Prese rve</b> an <a
href="http://www.goodgifts.o rg/goodgifts/product_info.ph p?cPath=75&prod ucts_
id=73" target="_blank" >acre of rainforest</a></font>
</ul>
<p><font size="1" face="Verdana, Arial, Helvetica,
sans-serif">For these and other similar gifts, see the <i><a
href="http://www.goodgifts.o rg/" target="_blank" >Good Gifts
Catalogue</a></i>. </font></p>
<p><font size="1"
face="Verdana, Arial, Helvetica, sans-serif">Other ways of making a
difference could include:</font></p>
<ul>
<li><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Payin g
</b>for a holiday for a poor family</font>
<li><font
size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Provi ding </b>21
meals for school children in Africa (the equivalent number of meals on my
week\'s holiday)</font>
</ul>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">We spend an
absolute fortune on holidays every year, travelling in a world where people
are starving to death all around us. Imagine how much better the world would
be if everyone donated just 1% of his or her holiday\'s expense to make the
planet a better place. Start assuaging your guilt now!</font></p>
</td>
<td width="11%">&nb sp;</td>
</tr>
<hr>
<p><font size="-2"> </font></p>
</div></td>
<td width="11%">&nb sp;</td>
</tr>
<tr>
<td
width="20%">&nb sp;</td>
<td width="51%" valign="middle" ><a
href="guilttrip s.php">Back to map</a></td>
<td width="11%">&nb sp;</td>
</tr>
</table>
');
?>
Again, apologies about the dreadful wrapping - it doesn't look as bad as
that in Go!Live but when I copy and paste it into Entourage it looks awful.
As I said, this is only my second day using PHP and only my fifth day using
a Mac, but I think you can see I'm a pretty fast learner. :-) (I've been
typing in raw HTML on PCs most of my web authoring life ;-))) )
In case any of you want to see roughly what the original HTML file that I
wrote last week looks like, before copying the relevant table into the PHP
file, it is
ml
Now, as you will hopefully see, I have defined the filenames, I have
remembered to add the backslashes before the apostrophes, and I just can't
seem to find out why the thing won't work. Apologies if this seems so very
basic and newbie - I'm trying to get to grips with what is for me still a
very new way of writing code... But I HAVE tried to find the answer out on
various newsgroups, and reading old posts in Google, to try and avoid
wasting your time unnecessarily so.
As I said, we're a Charity so any help is very much appreciated!! Thanks
again!
Tristán White
Comment