Jump to content

denno020

Members
  • Posts

    761
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by denno020

  1. if (!isset($_GET['category']) || !isset($_GET['type']) || !isset($_GET['colour'])) Change to the above and it will work. You had &&, which meant the first condition had to be true AND then second condition AND the third condition, which wouldn't work if, as you say, the colour isn't selected. Using the above it says, if condition 1 is true OR condition 2 is true OR condition 3 is true (or any combination of them). '||' means or. Denno
  2. Does that link I posted help? I don't have any experience with the strict doctype, but that's what I found from a quick google search, and it seems good... Denno
  3. I have just had some fun with PayPal's IPN myself. You use the IPN script to check if the payment is a success (if it is complete). So you use an if statement similar to: if($payment_status == "Completed"){//do the database insertion stuff here} You add further else if for payment status of failed, and all the other possible ones. From there, I can't see how a line of code wouldn't execute. You just need to make sure you test your script thoroughly using the PayPal IPN simulator in the PayPal developer section. If that is always right, then there is no reason why it would fail in real world applications... Denno
  4. I think you want to open links in a new window?? This is a link to a forum post which I think might help you: http://csscreator.com/node/28915 Denno
  5. it's really really really really easy lol: <body onLoad="window.print()"> That function doesn't need to be defined anywhere, I think it's like a stock standard function for browsers. When the page loads, it will print the page (which means bring up the print dialog and wait for confirmation. Denno
  6. You've got a funcion definition inside another function. Fair sure you can't do this. You've got function entre() defined inside function normaliza(). Define it somewhere else (outside of all other functions) and just make a call inside normalia().
  7. You can use javascript to pop up the printer dialog, but then you would have to manually press print to confirm.. Other than that I'm not sure. Denno
  8. Is that function supposed to receive 3 parameters like that? Denno
  9. I reckon you've got your quotes messed up.. Look at them carefully and make sure you're opening and closing them correctly. Denno
  10. which is line 22? Denno
  11. Good work buddy, that's exactly what I needed. Cheers Denno
  12. Ok so I've drawn up a really quick mock up. You'll see in the picture that there are two tables. Each with a title, and an author. One title is longer than the other, hence the wider table cell needed. The author is printed directly after the title, no matter how long or short it is. I have tried to put a div around just the title, but that makes the author print on the next line. Same if I apply a heading tag to the title, the author will be printed on the next line. If there are any other work arounds, without using tables or divs or anything, just using CSS tricks, then I'm open to all of that too. Thanks Denno [attachment deleted by admin]
  13. No sorry, I gave three seperate examples. They won't be in the same table themselves, they're just three examples of how titles will display. Basically, I want the author name to be directly after the title, but seeing as though each title could be different lengths, I need the table cell's width to be dynamic (and to be as small as possible without making the content wrap around onto a new line). I'll draw a mockup in fireworks right now to show what I mean if that still doesn't clear it up. Denno
  14. This seems like it would be fairly simple, but for the life of me I can't work it out. What I want to do is have table cells that are only as wide as the content within them. The content will be all different sizes, so I can't have just one set width. What I want to achieve is for like a blogging system: Title|Author Longer Title|Author Very Much Longer Title|Author So the author will be tacked from onto the end of the title. I can't put them on the same line as they will have different styling, so I need them to be separated somehow. Anyone have any ideas? I don't have to use tables. If I can do it with div's, then please let me know. Cheers Denno
  15. Why don't you just use a script to check the browser that is being used to load your page in an if/else statement, and then have the appropriate code for each. watch this video on info as to how you can check which browser is being used. It should be quite easy, as Chrome and Safari both have 'Safari' in it's HTTP_USER_AGENT information, so check for that in your if condition. That way you can have any HTML5 audio player you want, and have the code for it in the if, otherwise you will show the flash audio player that is in the else part. Hope that helps Denno
  16. I'm not sure mate, sorry. The only thing I would be doing it googling it for you, which defeats the point. You should just keep searching for how to input variables into filenames, and if you still come up empty, at least you might have more of an idea of what does and doesn't work... Denno
  17. You can pull the time from the server and save it into a variable. Investigate if you can then put that variable into the file name, similar to an echo. Denno
  18. Remove the semi-colon's after each of my lines too. They're terminating the assignment of $message too early. Replace with the full stop or whatever the correct syntax is. Denno
  19. Nevermind, I copied it into Dreamweaver and fixed the problem: if($_POST){ $to = $_POST['First_and_Last_Name']; $subject = "WHAT SHOULD THIS BE"; $message = "Date: $date\n\r"; echo "Dear "; echo $array["First_Name"]; echo " "; echo $array["Last_Name"]; "" .$_POST['comment']. "\n\r". "Sincerely,\n". "From: " .$_POST['from']. "\n". "Street: " .$_POST['street']. "\n". "City: " .$_POST['city']. "\n". "Zip: " .$_POST['zip']. "\n". "Email: " .$_POST['email']. "\n". $headers = "From: " .$_POST['from']. "<".$_POST['email'].">"."\n"; mail($to, $subject, $message, $headers); // SUCCESS! echo '<p class="notice">'. 'Thank you for your submission. '. '</p>'; // clear out the variables for good-housekeeping unset($date,$bill,$name,$street,$city,$zip,$email); $_POST = array(); } I got my quotes wrong , sorry lol. Denno
  20. Can you post that code again with the number 31 written at the start of line 31 please. Denno
  21. http://php.net/manual/en/function.rename.php Can you also make use of the tags when posting code. Makes it much easier to read. Denno
  22. That's not something you can control. That depends on the recipients email settings. The best thing you could do is make sure the subject line is something professional, and not suss like 'Win and iPod', for example. Also, make sure your from data looks legit. Other than that, there is nothing you could do. It is up to the recipient to make it 'Not Junk'. Denno
  23. Did you try testing by just echoing one part of the name? To build ur Dear part do this: echo "Dear "; echo "$array["First_Name"]; echo " "; //space echo "$array["Last_Name"]; that should work... Try it and let me know. Denno
  24. You can export your excel spreadsheet as a CSV file, and then use PHP to parse through it, grabbing what it wants, and ignoring what it doesn't. Don't ask me how to do that, I just know that it can be done lol. Other than that, I'm not sure there is much else that can be done. Denno
  25. What are the errors you are getting? Which lines do they appear on? Can you show the code inside the if/else statement code blocks too.. Denno
×
×
  • 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.