Jump to content

Mzor

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Mzor's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh, basically the link just doesn't work. It turns up as plain text... the html tags don't show, so obviously it recognizes it is HTML, but there is simply no link, whereas there is a link when using Gmail.
  2. Hey guys! Been a long time since I've posted here but I am back for help because I'm encountering a problem that's kind of baffling me. I'm programming a web game, and one of the things that happens is that an email gets sent out when it's your turn in one of your games. This is working fine and all but I can not for the life of me figure out how to send email with html in it that is universally accepted. What I've been doing so far works for gmail, hotmail, etc. but for some reason breaks entirely when someone opens an email with a client like Thunderbird or Outlook. Here's what I've been doing: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: Admin <admin@examplesite.com>' . "\r\n"; $mail_body = '<html><body>It is now your turn in the game. The game can be viewed <a href="examplesite.com">here</a>.</body></html>'; mail("user@examplesite.com",'New Turn',$mail_body,$headers); Is there something I'm missing? I have literally no experience using Outlook or the like so I don't know if it's a problem with them or if I'm doing something wrong.
  3. The link in that XML file leads to an XML file with an error message for me - would it be possible to paste the part of the file you're trying to get at? That'd make things easier as I don't know the structure of the XML file right now.
  4. No, the issue here is that I'm doing a comparison. if($data1->name == $data2->name){ //blah blah blah } I should have elaborated on that, but the issue can be shown like this: if($data1->name == "BC"){ //this returns true and this code is executed } if($data2->name == "BC"){ //this ALSO returns true and this code is executed } if($data1->name == $data2->name){ //this code does not happen because even though both pieces of data were shown to be "BC", for some reason the comparison comes out false } I have no idea why it's doing this, but it is...
  5. This is something I've never run into before and am having issues with: I have two different simplexml objects that I have data in. I have two pieces of data from them, both of which are: "BC". That's all. I've used strlen to check their length. Now, when I go: $data1->name == "BC" it comes out as true. When I go: $data2->name == "BC" it comes out as true. When I go: $data1->name == $data2->name it comes out false. Whaaat? I simply don't understand why it's doing this. the strings have the same lengths, they both equal the same thing however they don't equal each other? I'm guessing it's because they're from different structures, that's all I can think of... Note that those were examples of the structures I use but it's the same thing.
  6. Never mind, I figured out the problem wasn't that the values after the question mark. The problem was simply that the server was giving me a version of the XML which had a stylesheet applied to it, messing it up. So I changed the user_agent to latest version of Firefox which (somehow) gets the raw XML. Sorry to be of bother.
  7. I'm not 100% sure what the 'id=1' part in a URL such as 'index.php?id=1' is called, but nonetheless, I'm having some problems. What I need to do is to load up some XML. The file path might be something like, '.xml?id=1', but when I try to load up the file either using fopen() or simplexml_load_file(), it loads the file as if it were simply the path without everything after the question mark. I need a way around this, so that I can load data from a file dynamically. Thanks!
  8. This is frustrating me... I'll let this piece of code do the explaning ofr me: <?php $test = array ('one', 'two'); $test['one'] = 1; $test['two'] = 2; function oneAndTwo(){ echo $test['one'] . '<br />'; echo $test['two']; } oneAndTwo(); ?> This returns the error: Now, when I echo the variable $test['one'] outside of the function, it works just fine. hy is it not working when I echo it using a function?
  9. Okay... thanks, that makes more sense, lol.
  10. So, this is something I've been wondering about, and worrying about. Most of my PHP documents will have something like: <?php include ('./include/header.php'); //Content goes here include ('./include/footer.php'); ?> Not something we haven't all seen before, but often my 'header.php' file contains PHP tags itself. Say the header consisted of this: //Html stuff and CSS rules here <?php if(isset($_SESSION['username'])){ echo 'Hello, ' . $_SESSION['username']; } ?> Then, logically, the file should end up like this, when the header file was included: <?php //Html stuff and CSS rules here <?php if(isset($_SESSION['username'])){ echo 'Hello, ' . $_SESSION['username']; } ?> //Content goes here include ('./include/footer.php'); ?> Not only, then, would the HTML and CSS be inside the PHP, tags, there would be PHP tags inside the PHP tags, meaning that the 'include ('./include/footer.php');' should be ignored... yet it always works for me... Can someone explain so I don't end up making mistakes with this later which I'll nver be able to figure out?
  11. I see how having a database queue would work, but for this it has to be at exactly the right time. I'll ask my hosting about cron jobs, but could I have more information on them, such as how you can set up a cron job from a PHP script. Thanks.
  12. Here's where it is a bit tricky. At the moment I am running my own server, hosted locally on a windows platform, but once I have everything working I will switch to hosting it on a hosting service. The Apache version for my hostin says "Apache ver. 2.2.10 (Unix)", so I'm unsure of what this means.
  13. I need a way to automatically call a PHP script after a certain period of time. What I'm going to use this for is a bit complicated, so I can't give my exact situation. I'll use an example instead. Say I wanted to have an email sent to a user 10 minutes after they submit a form. I need some way to delay that email from being sent, even if the user navigates away from the page. How would I go about doing this in a way so that no human has to automatically call the script? Thanks.
×
×
  • 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.