Jump to content

Illustrator76

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

1,279 profile views

Illustrator76's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I got it all sorted out guys. It was a combination of my headers being a bit off and some weird Outlook 2016 (desktop version) setting that I had to change in Microsoft WORD. Gotta love Microsoft for putting a setting that affects your email in a word document program.
  2. I am assuming that they should, yes. Every other email that I get from every other source seems to come through just fine. I even just tried sending it in Rich Text and it did the same thing, so I assuming it has to be something wrong with this script.
  3. I am having trouble getting the email script code below to display correctly in all email clients. On my Outlook desktop client, it displays exactly how I want it to. The problem however is that on my mobile phone email client as well as my iPad Outlook email, the HTML elements in the code are showing up in the body of the email. So it is literally showing <p style='font=.....etc...> instead of styling the text like it is supposed to. Does anyone know how to fix this? Please note I am a novice at PHP and I simply found this code and tweaked it/added the HTML styling to fit what I needed. Any help given would be much appreciated. Thanks! $headers .= "From: $email\r\n"; $headers .= "Content-Type: text/html; charset=us-ascii\r\n"; $message = "<p style='font: 12px Arial, Helvetica, Sans-serif; color: #000;'>$name ($email), has contacted you through your site regarding $contact_me_selection.<br><br>\r\n <span style='font: 12px Arial, Helvetica, Sans-serif; font-weight: bold; color: #242424;'>Message:</span><br>\r\n<br>\r\n <span style='font: 12px Arial, Helvetica, Sans-serif; color: #000;'>$contact_me_text</span></p>\r\n"; $subject = "$name, Is Contacting You About $contact_me_selection"; function isInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } }
  4. Hi, I am looking for an experienced PHP developer to modify an existing script. Hopefully it won't take too long or be too complicated. I am willing to pay for your services and I need this script completed fairly soon. Please PM me and I can email you all of the details. Thanks.
  5. Yeah, I may just have to leave the links as relative. I can't hard code any part of the links because of the where and how I am displaying them, and as we both agree, running PHP from my database is a bad idea. I have my code structured a certain way for a reason, and since it took me quite a while to make things like I have, I don't want to go messing with it just to get absolute links. Thanks again for your help!
  6. Thanks. The problem is that the code you wrote would have to go directly in my database table, and that doesn't work because the HTML literally displays the code and doesn't run the function, because the PHP echo command won't work if it's stored in a database. The only way I understand to get PHP working in a database is to use something called eval(), and I have universally heard that using PHP in a database is a bad idea, so I want to stay away from that. So basically this is the exact code that is in my database: <a href="/folder/painting1.php">, <a href="/folder/painting-name.php">, etc... the "a" tag, the href, basically that entire line of code is in my database. If I had it set up where this part was hard coded in to my HTML: <a href=""> then I could put what you suggested in there, but with that entire "a" tag being in the database, that code doesn't work.
  7. Thanks. As you suggested I have removed the absolute links and made them relative links/file paths. I am still a bit confused (still learning) as to how your function/method works. I copied and pasted that into my PHP code, but my links are still relative links/file paths. Is that function supposed to automatically recognize the file paths and change them into absolute links? I am just a bit unsure on how the code is supposed to work. Thanks.
  8. Yes, I code them as absolute links. I probably didn't explain it correctly. This is data that is hard coded into certain tables in my database by me. I am using this for my portfolio, so I have links to all of my portfolio images hard coded into my database that will display on certain pages. So inside of my database "paintings" table for example I have <a href="http://developmentsiteaddress.com/folder/painting1.php"> and I'd like to have developmentsiteaddress.com somehow be a "variable" inside of my MySQL database that when I transfer all of the files over to my live server I can change the "variable" of developmentsiteaddress.com to be www.mysite.com instead.
  9. I apologize if my title is confusing, my problem is fairly simple but hard to explain for the title. I now have my development server all set up and running locally for testing, design, etc... Everything is working perfectly fine, but I have one problem that I do not know how to solve. I have hyperlinks in my database that will be displayed in my HTML. I personally prefer using absolute rather than relative links, so this going to cause a problem when moving my database content over from my development server to the live server. From everything that I understand, using PHP in a database is a huge no-no, so I am searching for another solution to my problem. Basically, I want to be able to have links that look like: <some variable>/folder/content.php which on my development site would output: http://developmentsiteaddress.com/folder/content.php, but once I moved my database over to my live site I can change the text/value of <some variable> and it would output: http://www.mysite.com/folder/content.php. If it comes down to it and there is no other choice than to use relative links in order for things to sync properly, then I guess I will have to deal with it, but I really prefer to use absolute links. Any help given with this would be great.
  10. Thanks a ton for your help! The code that I posted was literally copied and pasted straight from the Edit Directives field, and there were no vhost tags around that code either. I am doing everything from Webmin, so it seems like it didn't add the code somehow. I did decide to go with your easier option of just using a port rather than editing a local host file, and I still couldn't get it to work. After doing a bit more digging around I found that there was a file located in: /etc/apache2/ports.conf that I had to go in and force Apache to listen for the port I was looking to use. After doing that, my site now appears as it should. I really appreciate all of your help. It's rare that I ever get help from Admins on forums, so I definitely appreciate you taking the time to assist me.
  11. I am about 95% finished with setting up a local development server for my website, but I keep running into one issue. I will give as many details as I can so that everyone knows exactly what my problem is. I am using Turnkey LAMP in a VM on my local home NAS/server, I have everything set up and running properly, and I can reach the admin console for my VM by going to: 192.168.1.400. I am able create folders for my websites inside of the LAMP VM and I can see my development site by navigating to 192.168.1.400/sitename.com. The issue that I am running into is that I am using PHP includes on my dev site, but when I try to use the $_SERVER['DOCUMENT_ROOT'] command I keep getting errors because the default directory for the VM/website is /var/www instead of /var/www/sitename.com where all of my files are. My problem is that I have used Webmin to set up a Virtual Host for my website with a default directory of /var/www/sitename.com, but I continue to get errors because my site is still looking for a default directory of /var/www. How do I make the "connection" between my development site and the Virtual Host with the correct default directory/document root? What am I doing wrong here? I have posted the Directives for my created Virtual Host below. Any help given would be great! DocumentRoot /var/www/sitename.com ServerName sitename.com <Directory "/var/www/sitename.com"> allow from all Options IncludesNOEXEC +Indexes </Directory>
×
×
  • 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.