Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Sorry, i don't understand the problem. Can you try to explain it more? What do you get, what do you want to get? Is the problem the SQL selecting the wrong things or you can't display them right?
  2. by running nl2br on it before exploding, you have a line that isn't needed...why convert it to something else, to just explode it on that?
  3. The way I have heard people do this is to set a cookie using JS, then have PHP check if the cookie is set. Of course, since JS runs after PHP, you need to run the JS page, then go to a new page which has the PHP check. This is considered EVIL by google's robots and they will get mad at you. The best thing to do is make sure your site works no matter what. So you make everything work without JS, then use JS to add other spiffy stuff. What are you trying to do? http://mootools.net is a good js library with ajax.
  4. Under Windows Binaries The installer is probably best for you, and I think the zip is a zipped copy of the installer. Try the zip first. If it doesn't contain the installer, get the installer.
  5. I wonder if it's a session setting that is making it insert that there...cause that's weird. I've never seen anything like it. What are your settings for the session handling? ie, session.use_only_cookies, etc?
  6. Instead of running the nl2br, just do this: <?php $lines = explode("\n", $recipe['preperation']); foreach($lines AS $num=>$line){ print $num.' '.$line.'<br/>'; } ?>
  7. I don't think this is related to the PHP code...can you show a link to the live page?
  8. I think you'll have to use regular expressions for this.
  9. Yeah I'm not pissed off I just think if you don't see what the problem is there, you're attempting stuff that is above your erm...learning curve right now. Like, grab a book or two on PHP. Or even any programming language.
  10. Dude the code was working fine, all you had to do was add back your line for the header('Location: ') and instead you stuck it somewhere in the middle of the mail command.
  11. you'll need to use ORDER BY in your SQL
  12. Well you know how to get out the unique IPs, and you know how to get the total, why don't you try doing BOTH.
  13. You want to set it to 1, I think. It's a boolean, 0 or 1.
  14. If you specify the column name before values, it doesn't matter what order they are in.
  15. <?php $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?> Change the email address and message to what you want, but don't change the mail() line.
  16. I would only use it if you needed to use a different version. Or, if you use PHP to set the content type as the correct type, and not text/html to prevent IE6- from freaking out.
  17. <?php $query = "SELECT DISTINCT count(adverts_user_ip) AS numIPs FROM adverts"; $result = mysql_query($query); $row = mysql_fetch_array($result); echo "Unique IP :$row['numIPs']<br>"; ?>
  18. The actual mail() command does not have that header. Follow example: Example 1115. Sending mail with extra headers. and just change the values, not what is being sent in mail().
  19. Maybe this will help: http://en.wikipedia.org/wiki/XHTML XML Declaration A character encoding may be specified at the beginning of an XHTML document in the XML declaration when the document is served using the application/xhtml+xml MIME type. (If an XML document lacks encoding specification, an XML parser assumes that the encoding is UTF-8 or UTF-16, unless the encoding has already been determined by a higher protocol.) For example: <?xml version="1.0" encoding="UTF-8"?> The declaration may be optionally omitted because it declares as its encoding the default encoding. However, if the document instead makes use of XML 1.1 or another character encoding, a declaration is necessary. Internet Explorer prior to version 7 enters quirks mode if it encounters an XML declaration in a document served as text/html.
  20. I never have that line on my xhtml pages and they validate perfectly. I don't see why you'd have an xml version on a page like that, but I don't use XML often. XHTML is like an extension of XML, but it's not the same thing.
  21. Do a quick google on XML and XHTML. Unless I've gone temporarily insane, they are two different things, and you're using one wrong.
×
×
  • 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.