View Single Post
Old 02-18-2010, 12:00 PM   #7 (permalink)
Tim Dobson
The Contributor
 
Tim Dobson's Avatar
 
Join Date: Feb 2010
Posts: 69
Thanks: 16
Tim Dobson is on a distinguished road
Default

I think im probably going a bit to far with the E mail validation. This is no kind of registration to the site it is just basicaly so i know who uploaded the file. I think from what i have read the best way is to skip the validation? there is no need to send them an e mail for them to confirm anything to be honest. So now how would i get the email they put in the form to be contained in the e mail that is sent to me? obviously this would be in the e mail script.

On upload.shtml i have the following.
PHP Code:
<form action="Scripts/upload.php" method="post" enctype="multipart/form-data">
   <
p>
      <
label for="file">Select a file:</label> <input type="file" name="userfile" id="file"> <br />
      <
button>Upload File</button>
   <
p>
</
form
so now i have added a new form under the location one.
PHP Code:
         <label for="addemail">enter E-mail:</label><input type="text" name="email" id="addemail" /><BR /> 

and in upload php the e mail script is
PHP Code:
$to "e mail@hotmail.com";
$subject "New template!";
$filename str_replace(" ""%20"$filename);
$body 'New template has been uploaded! ' $urlloc $filename '';
$headers "From: email.com\r\n" .
    
"X-Mailer: php";
if (
mail($to$subject$body$headers)) {
  echo(
"<p>A notification has been sent to the site and your template will be added ASAP!</p>");
 } else {
  echo(
"<p>Message delivery failed...</p>");
 } 
What do i need to put in here? and do i need anything else in upload.shtml? Thanks for the help most appriciated
Tim Dobson is offline  
Reply With Quote