Jump to content

darkfreaks

Members
  • Posts

    4,953
  • Joined

  • Last visited

Everything posted by darkfreaks

  1. Kate: did you escape your array variable with curly braces inside your HEREDOC? it should have output just fine.
  2. if you do something like echo <<<EOL //code here EOL; you do not really have to put in dots or quotes to escape or concat. just do something like echo <<<EOL my system is $systems. {$systems[$rand_system][1]} EOL;
  3. can you post the full error code please also as Jesi just mentioned you are not concatenate your strings properly.
  4. In class.smtp.php search for the function Hello Replace: SendHello("EHLO", $host)) with SendHello("EHLO", "[" . $host . "]")) Replace: SendHello("HELO", $host)) with SendHello("HELO", "[" . $host . "]"))
  5. after researching you need to add mysql_fetch_array inside your select function. <?php function select($amount = "*", $table, $where = NULL, $order = NULL, $limit = NULL){ $query = "SELECT ".$amount." FROM ".$table; if($where !== NULL){ $query .= " WHERE ".$where; } if($order !== NULL){ $query .= " ORDER BY ".$order; } if($limit !== NULL){ $query .= " LIMIT ".$limit; } $result = mysql_query($query); $result_two =mysql_fetch_array($result); if($result_two!==FALSE){ return $result; }else{ return false; } } ?>
  6. print_r($newvar); what does it output?
  7. cleaned up the function abit not sure if it will help or not. <?php function select($amount = "*", $table, $where = NULL, $order = NULL, $limit = NULL){ $query = "SELECT ".$amount." FROM ".$table; if($where !== NULL){ $query .= " WHERE ".$where; } if($order !== NULL){ $query .= " ORDER BY ".$order; } if($limit !== NULL){ $query .= " LIMIT ".$limit; } $result = mysql_query($query); if($result!==FALSE){ return $result; }else{ return false; } } ?>
  8. is select a custom function can we see the code for that???
  9. have you tried the identical operator === if($fetch['pageType'] === 1 OR 4) { //***DO Stuff**// }else { echo 'no default pages found.'; }
  10. what happens when you do elseif($fetch['pageType'] == 2 OR 3) { echo "NO default page selected";}
  11. This will not work as stated sending images outputs X and Y cordinates if(isset($_POST['submit'])) { //** Do Stuff **// } however this will because it includes the X & Y cordinates in the submit. if(isset($_POST['submit_x') && isset($_POST['submit_y'])) { //**DO Stuff**// }
  12. remove the error supression @'s and make sure you are not getting any errors in your resize script.
  13. you have to make sure nothing else is being output before header() including php code. there are several other ways to achieve this using meta tags and javascript and a combination of both.
  14. edit: Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP
  15. instead of doing $this->$image = imagesy($this->$image); can you put it in a function like so??? (taken from simon jarvis simple image class) public function getWidth(){ return imagesx ($this->$image); } public function getHeight(){ return imagesy ($this->$image); } [color=#000000][b]function[/b][/color] resizeToHeight[color=#009900]([/color][color=#000088]$height[/color][color=#009900])[/color] [color=#009900]{[/color] [color=#000088]$ratio[/color] [color=#339933]=[/color] [color=#000088]$height[/color] [color=#339933]/[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getHeight[/color][color=#009900]([/color][color=#009900])[/color][color=#339933];[/color] [color=#000088]$width[/color] [color=#339933]=[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getWidth[/color][color=#009900]([/color][color=#009900])[/color] [color=#339933]*[/color] [color=#000088]$ratio[/color][color=#339933];[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]resize[/color][color=#009900]([/color][color=#000088]$width[/color][color=#339933],[/color][color=#000088]$height[/color][color=#009900])[/color][color=#339933];[/color] [color=#009900]}[/color] [color=#000000][b]function[/b][/color] resizeToWidth[color=#009900]([/color][color=#000088]$width[/color][color=#009900])[/color] [color=#009900]{[/color] [color=#000088]$ratio[/color] [color=#339933]=[/color] [color=#000088]$width[/color] [color=#339933]/[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getWidth[/color][color=#009900]([/color][color=#009900])[/color][color=#339933];[/color] [color=#000088]$height[/color] [color=#339933]=[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getheight[/color][color=#009900]([/color][color=#009900])[/color] [color=#339933]*[/color] [color=#000088]$ratio[/color][color=#339933];[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]resize[/color][color=#009900]([/color][color=#000088]$width[/color][color=#339933],[/color][color=#000088]$height[/color][color=#009900])[/color][color=#339933];[/color] [color=#009900]}[/color] [color=#000000][b]function[/b][/color] scale[color=#009900]([/color][color=#000088]$scale[/color][color=#009900])[/color] [color=#009900]{[/color] [color=#000088]$width[/color] [color=#339933]=[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getWidth[/color][color=#009900]([/color][color=#009900])[/color] [color=#339933]*[/color] [color=#000088]$scale[/color][color=#339933]/[/color][color=#cc66cc]100[/color][color=#339933];[/color] [color=#000088]$height[/color] [color=#339933]=[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getheight[/color][color=#009900]([/color][color=#009900])[/color] [color=#339933]*[/color] [color=#000088]$scale[/color][color=#339933]/[/color][color=#cc66cc]100[/color][color=#339933];[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]resize[/color][color=#009900]([/color][color=#000088]$width[/color][color=#339933],[/color][color=#000088]$height[/color][color=#009900])[/color][color=#339933];[/color] [color=#009900]}[/color] [color=#000000][b]function[/b][/color] resize[color=#009900]([/color][color=#000088]$width[/color][color=#339933],[/color][color=#000088]$height[/color][color=#009900])[/color] [color=#009900]{[/color] [color=#000088]$new_image[/color] [color=#339933]=[/color] [color=#990000]imagecreatetruecolor[/color][color=#009900]([/color][color=#000088]$width[/color][color=#339933],[/color] [color=#000088]$height[/color][color=#009900])[/color][color=#339933];[/color] [color=#990000]imagecopyresampled[/color][color=#009900]([/color][color=#000088]$new_image[/color][color=#339933],[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]image[/color][color=#339933],[/color] [color=#cc66cc]0[/color][color=#339933],[/color] [color=#cc66cc]0[/color][color=#339933],[/color] [color=#cc66cc]0[/color][color=#339933],[/color] [color=#cc66cc]0[/color][color=#339933],[/color] [color=#000088]$width[/color][color=#339933],[/color] [color=#000088]$height[/color][color=#339933],[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getWidth[/color][color=#009900]([/color][color=#009900])[/color][color=#339933],[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]getHeight[/color][color=#009900]([/color][color=#009900])[/color][color=#009900])[/color][color=#339933];[/color] [color=#000088]$this[/color][color=#339933]->[/color][color=#004000]image[/color] [color=#339933]=[/color] [color=#000088]$new_image[/color][color=#339933];[/color] [color=#009900]}[/color]
  16. i would not consider 800 a week high volume traffic more like Normal. i would probably switch to mysql_connect until you hit a good 10,000+ visitors a day/week/month.
  17. here is your answer @ OP Mysql_pconnect will also open a new connection when a PHP page is called up (at any rate, it will the first time after a server reboot), but it will NOT close the connection at the end of the request - instead, it will save it in a connection pool so that a subsequent request can continue to use the same connection. It's intended for pages that do have a heavy usage - where the resources burn up by opening and closing connections every time might have a severe effect on performance. If your local supermarket had a door that was opened each time someone went in and out, there would be a lot of needless opening and closing going on - better to leave it open and let a whole lot of people in and out at the same time. Mysql_connect opens a new connection each time a PHP page is called up, and closes the connection down again at the end of the request. It's ideal for pages that don't have a heavy usage - doesn't need tuning, is straightforward internally. If you compare MySQL to a shop, this is the connection that you would use for a small shop where the door is opened each time a new customer wishes to enter.
  18. mysql_real_escape_string() needs a database connection identifier link to work if no database connection is called it is not going to work.
  19. i don't see the output but it looks like his works fine. it does combine both array properly.
  20. why do you have combine twice? do it his way first tell us what it outputs then do it my way tell us what it outputs. not both.
  21. if you don't want it to rewrite the array data you can do something like $combine = $player+$count; $result= implode($combine);
  22. http://php.net/array_combine
  23. adding isset() to make sure values are set. <?php $name= isset($_POST['name']) ? $_POST['name'] : ''; $subject = isset($_POST['subject']) ? $_POST['subject'] : ''; $email = isset($_POST['email']) ? $_POST['email'] : ''; $message = isset($_POST['message']) ? $_POST['message'] : ''; $to = "[email protected]"; headers = "From: \"".$name."\" <".$email.">\n"; $headers .= "Return-Path: <".$email.">\n"; mail($to,$subject,$message,$headers) or die("Something went wrong, please go back and try again."); echo "Thank you for contacting me."; ?> if there is nothing in the value that value will just send blank. if it is not sending at all as mentioned output each variable with print_r and tell us what the output is.
  24. @Jessica it is a dreamweaver effect using javascript and css. http://www.communitymx.com/content/source/CDC72/
  25. Added reply-to & FROM headers if you still are wanting to use Mail over a more advanced class like PHPMailer. <?php $name = $_POST['name']; $subject = $_POST['subject']; $email = $_POST['email']; $message = $_POST['message']; $to = "[email protected]"; headers = "From: \"".$name."\" <".$email.">\n"; $headers .= "Return-Path: <".$email.">\n"; mail($to,$subject,$message,$headers) or die("Something went wrong, please go back and try again."); echo "Thank you for contacting me."; ?>
×
×
  • 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.