all know Frihost server crashed a few weeks ago.... Now the prob is when after all recovery n stuff....... i had this php controlled html form on my website with name as Funny Email Page ...from where ppl cud send email frm any name and id to any name and id...basically anonymous emails...now when i use it gives the default error of empty fields in the form even though i fill emm....these variables are passsed to the php file....no database is used ... i dont knw why is this php script not working now... although it was workin fine previously.....WAT COULD BE THE PROBB
PHP Problem
Code, please.
Probably the names of the elements in the form are misnamed, or didn't you had to rewrite that page?
as i said earlier ... that it was working fine b4 the server crash down of frihost......but afterr that i dont know wats the problemm.. the code is fine ...trhe fields match......
The code isn't fine, otherwise it would work.
Just post the code here so we can check.
Just post the code here so we can check.
as you haven't displayed any code to fix I will guess at using this code.
| Code: |
|
<?php if($_POST['submit']) { //set variables $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; //mail sending code mail($to, $subject, $message); } ?> then just put the html form after this php code to include the following: a text box to enter the email its being sent to - name this to a text box to enter the subject - name this subject a multi-line text box for the message - name this message |
but i want an anonymous email script..and if attachment can be easily added i wud b really glad...
| bluffmango wrote: |
| but i want an anonymous email script..and if attachment can be easily added i wud b really glad... |
Look, just post the script.
We can't help otherwise, because we can't know where the error in the script is, if we don't know the script. Is it that hard to understand?
Maybe one guess, are you using register_globals? Maybe the setting changed during the request. So are you using $message instead of $_POST['message']?
