I wouldnt post anymore source code mate drop me a pm and i will talk with you tomorrow - if you have msn or aim give me that
Was just to test if you have any sort of extra code running due to htaccess file however that indicates not elbeer seems to be on it with one of those files being the case. post them all, and we should be able to get one to produce a parse error
Also, you could just try running each of those files individually. so http://www.yourdomain.com/database.php etc and see which gives the error, then post that code here
the database has a different error than anything Notice: Use of undefined constant local - assumed 'local' in /home/mysite.com/database.php on line 25 local is the name of the mysql database im trying to connect with Is that a bad idea? here's that snapshot of the code function MySQLDB(){ $this->connection = mysql_connect('localhost', 'user', 'pass') or die(mysql_error()); mysql_select_db(local, $this->connection) or die(mysql_error()); Code (markup): of course i replaced my host name user and pass so no one can know
I think you mean localhost. That shouldn't be causing the error however. Do any of the others have errors?
Also, your local or localhost should be enclosed with single or double quotes like so 'local' 'localhost' This will stop that error
ah it indeed cleared up that error, but im still getting that damn parse error on all my pages and no error on my database.php..
ok no error on database.php is good, it means its not that file at fault so its one of the others either mailer.php or form.php can you try both of those
mailer.php can't find any problems here <?php class Mailer { /** * sendWelcome - Sends a welcome message to the newly * registered user, also supplying the username and * password. */ function sendWelcome($user, $email, $pass, $userid){ $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">"; $subject = "mysite.com - Welcome!"; $body = $user.",\n\n" ."Welcome! You've just registered at mysite.com " ."with the following information:\n\n" ."Username: ".$user."\n" ."Password: ".$pass."\n\n" ."Before you can login you need to activate your\n" ."account by clicking on this link:\n\n" ."http://www.mysitename.com/valid.php?qs1=".$user."&qs2=".$userid."\n\n" ."If you ever lose or forget your password, a new " ."password will be generated for you and sent to this " ."email address, if you would like to change your " ."email address you can do so by going to the " ."My Account page after signing in.\n\n" ."- mysite.com"; return mail($email,$subject,$body,$from); } /** * sendConfirmation - Sends a confirmation to users * who click a "Send confirmation" button. This * only needs to be used if the EMAIL_WELCOME constant * is changed to true and the user's 'valid' field is 0 */ function sendConfirmation($user, $userid, $email){ $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">"; $subject = "mysite.com - Welcome!"; $body = $user.",\n\n" ."We're sorry for the inconvenience. We are making\n" ."our website more secure for both your and our \n" ."benefit.\n\n" ."To activate your account you can either click on the\n" ."following link or copy the link and paste it into your\n" ."address bar.\n\n" ."http://www.mysitename.com/valid.php?qs1=".$user."&qs2=".$userid."\n\n" ."We here at mysite.com hope you continue to\n" ."enjoy our wonderful service.\n\n" ."Sincerely,\n\n" ."- mysite.com"; return mail($email,$subject,$body,$from); } /** * sendNewPass - Sends the newly generated password * to the user's email address that was specified at * sign-up. */ function sendNewPass($user, $email, $pass){ $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">"; $subject = "mysite.com - Your new password"; $body = $user.",\n\n" ."We've generated a new password for you at your " ."request, you can use this new password with your " ."username to log in to mysite.com.\n\n" ."Username: ".$user."\n" ."New Password: ".$pass."\n\n" ."It is recommended that you change your password " ."to something that is easier to remember, which " ."can be done by going to the My Account page " ."after signing in.\n\n" ."- mysite.com"; return mail($email,$subject,$body,$from); } }; /* Initialize mailer object */ $mailer = new Mailer; ?> Code (markup): form.php same thing here <?php 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; } }; ?> Code (markup):
mysite.com/include/view_active.php The only thing it shows was the function if it errored. (I can post this code to if you want lol.) What I see when I go to view_active.php Error processing page how could it error? ugh
view_active.php <?php if(!defined('TBL_ACTIVE_USERS')) { die("Error processing page"); } $q = "SELECT username FROM ".TBL_ACTIVE_USERS ." ORDER BY timestamp DESC,username"; $result = $database->query($q); /* Error occurred, return given name by default */ $num_rows = mysql_numrows($result); if(!$result || ($num_rows < 0)){ echo "Error displaying info"; } else if($num_rows > 0){ /* Display active users, with link to their info */ echo "<table align=\"left\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n"; echo "<tr><td><font size=\"2\">\n"; for($i=0; $i<$num_rows; $i++){ $uname = mysql_result($result,$i,"username"); } echo "</font></td></tr></table><br>\n"; } ?> Code (markup):
Yeah. Did you get my PM? I have about 15 mins to spare if you want me to look at the files directly and work out what the problem is