This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > August 2004 > PHP - No input file specified.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author PHP - No input file specified.
Kramer

2004-08-07, 7:15 pm

Hello All,

I am starting a new thread here, the old one was getting very long.

Gary, I am still struggling getting a form to submit to an email address. A
couple of months from now I'll probably look back on this and wonder how I
could be so dense.

My hosting account was changed to CGI. Now when I try your examples, I keep
getting the error message "No input file specified."

First I tried the form I already had uploaded, then I tried starting over
again from scratch, and the same error message keeps occurring. I don't see
where I can specify the input file. Which file should be specified?

Gary's code is show below, I inserted my email address at the proper spot.

Thanks and Best Regards, Kramer

--- code starts here ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Contact Form</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
if ($_SERVER['REQUEST_METHOD'] != 'POST'){
$me = $_SERVER['PHP_SELF'];
print <<<TOEND
<form name="form1" method="post"
action="$me">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td>Name:</td>
<td><input type="text" name="Name"></td>
</tr>
<tr>
<td>Subject</td>
<td><input type="text" name="Subject"></td>
</tr>
<tr>
<td valign="top">Message:</td>
<td><textarea name="MsgBody"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Submit"
value="Send"></td>
</tr>
</table>
</form>
TOEND;
} else {
error_reporting(0);
$recipient = 'me@myaddress.com';
$subject = stripslashes($_POST['Subject']);
$from = stripslashes($_POST['Name']);
$msg = "Message from: $from\n\n".stripslashes($_POST['MsgBody']);
if (mail($recipient, $subject, $msg))
echo nl2br("<b>Message Sent:</b>
To: $recipient
Subject: $subject
Message:
$msg");
else
echo "Message failed to send";
}
?>
</body>
</html>
--- code ends here ---


Gary White

2004-08-07, 11:14 pm

Kramer wrote:

>My hosting account was changed to CGI. Now when I try your examples, I keep
>getting the error message "No input file specified."



That error means that the PHP parser cannot find a file that you've
asked it to process. I think you still have hosting issues.


Gary
Kramer

2004-08-07, 11:14 pm

> Kramer wrote:
>
keep[color=darkred]

Gary White wrote[color=darkred]
> That error means that the PHP parser cannot find a file that you've
> asked it to process. I think you still have hosting issues.


I finally got it figured out. When I switched over to cgi I didn't realize
it but was on a different server. All of my ftp data was pointing to an ip
address and not the domain name, and in switching I was uploading the files
to the old server, which is why the file couldn't be found.

Best Regards, Kramer


Gary White

2004-08-08, 4:14 am

"Kramer" <kramer@seinefeld.con> wrote in message
news:4FeRc.4969$114.2370@nwrddc02.gnilink.net...
>
> I finally got it figured out. When I switched over to cgi I didn't

realize
> it but was on a different server. All of my ftp data was pointing

to an ip
> address and not the domain name, and in switching I was uploading

the files
> to the old server, which is why the file couldn't be found.



Good luck.

Gary


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews