Jump to content

bubbasheeko

Members
  • Posts

    166
  • Joined

  • Last visited

    Never

Everything posted by bubbasheeko

  1. Hey, Could you add some quotes here: $title = htmlspecialchars($row['name']); $bytes = $row['content'];
  2. LOL..omg I am getting tired that I did that. Thanks Thorpe!
  3. No that is the right spot. You want to make sure you are getting the right information from the db.
  4. That's what I thought, I just hadn't bothered to look it up. Change these: session_register("username"); session_register("password"); session_register("admin_id"); to $_SESSION = $_POST['username']; $_SESSION = $_POST['password']; $_SESSION = $_POST['admin_id'];
  5. Just take out everything in the content variable. You can just type in plain text. It will still be sent as an html email, but even people who receive text emails will be able to view it with no troubles.
  6. I found this in my favorites...I think this is what I used to fix my issue. It's from the time I had worked on the site in question. http://www.wellho.net/solutions/php-example-php-form-image-upload-store-in-mysql-database-retreive.html
  7. Wait a sec...still looking for the solution...but I think I may have remembered it. What is the data type of the field in the table you are storing this image to? Blob? Longblob?
  8. You said Apache crashes....what is the error on screen?
  9. Oh it's not vague...my memory is Yes, I did resolve it. I am trying to find the site I did it on now.
  10. This is what I use every once and a while. It works. Obviously sub what you need sub'd. $strFrom="example@example.com"; $strTo = $_POST['department_email']; $strSubject= $_POST['subject']; $strContent='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Example</title> <link href="http://www.example.com/css/email.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="outer_container"> <div class="title"></div> <div class="main_container"> <div class="content"> <div class="main_header_top"></div> <div class="main_header_middle"> <div class="main_header_middle_text">' . $_POST['subject'] . '</div> </div> <div class="main_header_bottom"></div> <div class="main_content"> <div class="main_inner_content">' . $_POST['message'] . '</div> </div> <div class="main_footer"></div> </div> </div> </div> </body> </html>'; if(mail($strTo,$strSubject,$strContent,"From:$strFrom\r\nReply-to: $strFrom\r\nContent-type: text/html; charset=us-ascii")) { if($_GET['option'] == "2") { $sendmail_message = 'Your message was sent successfully. Thank you for taking the time to contact us.'; } else { $sendmail_message = 'Your message was sent successfully.'; } } else { $sendmail_message = 'There was an error processing your message.'; }
  11. Do you see what you expect here: http://www.kdmp.ca/bullet-test.php
  12. session_start(); should be the first thing after <?php.
  13. Just make sure you have the same PHP version...MySQL..or anything else that you may have running on the Windows server. Ubuntu makes it pretty easy to install the server and get the needed components. Once they are installed you should be able to access your apache server via FTP. But its been about a year since I set up Apache on Ubuntu.
  14. See that would be interesting....grabbing PHP from Facebook without having direct access to the files on their server. *SLAP* wait...php is executed on the server...before it gets to my browser....it was a wonderful dream.
  15. Pretty much. Here is the true question of the hour. When the code has been modified enough, when does it stop being yours?
  16. This is vague, I have come across this once and do you think I can remember what is causing it... Maybe the headers have already been sent on this page. Call the image from a new php file.
  17. Your html is fine, it is contact.php that has the issue. So you can ignore it for now. Focus on checking the variables in the contact.php and see where it stops.
  18. No message at all? hmmm Try printing the variables from contact.php to screen...add an echo $variable . "<br>" after each variable. See where it fails that way. You are using an array, my mail script doesn't use them. That is the only subtle difference that I see from your code to my own.
  19. Back at it I see...I never did find anything else that could help I really tried.
  20. Strange, you must be using Firefox 2.x... it works in Firefox 3...that's what I am using.
  21. On the login page. Add just below "<?php" session_start(); I would register your sessions with $_SESSION = $fieldname;
  22. Hey, I like session is registered, but you could also simply use isset to check the $_SESSION. I straightened up the code a bit too. <?php include_once('include/include.php'); if(isset($_SESSION['admin_id'])) // YOU NEED THE SESSION IN ORDER TO PROCEED. { if($_GET[p] == ""){ $content .= "<a href='admin.php?p=upload_image'>Upload Photos</a><br>"; } else { if(file_exists($_GET[p].'.php')) { include($_GET[p].'.php'); } } } else { $content .= "You Must Be Logged In To Do That."; include('admin_layout.php'); } Now the code that sets the $_SESSION. Could you pass that on to the forum?
  23. Skimming quickly, what you have looks okay. Have you tried it? Received any errors?
  24. NOW() does not work on MSSQL. Substitute NOW() with GETDATE() in the above provided example.
×
×
  • 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.