Jump to content

Recommended Posts

Hello.  There is a page here:  https://www.discoveryfirm.com/upload/index.php  The customer logs in and then is able to upload his/her files to us.  We get the files but after they click the upload/send button they should be taken to this page:  https://www.discoveryfirm.com/upload/end.php but instead they get this:  Warning: mb_send_mail() [function.mb-send-mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in C:\xampp\htdocs\download\receive.php on line 239

 

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\download\receive.php:239) in C:\xampp\htdocs\download\receive.php on line 241

 

We get the uploaded files from the customer so that is OK, but the customer thinks they get an error when they dont because the end.php page does not show.  Here is my code:

 

 

<?php
include"../cms/db.php";

db();

if($_POST[user] && $_POST[password])
{

  $USER = htmlspecialchars($_POST[user]);
  $USER = mysql_escape_string($USER);
  
  $PASS = htmlspecialchars($_POST[password]);
  $PASS = mysql_escape_string($PASS);

  
  $SQL = "SELECT * FROM Account WHERE FolderName='$USER' AND Password='$PASS'";
  $RST = mysql_query($SQL);
  $DATA= mysql_fetch_assoc($RST);
  
  if(!$DATA[FolderName]){   header('Location:index.php?error=1');  }
  
}
else
{
    header('Location:index.php?error=2');
}


?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS" />
<title>ディスカバリーファーム FTPアップローダー</title>
<link href="ftp.css" rel="stylesheet" type="text/css" />
</head>

<body>


<img src="images/file_upload.gif" alt="ファイルのアップロード" width="436" height="28" border="0" class="title" />
<div class="catchcopy">「参照」ボタンをクリックし、ファイルをアップロードしてください。
<?php

if($_REQUEST[error]){ print "<br /><br /><font color=\"red\">ファイルを送信できませんでした。</font>";}

//<td width="300"><input name="file1" type="file" class="txtfeed1" value="" /></td>
?>	
</div>

<form action="http://221.255.244.20/download/receive.php" method="post" enctype="multipart/form-data">


<!--<table border="0" cellpadding="0" cellspacing="0" class="logintable">
<tr>
<td width="600">-->

<table border="0" cellpadding="0" cellspacing="0" class="logintable">
<tr align="left"><td width="600"><div class="login">
<input name="file1" type="file" value="" size="60" />
</div></td>
</tr>
</table>
<!--</td>
</tr>
</table>-->

<br />

<table border="0" cellpadding="0" cellspacing="0" class="logintable">
<tr>
<td width="600"><div class="login">
<div class="comment">コメント欄(注意事項・質問など)</div>
<textarea name="conmment" rows="5" class="txtfeed2"></textarea>
</div></td>
</tr>
</table>


<div class="catchcopy">よろしければ、「送信」ボタンを押し、データをアップロードしてください。<br />
(ファイル容量が200MB以上の場合、送信できない場合があります。)
</div>
<input type="image" src="images/submit.gif" alt="送信" width="140" height="24" border="0" class="icon" />

<?php 

if($DATA[MakeDay] == "0000-00-00 00:00:00")
{
   print "<input type=\"hidden\" name=\"folder\" value=\"$DATA[FolderName]\">\n"; 
   print "<input type=\"hidden\" name=\"staff_folder\" value=\"1\">\n"; 
}
else
{
   print "<input type=\"hidden\" name=\"folder\" value=\"$DATA[FolderName]\">\n"; 
}

?>

<input type="hidden" name="mail" value="<?php print $DATA[staffMail]; ?>" >
</form>
</body>
</html>

 

 

Link to comment
https://forums.phpfreaks.com/topic/203410-please-help-my-form-is-all-screwed-up/
Share on other sites

You have output on line 239 of receive.php. You cannot output anything prior to using the header() function.

 

I dont get it.  If I change the form action to "end.php" then it goes to the correct confirmation page, but it doesnt upload the files.  If I leave it how it is it uploads the files but I get an error page and not the "end.php" page.

You don't need to change the form action.

The problem is at

Warning: mb_send_mail() [function.mb-send-mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in C:\xampp\htdocs\download\receive.php on line 239

Which would mean that somehow your mailing failed and it output the error text.

when you have fixed this, you wouldn't get the below message, but redirected to then end.php page

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\download\receive.php:239) in C:\xampp\htdocs\download\receive.php on line 241

 

You don't need to change the form action.

The problem is at

Warning: mb_send_mail() [function.mb-send-mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in C:\xampp\htdocs\download\receive.php on line 239

Which would mean that somehow your mailing failed and it output the error text.

when you have fixed this, you wouldn't get the below message, but redirected to then end.php page

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\download\receive.php:239) in C:\xampp\htdocs\download\receive.php on line 241

 

Could someone be willing to go on Skype with me and I will show my screen?  It might be better if you see what I am seeing?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.