Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. I have this chatroom i made from a tutorial. The problem i am having is the it keeps refreshing and can get very annoying. http://djw-webdesign.awardspace.com/ice_chat/chatroom/chat.php I believe xml HTTPrequest may fix this but i don't know how to fix it. If you need to see the code just say, i havent posted it as i don't what bit is sending the refresh. Thanks
  2. Ok, i followed that tutorial and get an error Fatal error: Undefined class name 'mail' in /home/www/djw-webdesign.awardspace.com/Mail App/mailapp.php on line 100 this is the part of the code it refers to $host = ""; //my details removed $username = ""; // my details removed $password = ""; //my details removed //first off check if they have posted if(isset($_POST['send'])) { $to = htmlspecialchars($_POST['to']); $subject = htmlspecialchars($_POST['subject']); $from = htmlspecialchars($_POST['from']); $message = htmlspecialchars($_POST['message']); $error = 0; if($error == 0) { $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/plain; charset=iso-8859-1\n"; $header .= "From: $from <$from>\n"; $header .= "X-Mailer: PHP's mail() Function\n"; $header .= "Reply-To: $from"; $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $subject, $header, $message); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } }
  3. erm, cus i don't think i have PEAR, so i would need a way round using it
  4. Yes, but i have read of ways to send an email , where you enter your SMTP details then send it . Something like this http://email.about.com/od/emailprogrammingtips/qt/et073006.htm . I want to do what my cms does, which is send an email from any email address using my smtp settings.
  5. Ok, update, i have not got it partly working , i have inputted text myself (html code) and added text to the database and they display fine, but now my problem is that old posts with icelandic text in still have the symbol?
  6. No, i have a CMS on one of my sites, e107, and for this i have entered my SMTP settings and i can send an email from any name and email address. But i don't no how to do this, i beilieve i need to use SMTP directly to send it.
  7. Thanks, i have actually made a design on powerpoint that i am implementing, but has a different site address. I will post this address when i have finished making the design.
  8. Well i need to know how to get it to send from my email, but appear like it is being sent through the persons email.
  9. Well i have inputted some myself and some if from a database. This is the error that w3 validator gives. Sorry, I am unable to validate this document because on line 25 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication. The error was: utf8 "\xF3" does not map to Unicode this is the code <?PHP session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="grass_stains.css" media="screen" /> <link rel="stylesheet" type="text/css" href="print.css" media="print" /> <title>Guestbook</title> </head> <?php $theuser=$_SESSION["valid_user"]; if (!$_SESSION['lang_ice']) { $_SESSION['lang_en'] = true; $_SESSION['lang_ice'] = false; } if (isset($_GET['lang'])) { if ($_GET['lang'] == "en") { $_SESSION['lang_en'] = true; $_SESSION['lang_ice'] = false; } if ($_GET['lang'] == "ice") { $_SESSION['lang_en'] = false; $_SESSION['lang_ice'] = true; } } ?> <body> <?php if($_SESSION['lang_ice'] == true) { require_once 'ice.php'; } if($_SESSION['lang_en'] == true) { require_once 'en.php'; } ?> <div class="page_wrap clearfix"> <div class="header_text"> <h1>Anna Ceridwen</h1> </div> <div class="topnav" id="nav"> <ul> <li><a href="../index.html"><?php echo $home;?></a></li> <li><a href="../Slideshow/index.html"><?php echo $slide; ?></a></li> <li><a href="../book/guestbook2.php"><?php echo $guestbook;?></a></li> <li><a href="../divx.html"><?php echo $video; ?></a></li> <li><a href="../games.php"><?php echo $games; ?></a></li> <? if (!$_SESSION["valid_user"]) { echo "<li><a href=\"index.php?action=login\">$login</a></li><li><a href=\"index.php?action=register\">$register</a></li>"; } else { echo "<li><a href=\"profile.php?action=viewprofile\">$welcome $theuser</a></li><li><a href=\"index.php?logout\">$logout</a></li>"; } if ( $theuser == "admin" ) { echo "<li><a href='admin.php'>Admin Area</a>"; } ?> <li><a href="?lang=en">Eng</a></li><li><a href="?lang=ice">Ice</a></li> </ul> </div> Gestabók <div class="container clearfix"> <DIV ALIGN="center"><FONT SIZE=6 COLOR=black><B><?php echo $guestbook;?></B></FONT><br /> <a href="./guestbook2.php"><?php echo $sign; ?></a> | <a href="./guestbook2.php?action=view"><?php echo $view;?></a></DIV> <HR>
  10. I have set the meta tag to utf-8 and i have a language changer set up with the same host that works fine using utf-8.
  11. On this page http://annaceridwen.com/book/guestbook2.php?action=view&p=2 i there are little ?(symbols) on the page, where there should be icelnadic letters. This the code on the header. <?PHP session_start(); $theuser=$_SESSION["valid_user"]; if (!$_SESSION['lang_ice']) { $_SESSION['lang_en'] = true; $_SESSION['lang_ice'] = false; } if (isset($_GET['lang'])) { if ($_GET['lang'] == "en") { $_SESSION['lang_en'] = true; $_SESSION['lang_ice'] = false; } if ($_GET['lang'] == "ice") { $_SESSION['lang_en'] = false; $_SESSION['lang_ice'] = true; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="grass_stains.css" media="screen" /> <link rel="stylesheet" type="text/css" href="print.css" media="print" /> <title>Guestbook</title> </head> <body> <?php if($_SESSION['lang_ice'] == true) { require_once 'ice.php'; } if($_SESSION['lang_en'] == true) { require_once 'en.php'; } ?> <div class="page_wrap clearfix"> <div class="header_text"> <h1>Anna Ceridwen</h1> </div> <div class="topnav" id="nav"> <ul> <li><a href="../index.html"><?php echo $home;?></a></li> <li><a href="../Slideshow/index.html"><?php echo $slide; ?></a></li> <li><a href="../book/guestbook2.php"><?php echo $guestbook;?></a></li> <li><a href="../divx.html"><?php echo $video; ?></a></li> <li><a href="../games.php"><?php echo $games; ?></a></li> <? if (!$_SESSION["valid_user"]) { echo "<li><a href=\"index.php?action=login\">$login</a></li><li><a href=\"index.php?action=register\">$register</a></li>"; } else { echo "<li><a href=\"profile.php?action=viewprofile\">$welcome $theuser</a></li><li><a href=\"index.php?logout\">$logout</a></li>"; } if ( $theuser == "admin" ) { echo "<li><a href='admin.php'>Admin Area</a>"; } ?> <li><a href="?lang=en">Eng</a></li><li><a href="?lang=ice">Ice</a></li> </ul> </div> Gestabók <div class="container clearfix"> <DIV ALIGN="center"><FONT SIZE=6 COLOR=black><B><?php echo $guestbook;?></B></FONT><br /> <a href="./guestbook2.php"><?php echo $sign; ?></a> | <a href="./guestbook2.php?action=view"><?php echo $view;?></a></DIV> <HR> as you can see i am using UTF-8 so this shouldnt be happening.
  12. Ok, if i use SMTP will i be able to get it to not consider it ?
  13. After speaking to my host, i have resolved the problem in a sense. $fr = "my site email"; $to = htmlspecialchars($_POST['to']); $subject = htmlspecialchars($_POST['subject']); $from = htmlspecialchars($_POST['from']); $message = htmlspecialchars($_POST['message']); mail($to,$subject,$message,$header); $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/plain; charset=iso-8859-1\n"; $header .= "From: $fr <$fr>\n"; $header .= "X-Mailer: PHP's mail() Function\n"; $header .= "Reply-To: $from"; the problems i am having are: The email is being classed as a suspicous mail. Any ideas how to stop this. Also the bit in the email where it says who it is from is my site email, how can i get it to show there email ($from) but still send from mine?
  14. Ok, i don't really know JS , can anyone give me an example code?
  15. How can i have it clear the field when you click on it, but only if you havent entered anything? and How can i have it so that when you click out of the box it re-enters the default value if you havent entered anything??
  16. I have a email script, but there is a problem, PHP mail doesn't seem to want to work on the host, but SMTP does, as i have two CMS using it on my account. How can i set up my mail using SMTP?? This is my current mail code $to = htmlspecialchars($_POST['to']); $subject = htmlspecialchars($_POST['subject']); $from = htmlspecialchars($_POST['from']); $message = htmlspecialchars($_POST['message']); $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/plain; charset=iso-8859-1\n"; $header .= "From: $from <$from>\n"; $header .= "X-Mailer: PHP's mail() Function\n"; mail($to,$subject,$message,$header);
  17. This is possible using PHP. My advice would be to store vairables for each page (all the content in seperate variables) and then have if statements. If you need help doing this feel free to PM me.
  18. This is my form <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post" > To : <input type="text" value="<?php echo $to; ?>" name="to" size="30" onClick="this.value=''" title="Enter The Recipients Email Address"> <br ><br > From : <input type="text" value="<?php echo $from; ?>" name="from" size="30" onClick="this.value=''" title="Enter Your Email Or Name"> <br><br> Subject : <input type="text" value="<?php echo $subject; ?>" name="subject" size="30" onClick="this.value=''" title="Enter The Email Subject"> <br ><br > Message:<br > <textarea title="Enter Your Message" name="message" onClick="this.value=''" rows="10" cols="100"><?php echo $message; ?></textarea> <br> <input type="submit" name="send" value="Send" title="Send The Email" size="30"> </form> the problem i am having is that, when i enter details into the form and then click on it, it emptys, how can i fix this and i did have an OnBlur so that when they click out of the box it re-enters the value, how can i get it to only do this if they haven't entered anything?
  19. ?><td><a href="images/<?php echo $row['image_link']; ?>" rel="lightbox [main]" title="<?php echo $row['image_name']; ?>" ><img src="images/thumbs/<?php echo $row['image_link']; ?>"></a><br><?php echo $row['image_name']; ?></td> <?php remove the width
  20. Thanks for all the comments, the website is currently undergoing re-design, and i should have a new design in a few days. When i do i will try and make it incorporate the comments i have heard on here. Thanks, Blade
  21. I thought it was quite odvious concerning the forum name " Website Critique"
  22. No , i don't have IE6 only 7, and i am planning on adding some images last, it is mainly the colour scheme i am looking to improve, i have people that are willing to do the graphics and someone who is working with me on projects i get , who will be doing the graphics and design. jcombs_31 The title of this forum is Website Critique so therefore i am asking for people to criticise the site not criticise me. I am using CSS, and as for flash it is not the answer for everything and i have no need for it (unless you can think of anyflash that i might need). I am just asking people what they think , and in there opinion what needs improving.
×
×
  • 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.