Jump to content

MSUK1

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by MSUK1

  1. in the text editor those charecters are not even their :/ as shown above the scripts starts <?php and ends ?>
  2. its strange because this happened AFTER i uploaded it all again.. it never happened, then i re-uploaded the site and it happened again :/
  3. in the hard code this text  is not anywhere to be seen. HOWEVER. the final result prints this text before every php include.. the site is www.matt-cardle.co.uk ive noticed it only does it on pages after the landing page.. so www.matt-cardle.co.uk DOESNT SHOW but www.matt-cardle.co.uk/Home [and any other page] DOES SHOW the unclude i am using is like this for all page: "<?php include '../includes/ads2.php'; ?>" and text before and after this for example is..: <table style="width: 55%; height: 84px;" cellspacing="0" cellpadding="0" align="right"> <tr> <td style="height: 23px" class="style9"><?php include '../includes/ads2.php'; ?></td> </tr> </table>
  4. <? /*** Form.php** The Form class is meant to simplify the task of keeping* track of errors in user submitted forms and the form* field values that were entered correctly.** Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)* Last Updated: August 19, 2004*/class Form{ var $values = array(); //Holds submitted form field values var $errors = array(); //Holds submitted form error messages var $num_errors; //The number of errors in submitted form /* Class constructor */ function Form(){ /** * Get form value and error arrays, used when there * is an error with a user-submitted form. */ if(isset($_SESSION['value_array']) && isset($_SESSION['error_array'])){ $this->values = $_SESSION['value_array']; $this->errors = $_SESSION['error_array']; $this->num_errors = count($this->errors); unset($_SESSION['value_array']); unset($_SESSION['error_array']); } else{ $this->num_errors = 0; } } /** * setValue - Records the value typed into the given * form field by the user. */ function setValue($field, $value){ $this->values[$field] = $value; } /** * setError - Records new form error given the form * field name and the error message attached to it. */ function setError($field, $errmsg){ $this->errors[$field] = $errmsg; $this->num_errors = count($this->errors); } /** * value - Returns the value attached to the given * field, if none exists, the empty string is returned. */ function value($field){ if(array_key_exists($field,$this->values)){ return htmlspecialchars(stripslashes($this->values[$field])); }else{ return ""; } } /** * error - Returns the error message attached to the * given field, if none exists, the empty string is returned. */ function error($field){ if(array_key_exists($field,$this->errors)){ return "<font size=\"2\" color=\"#ff0000\">".$this->errors[$field]."</font>"; }else{ return ""; } } /* getErrorArray - Returns the array of error messages */ function getErrorArray(){ return $this->errors; }};?> thats the form element
  5. this code was working perfectly fine past few months. nothings changed and now i am getting this error: <table style="width: 100%" class="style17" background="../images/content.png"> <tr> <td class="style3" style="width: 266px"> <img alt="" src="../images/headers/VIPL.png" width="220" height="220" /></td> <td > <form action="../System/process.php" method="POST" style="height: 62px"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr><td><strong>Username:</strong></td><td><input class="txt" type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>" /></td><td><? echo $form->error("user"); ?></td></tr> <tr><td><strong>Password:</strong></td><td><input class="txt" type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>" /></td><td><? echo $form->error("pass"); ?></td></tr> <tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?> /> <font size="2">Remember me next time <input type="hidden" name="sublogin" value="1" /> <input type="submit" class="btn" value="Login" style="width: 70px; height: 40px" /></td></tr> <tr><td colspan="2" align="left"><br /><font size="2">[<a href="../System/forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr> <tr><td colspan="2" align="left"><br />Not registered? <a href="../Register/index.php"> Register Now!</a></td></tr> </table> [<a href="../System/help.php" onclick="window.open('../System/help.php','popup','width=480,height=230,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">Help</a>]</div> </form> </td> </tr> </table>
  6. if something was mis-configured then my other contact form would do the same. :/ its Linux based and all php / functions are configured in WHM / cPanel and is hard coded into the software.
  7. i am the hoster.. msuk-hosting.com so even then it shouldnt be configured to matt@mattsolomon.co.uk it should be matt@msuk-hostt...
  8. all emails are being sent to matt@mattsolomon.co.uk when that is not stated anywhere in the php.. <?php $Name = Trim(stripslashes($_POST['fullname'])); $EmailFrom = Trim(stripslashes($_POST['email'])); $EmailTo = "james@jd-creations.co.uk"; $Subject = Trim(stripslashes($_POST['subject'])); $answer = Trim(stripslashes($_POST['answer'])); $Comments = Trim(stripslashes($_POST['message'])); $Subject = "The Reason - Contact Us"; $Headers = 'From: james@jd-creations.co.uk' . "\r\n"; $Headers .= "Reply-To: $EmailFrom\r\n"; // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (Trim($answer)!=="20") $validationOK=false; if (Trim($Name)=="") $validationOK=false; if (Trim($Comments)=="") $validationOK=false; if (Trim($Subject)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/error2.php\">"; exit; } // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email: "; $Body .= $EmailFrom; $Body .= "\n"; $Body .= "Comments: "; $Body .= $Comments; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, $Headers); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/sent.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/error.php\">"; } ?>
  9. Thanks, emails are now sending! however, they are sending to and from the user.
  10. ok thankyou, what would you suggest to do to filter user input? and any idea on re-writing my mail funtion? [i am a noob] mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>") thankyou for your time
  11. that works well on my other site? It basically acts exactly the same as the EmailTo variable?
  12. Okay, below is my mailer for a contact form i created. On one site it works fine. I even have it sending to several addresses from the othersite. However this site it doesnt want to work. PHP5 and mail() function is active. <?php $Name = Trim(stripslashes($_POST['fullname'])); $EmailFrom = Trim(stripslashes($_POST['email'])); $EmailTo = "james@jd-creations.co.uk"; $Subject = Trim(stripslashes($_POST['subject'])); $answer = Trim(stripslashes($_POST['answer'])); $Comments = Trim(stripslashes($_POST['message'])); $Subject = "The Reason - Contact Us"; // validation $validationOK=true; if (Trim($EmailFrom)=="") $validationOK=false; if (Trim($answer)!=="20") $validationOK=false; if (Trim($Name)=="") $validationOK=false; if (Trim($Comments)=="") $validationOK=false; if (Trim($Subject)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/error2.php\">"; exit; } // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email: "; $Body .= $EmailFrom; $Body .= "\n"; $Body .= "Comments: "; $Body .= $Comments; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/sent.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=../contact/error.php\">"; } ?> now i know it is wroking because it takes me to the sent.php page. not error.php i think it worked once. now not at all.
×
×
  • 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.