-
Posts
266 -
Joined
-
Last visited
Everything posted by devWhiz
-
Try this.. <?php require 'PHPMailer-master/PHPMailerAutoload.php'; print "OK HERE WE GO<br><br>"; $activation = md5(uniqid(rand(), true)); $mail = new PHPMailer; $mail->SMTPDebug = 0; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'mail.smtp.com'; // Specify main and backup SMTP servers //$mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = '[email protected]'; // SMTP username $mail->Password = 'password'; // SMTP password //$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 25; // TCP port to connect to $mail->From = '[email protected]'; $mail->FromName = 'tim'; $mail->addAddress('[email protected]', 'User'); // Add a recipient $mail->isHTML(true); // Set email format to HTML $message ="http://www.something...y=$activation"; $mail->Subject = 'Here is the subject'; $mail->Body = " $message"; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; //print "code is: $activation"; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; } ?>
-
display column names from database in returned values table
devWhiz replied to Juarez's topic in PHP Coding Help
Try this echo "<table border='3' width = '150'>"; echo "<tr><th>{$column1}</th><th>{$column2}</th><th>{$column3}</th></tr>"; -
I'm not sure I get what you mean? Is your script not displaying anything? Any errors being displayed? The only thing I see that would cause an error is your $qry variable being undefined.
-
Try using curl().
-
What are the contents of the $data variable?
-
$xml = simplexml_load_string($data); $this->followers_count = intval($xml->followers_count); $this->friends_count = intval($xml->friends_count); $this->listed_count = intval($xml->listed_count); $this->statuses_count = intval($xml->statuses_count); $this->profile_image_url = $xml->profile_image_url;
-
Try simplexml_load_string()
-
execute PHP scripts stored in MySQL table row
devWhiz replied to cbassett03's topic in PHP Coding Help
I would extract the data from the column, create a .php file with the content inside the file, and then you can use the script and delete when finished. -
if(file_exists("./files/items/1234-5678.pdf")){ }
-
SimpleXMLElement::attributes should be what you need.. If you want to post the xml, I may be able to help you out more.
-
Good Morning! Welcome to PHPFreaks!
-
For future reference, as an alternative to editing .htaccess you could have made a folder in the root of your website called "products" and then took products.php and renamed it index.php and put it in the products folder, then include any scripts needed to generate the products page. That would show up as www.yoursite.com/products By editing .htaccess, it can work for all scripts with the .php extension, which would be better in my opinion.
-
I wish people would do my work for me lol... Oh wait.. Not really.. No fun in that. It will get you nowhere...
-
Authenticate to Gmail in PHP without including Mail.php
devWhiz replied to bobcowher's topic in PHP Coding Help
Personally, I use IMAP to authenticate Gmail in my scripts.. $imapHost = '{imap.gmail.com:993/imap/ssl}INBOX'; $openStream = imap_open($imapHost, $gmailAddress, $gmailPassword);- 2 replies
-
- php
- authenticate
-
(and 2 more)
Tagged with:
-
No problem. What ended up being the issue?
-
Try using $uid = $_GET['uid']; instead of $_REQUEST[];
-
$result= mysql_query($result); should be $result= mysql_query($sql);
-
Welcome to PHPFreaks ahamadhussain!
-
Trying to update table using isset() function shows nothing
devWhiz replied to psonawane's topic in PHP Coding Help
try empty() -
Well, You since you're using a form, you can pass the variable via $_POST[]
-
Try http://php.net/manual/en/function.strtotime.php - CLUEL3SS
-
Ahh, I forgot about Headfirst .. I own Headfirst Java - Reading that book was a decent experience.. They make it easier to comprehend.. I'm going to look into Headfirst C++ and C. I've got some of the basics of C++ down. I'm self taught in PHP, I've mastered pretty much every aspect of that language.. I don't know why it has taken me 3 years to even initiate trying to learn C++.. In the beginning it was intimidating I guess.. lol now Its not bad at all
-
Get off your lawn? Lol.. Are you able to suggest a good book to start with? I know how to make some simple math programs and such in C++ already.. I have a little bit of knowledge on the basics of C++.. I started programming 3 years ago, Started with PHP, now I can do anything I need done with that.. but if you have any suggestions or could point me in the right direction? Thanks!
-
Should I learn C first or should I just start with C++?