Jump to content

Dicko_md

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by Dicko_md

  1. Hi mac_gyver Thanks for that. I think I looked at it took long and missed the obvious. It works a treat now.
  2. $array = array("3", "6", "12", "18", "24"); $opt = ''; for ($i=0; $i<sizeof($array); $i++) $opt .= "<option value='$array[i]'> $array[i] </option>"; $html = " <form method='get' action='index.php?s=upgrade'> <input type='hidden' name='s' value='upgrade' /> <input type='hidden' name='memid' value='$_GET[memid]' /> <span class='formlabel'>Months:</span> <select name='nummonths'>$opt</select> <input type='submit' class='button' value=' Submit ' name='gopay'> <br /><br /> </form> "; The above code should show 3, 6, 12, 18, 24 in a drop down menu but it is only showing 5 blank spaces. Can anyone spot what I have done wrong ? If I put anyMonths in the $array between the options like below theMonths shows up on all 5 lines of the drop down $opt .= "<option value='$array[i]'> $array[i] Months </option>"; Thanks Martyn
  3. Does the date need to be in a particular format so that it gets recognised when opened in a email on a smart phone like an iPhone so I can add it straight to a calendar ? Thanks martyn
  4. So it's not just me who doesn't know..... That makes me feel better lol
  5. Thanks for the help yesterday. One of the reasons I changed my email from text to HTML in the hope that the dates created in my emails would become active so that people could add the events to their calendar on their smart phones. Still they are just like text. In my php I've pulled them together in the format below d/m/Y H.s I've also changed the . to : in hope of this been the reason but it wasn't and I've also tried the long format 7th June 2013 10.00 Is there a particular format that they need to be in? Thanks martyn
  6. Thanks guys. Ive sat down and played around with the code and got it working. The line that was in fact wrong was the $subject line. Thanks again for your help today Martyn
  7. I ran the file as you said and it errored out saying Parse error: syntax error, unexpected ':' in /home/******/public_html/cron.php on line 60 line 60 of the cron.php is looking at a file with the command include('elements.php'); ive looked at the file and there are loads of : characters in the elements file mostly for web addresses. Does it mean the error is in elements or this a red herring and could it be further down the original cron file? Thanks Martyn
  8. Will do. Didn't know the @ sign did that. As its a cron job running. Where will it show errors? Thanks Martyn
  9. @mail($info['email'], "$info[subject] (Update: $formdate)", "Event Date : ".$formdate."\n".$comment, GetConfig('msgheaders')); The above code creates the email when the cron job is run and creates a basic email. Im trying to make it look better in the email but also make the event date active so that smart phones can add it to a event on their calendar. I have tried the code below from googling but the email does not run at all now. $to = $info['email']; $subject = $info[subject] (Event Date: $formdate); $headers = "From: XXXXX.com <DoNotReply@XXXXXX.com>\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $message = '<html><body>'; $message .= '<img src="http://www.xxxxxx.com/images/logo.png" alt="Logo" />'; $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">'; $message .= "<tr style='background: #eee;'><td><strong>Event Date:</strong> </td><td>" .$formdate. "</td></tr>"; $message .= "<tr><td><strong>Message:</strong> </td><td>" .$comment. "</td></tr>"; $message .= "<tr><td><strong>Type of Change:</strong> </td><td>" . strip_tags($_POST['typeOfChange']) . "</td></tr>"; $message .= "</table>"; $message .= "</body></html>"; @mail($to, $subject, $message, $headers); Thanks in advance Martyn
  10. The reason asked as I've already tried adding the mime tags and HTML tags in but it just prints them in the email. No HTML. I googled that web page before I'd even posted on here.
  11. I've already searched google, hence why I asked on here
  12. $comment .= $addcomment."\n".GetConfig('defaultmsg'); @mail($info['email'], "$info[subject] (Update: $formdate)", "Event Date : ".$formdate."\n".$comment, GetConfig('msgheaders')); The above code is in my cron job and pulls data together to create an email. The email arrives and the subject is filled in with data from $info{subject} but the content of the email is just Email Subject : test message (Update: 03/06/2013 17.15)‏ Email Content Event Date : 03/06/2013 17.15 test message Is there anyway to change this into a HTML email ? Thanks in advance
  13. I dont think my script is using any of those. Its all done by creating the email in php from a mysql database. Is it easy to integrate ? Thanks in advance ?
  14. Hi I have a script that sends out an email when a user specifies a event time and date. 1st issue is Also the below forms the date and time in my email (this works OK) but I would like it to be noticed when on a smart phone so that it can be added to the calendar. At the moment it just looks like text. I have also had it display the date and time as dS M Y and this doesnt make a difference. $formdate = date("d/m/Y H.i", $formdate); 2nd issue is $comment .= $addcomment."\n".GetConfig('defaultmsg'); @mail($info['email'], "$info[subject] (AutoReminder: $formdate)", "Event Date : ".$formdate."\n".$comment, GetConfig('msgheaders')); I have added the Event Date : and that comes through with the email but I would like to create a HTML email here and put some data out puts into a html table and the logo at the top of the email. Does anybody have any ideas ? 3rd issue is As this is a generated email it always goes into junk on my hotmail account. Is there any way to stop this apart from advising the user to check their junk/spam mail ? My host already has SPF turned on for authenticity. Thanks in advance Martyn
  15. Hi I dont think that it will be difficult for some of you on here to spot my flaw but I am trying to add a record and a image to a folder and register the name of the file along with the full path to the image in the mysql record. The issue I am having is that the image is uploading OK but nothing from the form is uploading into the database. My columns are named as ID, Display Name, Model Type, Fix Type, Description, Price, image Also...where would I put the http://www.XXXX.co.uk/images/catalog in my addrecord.php script so that it inserts it along with the file name of the file in the image column, so I can call this image later ? This is my form <form method="post" action="addrecord.php" enctype="multipart/form-data"> <p> ID </p> <input type="text" name="nameid"/> <p> <p> Display Part Name </p> <input type="text" name="namepart"/> <p> iPhone Model </p> <input type="text" name="nameiphone"/> <p> Fix Type </p> <input type="text" name="namefix"/> <p> Description </p> <input type="text" name="namedescription"/> <p> Price </p> <input type="text" name="nameprice"/> <p> Image: </p> <input type="file" name="photo"> <br/> <br/> <input TYPE="submit" name="upload" title="Insert Record" value="Insert Record"/> </form> This is the add record.php file My code is <?php //This is the directory where images will be saved $target = "/home/XXXX/public_html/images/catalog/"; $target = $target . basename( $_FILES['photo']['name']); //This gets all the other information from the form $ID=$_POST['nameid']; $displayname=$_POST['namepart']; $iphone=$_POST['nameiphone']; $fix=$_POST['namefix']; $description=$_POST['namedescription']; $price=$_POST['nameprice']; $pic=($_FILES['photo']['name']); // Connects to your Database mysql_connect("localhost", "XXXXXX", "iphone") or die(mysql_error()) ; mysql_select_db("XXXXX_catalog") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO catrep (nameid,namepart,nameiphone,namefix,namedescription,nameprice,photo) VALUES ('$ID','$displayname', '$iphone', '$fix', '$description','$price','$pic')") ; //Writes the photo to the server if(move_uploaded_file($_FILES['photo']['tmp_name'], $target)) { //Tells you if its all ok echo "The file ". basename( $_FILES['photo']['displayname']). " has been uploaded, and your information has been added to the directory"; } else { //Gives and error if its not echo "Sorry, there was a problem uploading your file."; } ?> Thanks in advance Martyn
  16. Hi I have a iPhone repair website and would just like to tell the user what ios version they are on and what the latest version is. Saying wheather it's an iPod, iPhone or iPad would be great too. I am open to other ways of getting the info if it's easier Thanks again Martyn
  17. Hi I'd love the webpage to say if an iPhone went on the webpage for it to say Your iPhone ios is 5.1.1 Or Your iPad iOS is on 5.1.1 I can sort the windows version etc but struggling with ios Thanks in advance Martyn
  18. Hi I would like to know if I can show the actual version of ios on an iphone, ipod or ipad etc on a webpage. ? I have a script that says if the actual iphone is on ios 5 and if not to show another message but I just wondered if there is a script to show iphone is running IOS 5.1.1 ? <script type="text/javascript"> if (navigator.userAgent.match(/OS 5(_\d)+ like Mac OS X/i)) // this helps detect minor versions such as 5_0_1 document.write("You have iOS 5! Aren't you special!"); </script> <script type="text/javascript"> if (navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS 5_\d/i)) { alert("On iOS 5") } else { alert("On iOS 4"); } </script> Thanks in Advance
×
×
  • 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.