Jump to content

_Chris

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by _Chris

  1. //make connection with mysql and select the database $mysql_connect = mysql_connect($host, $mysql_user, $mysql_password) ; if(!$mysql_connect) {echo ("<P>Connection issues. No results displayed.</P>");} $db_select = mysql_select_db($mysql_db); if(!$db_select) {echo ("<P>Connection issues. No results displayed.</P>");} $subject = "Subject Text"; $body = "Body text; $event_date = '2015-01-31'; //Y-m-d FORMAT but I would also like to put into the email at the beginning: Hi first_name, (with the comma and then a couple of line spaces within the $body) In the mysql the first name is listed as first_name, so I would want the email to automatically insert the recipients first name at the beginning, at the top of the email. How do you do that please? Dez.
  2. Many thanks Andy, did that and it works a treat!
  3. I have been working on this: <?php date_default_timezone_set('GMT'); #echo date("l, \\t\h\e jS of F, Y"); echo date('l, \\t\h\e dS \of F, Y', strtotime('-2 weekdays')); ?> But, it comes out as : Wednesday, the 05th of December, 2012 Is there any way of the 0 in the 05th being omitted please? Any help appreciated. Chris
  4. Been on this for a while, and really getting stuck. Anyone know how to add more class names for tables to the code below please? For example, for other tables with the class names of timetable and table-six please?? try { $html = file_get_html($input); $tables = $html->find('table[class=table-one]'); foreach( $tables as $table) { Any help appreciated. Chris
  5. Thanks Sarah, each of the 2 files has html for 10 images, so, 10 images in file_one and ten in file_two - and I fully understand about the files being chosen in a random way, but is there any way that the images within those files, being shown in a random order as well?
  6. Thanks waterssaz, I notice the rand in there, is that to ensure that the images within the php files get randomized please? If so, that's great. Also, would the php files chnage on on each user refresh / page load ?
  7. Is there some way of a php include which is visible on every page (footer), itself having two php includes, but only one of which would be visible, then on the user refreshing the page or on visiting another page on the site, that include would be replaced with another php include? Preferably done without any js. Any help appreciated. Chris
  8. Ok, I promise to go a tad more slowly if I can
  9. Would be good to do it all from the one click on form page really.
  10. Could that be an automated process ?
  11. Aaaah, ok, maybe there isn't a foolproof way to find out if their domain name actually exists - is there ?
  12. I suppose you can check the return value of dns_get_record. If it doesn't return any records then the domain name must be invalid. Thanks - is that a foolproof method ?
  13. Thanks Daniel - is that easy to do ? How do you do that please ?
  14. Would you (or anyone else), add anything else to that list at all ? Just wondering if I missed anything ?
  15. Many thanks Daniel, would that do more than I mentioned above ?
  16. Very true, in fact, I would imagine quite a few people do that - I've been doing it myself for many years. Any other ideas ? Also, how do these look to you : Make sure there's an @ and it is not at the end or beginning of the email Make sure there's at least one dot and it is not at the end or beginning of the email. Make sure there's one dot after the @ but not right next to it Make sure that there are at least two characters after the last 'dot' Make sure that there's no commas anywhere Make sure that there's only one @ sign Make sure that only the characters 0123456789abcdefghijklmnopqrstuvwxyz@.-_ are used (should others be allowed, like !£$%*&+?) Any others that could be added ?
  17. Many thanks to you both for that, for this post - I understood No 1, but can you expand a little on the others at all please ?
  18. I should imagine others here have experienced it. The user completes your form, and they unintentionally input their email address incorrectly. Then when you reply to their form, you then get the mailer daemon returning your email ! Now, there's a couple of ways that some websites try to solve this problem - some ask the user to input their email address twice, some show the forms results on the next page, so that the user has a last chance to check, before completing the submission. Two things - firstly, are there any other ways of trying to ensure that, as much as possible, that the user inputs the correct email address ? Secondly, what have you found works really well for you please ? Any help much appreciated. Chris
  19. Many thanks for all the help - problem solved, this is obviously a very helpful forum here
  20. Many thanks for the quick help on this - it's really appreciated. I'm now using the code below, and is giving the correct format, but are you saying that it would it give me 02 Apr on the 2nd of April, and not 2 Apr ? <?php $table8 .= "\n".'<td class="styles1"><div class="day">'.substr(date('l',strtotime($dates[1][$i].' '.date('Y'))), 0, 3).'</div><div class="date">'.substr($datestr, 0, 6).'</div>'.str_replace('<span>Two</span>','',str_replace('Three.','Four',$Six[0][$i])).'</td>'; ?>
  21. Many thanks for the quick help Chigley - that did the trick for shortening the days, but it's now changed the dates from, for example, 18 April to just 18 ? Chris.
  22. Crikey, I was told that you lot were not only helpful but very quick as well - looks as though it was the total truth How would you change the code below to reflect the amendments please : $table8 .= "\n".'<td class="styles1"><div class="day">'.date('l',strtotime($dates[1][$i].' '.date('Y'))).'</div><div class="date">'.$datestr.'</div>'.str_replace('<span>Two</span>','',str_replace('Three.','Four',$Six[0][$i])).'</td>'; Chris.
  23. Hi all, Was recommended here as you're all a very helpful lot Basically, the code below, gets information from another page, but in the string for the day, it's coming in as the full name and for the date string, it's coming in as the full name for the month - with str_replace how do you get all days of the week and all months of the year, to change to the first 3 letters please ? ie, Monday changes to Mon, Tuesday to Tue, April changes to Apr, October changes to Oct? $table8 .= "\n".'<td class="styles1"><div class="day">'.date('l',strtotime($dates[1][$i].' '.date('Y'))).'</div><div class="date">'.$datestr.'</div>'.str_replace('<span>Two</span>','',str_replace('Three.','Four',$Six[0][$i])).'</td>'; Any help much appreciated. Chris.
×
×
  • 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.