
michaelkirby
Members-
Posts
40 -
Joined
-
Last visited
Never
Contact Methods
-
Website URL
http://www.thisismyproject.com
Profile Information
-
Gender
Not Telling
michaelkirby's Achievements

Member (2/5)
0
Reputation
-
Hi, After investigation I found that the SMTP requires authentication. I started looking into PHPMailer, however am not managing to get it to work. Instructions I have got so far are to download and extract phpmailer to my htdocs folder and create a new folder called phpmailer. So the overall path is as follows: C:\xampp\htdocs\phpmailer The code I'm using is as follows: <?php ini_set("include_path", "C:/xampp/htdocs/phpmailer"); require_once("class.phpmailer.php"); $mailer = new PHPMailer(); $mailer->IsSMTP(); $mailer->Host = 'mail.komenltd.co.uk'; $mailer->SMTPAuth = true; $mailer->Username = '[email protected]'; $mailer->Password = 'Password'; $mailer->FromName = 'Komenltd'; $mailer->From = '[email protected]'; $mailer->AddAddress('[email protected]','Michael Kirby'); $mailer->Subject = 'Test Message'; $mailer->Body = 'Does this work?'; if(!$mailer->Send()) { echo "Message was not sent"; echo "Mailer Error: " . $mailer->ErrorInfo; exit; } ?> but when I run the page I get the following error: Warning: require_once(class.phpmailer.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\KomenLtd1\mail.php on line 3 Fatal error: require_once() [function.require]: Failed opening required 'class.phpmailer.php' (include_path='C:/xampp/htdocs/phpmailer') in C:\xampp\htdocs\KomenLtd1\mail.php on line 3 Can anyone help me please?
-
Hi, I found the location of the php.ini file an changed the settings for smtp to the ones of the hosting I have as below> Incoming mail server POP3: pop.123-reg.co.uk IMAP: imap.123-reg.co.uk Outgoing mail server SMTP: smtp.123-reg.co.uk When I run the mail function I still get the following error: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\KomenLtd1\mail.php on line 7 Mail send failure - message not sent Any Ideas at all? Thanks in advance
-
Hi all, Can someone please advise me how to change the SMTP settings in phpinfo(), as I want to add my provider in instead of localhost. Help!! Thanks in advance
-
Hi all, I want to add a contact us form which sends an email to the my email address which happens to be a Google mail account. Can anyone recommend any tutorials that are good to look at? Or pass any advice would be fantastic! Thanks in advance!
-
Hi, I have several drop down boxes which all vary is size. Is there a way to adjust these so they are all the same size? Thanks in advance
-
Query in PHP doesn't work but run in PHP MyAdmin works
michaelkirby replied to michaelkirby's topic in PHP Coding Help
Thanks for pointing out that I missed the quotes but still the AND statement is not applied. I'm just not to sure how this works in PHP MyAdmin but not when I run the same query through my code??? Any ideas? -
Hi all, I have a query in my php code that partly works but the AND statement is not working. When run in PHP MyAdmin this query worked fine. Any ideas?? See code below: $query="select * from users where towncity= 'Maidenhead' and fname = $search_text or organisationname ='$search_text' or surname ='$search_text'";
-
Hi, Sorry I don't quite understand what you mean? Can you explain a little further please? Your help is much appreciated!! Thanks
-
Hi Ken2k7 I just tried breaking it up and the query still produces people that i search for but it does not take into account the condtion I have put in place for profilestatus='public' This is what the code looks like now: $todo=$_POST['todo']; if(isset($todo) and $todo=="search"){ $search_text=$_POST['search_text']; $value=$_POST['type']; $county = Berkshire; //echo $type; $search_text=ltrim($search_text); $search_text=rtrim($search_text); if($value <> "designer"){ $query="select * from users where profilestatus='public' and fname ='$search_text' or organisationname ='$search_text'"; } else{ $kt=split(" ",$search_text);//Breaking the string to array of words // Now let us generate the sql while(list($key,$val)=each($kt)){ if($val<>" " and strlen($val) > 0){$q .= " fname like '%$val%' or organisationname like '%$val%' or ";} }// end o $kt=splif while $q=substr($q,0,(strlen($q)-3)); // this will remove the last or from the string. $query="select * from users where $q "; } } echo "<br><br>"; $nt=mysql_query($query); //echo mysql_error(); ?> Any Ideas??
-
Hi all, I have implemented some search code that I have sourced off the net and have adjusted to fit my needs. What I want to be able to do is search by either fname or organisation name according to the search text which it does, but to also only select the person if the profilestatus = public. I tired adding this to the query but with no luck. Can anyone advise what I'm doing wrong? Below is the code: $todo=$_POST['todo']; if(isset($todo) and $todo=="search"){ $search_text=$_POST['search_text']; $value=$_POST['type']; $county = Berkshire; //echo $type; $search_text=ltrim($search_text); $search_text=rtrim($search_text); if($value <> "designer"){ $query="select * from users where fname or organisationname ='$search_text' and profilestatus='public'"; } else{ $kt=split(" ",$search_text);//Breaking the string to array of words // Now let us generate the sql while(list($key,$val)=each($kt)){ if($val<>" " and strlen($val) > 0){$q .= " fname like '%$val%' or organisationname like '%$val%' or ";} }// end o $kt=splif while $q=substr($q,0,(strlen($q)-3)); // this will remove the last or from the string. $query="select * from users where $q "; } } echo "<br><br>"; $nt=mysql_query($query); //echo mysql_error(); ?> Thanks in advance!!
-
Hi, Ok so I have a login script created already and sessions are working. What do you mean by using access control? thanks in advance!
-
Hi all, I have created a system where each user has a specific profile. What I would like to be able to do is when a user is logged in they should be able to view peoples profile. ANy tips on what I might need to do?