Remove Commas in Titles for LightningMp3.com Upload

  • Thread starter Thread starter nzausrec
  • Start date Start date
It would be more simple to write instructions on upload something like: "Please write with alphabet letters and include no ' , / ~ type punctuation."

In a way yes, it's simpler, but it's not generally good practice to let your end users do your error handling for you.
 
How do I insert a "sendmail"?
Well, I mis-typed; I should have said "mail", not "sendmail" (there's that faulty log-term memory I was talking about again :P.)

Here's the syntax for mail:

mail($m_to, $m_subject, $m_message, "FROM: $m_SenderAddress") or $mail_failed="true";

where
$m_to = the e-mail address you want to send the message to;
$m_subject = Whatever subject title you want to give the e-mail message
$m_message = whatever text message you want to send (e.g. "After the replace: Original: ".$file_name." Corrected:".$corrected_file_name)

'FROM: $m_SenderAddress" = this is optional in your case, since there is no actual sender address (it's just your server sending it.) But I figured I'd include the "FROM:" syntax in case you want/need it at another time.

Note that $m_to, $m_subject, $m_message and $m_SenderAddress are just my own variable names and are just standard variables. they are not special PHP keywords. You can use whatever variable names and values you may already have in your code.
The server alone cost's me almost $400 a year. :(
Bandwidth's a bitch, isn't it? :(
Well, all the code is in that folder, except for the "includes" folder I think it's called. The code is broken up into a few different files, all of them in the public_html folder.
Hmmm...I'm not sure off the top of my head whether errors in code that exists in an include file will post in the error log on the include folder or in the parent file's folder. I *think* it's in the parent file folder, but you might want to take a look at the error log file (if there is one) in the "includes" folder.

I know what you mean about the shallow pockets. I'm glad to help out here if I can. Let's try this mail notification thing and see if that code is actually running and what it's doing if it is. From there, we'll see what the next step should be.

G.
 
Here is exactly what I inserted -

mail($m_to = "spam@nlrstudio.com", $m_subject = "test", $m_message = "blah, blah, blah", "FROM: $m_SenderAddress") or $mail_failed="true";

I got no email. :(
 
Here is exactly what I inserted -

mail($m_to = "spam@nlrstudio.com", $m_subject = "test", $m_message = "blah, blah, blah", "FROM: $m_SenderAddress") or $mail_failed="true";

I got no email. :(
I'm not sure about that syntax of assigning the variable values on the spot within the mail function. It's kind of unorthodox.

Well, if it's bad syntax, you'll have an error in your error log file in that folder. In such a case, just put the values directly in quotes and skip the variables:

mail("spam@nlrstudio.com", "test", "blah, blah, blah", "FROM: $angelina@jolie.com") or $mail_failed="true";

If you're not getting an error log entry, then I'd say that file (or at least that PHP code) is not being executed at all.

If so, are you sure your looking at the right file? (Sorry, but I HAVE TO ask that at this point. :o)

If so, make sure the file has a .php file extension on it and that the code is wrapped at least somewhere inside the <body> tags the file with a "<?php" / "?>" wrapper tag pair. For example:

<html>

<head>
<title>NL5's page</title>
</head>

<body>

<?php

code code
PHP CODE
blah blah blah
etc etc etc

?>

code code
etc etc etc

</body>

</html>


Or, if you really want to make this easier, PM me if you want to arrange my being able to look at the code one way or another for that file and your include file(s), so I can see first-hand what's going on. That would be a lot faster and easier than walking you through step-by-step with me pretty much blind at this end. It is kinda off topic for the forum at this point, too.

G.
 
Back
Top