Posts

How to add slide out div in our website?

How to add slide out div in our website? <style type="text/css" media="screen">     .slide-out-div {        padding: 20px;         width: 250px;         background: #f2f2f2;         border: #29216d 2px solid;     }     </style>     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>            <script> /*     tabSlideOUt v1.3         By William Paoli: http://wpaoli.building58.com     To use you must have an image ready to go as your tab     Make sure to pass in at minimum the path to the image and its dimensions:         example:             $('.slide-out-div').tabSlideOut({                 tabHandle: '.handle',                         //class of the element that will be your tab -doesnt have to be an anchor                 pathToTabImage: 'images/contact_tab.gif',     //relative path to the image for the tab *

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay if you have long mysql query or many joins and you got this error the use this  SET SQL_BIG_SELECTS = 1 example:  SELECT p.id as project_id,  p.job_number, p.time_to_complete , p.user_id, p.job_name, p.bid_date , p.bid_complete_date, p.service_id, p_docs.link, p_docs.username, p.status,  p_docs.password, p_docs.special_instructions, ord.amount, ord.payment_status, p.createDate , s.service_name , u.contact_name , u.f_number , f.name as franchise_name , v.name as vendor_name ,v.id as vendor_id , s.id as services_id , ord.order_date FROM wte_projects AS p INNER JOIN wte_projects_docs AS p_docs ON p.id = p_docs.project_id INNER JOIN wte_orders AS ord ON p.id = ord.project_id INNER JOIN wte_users AS u ON u.id = p.user_id  LEFT JOIN wte_franchise as f on f.code = u.f_number LEFT JOIN wte_services AS

How to use Number Validation for text box onkeyup by javascript?

How to use Number Validation for text box onkeyup by javascript? i got stuck in this problem so i make some customize code of Number Validation for text box onkeyup by javascript. it runs good and give quick alert. you can copy and paste this code in your file and simply run the file and you can customize the code according to your need. <script type="text/javascript"> function checknum(s) { return (s.toString().search(/^-?[0-9.]+$/) == 0 ) } </script>  <input name="phone" id="phone" type="text" class="last_bg" onkeyup="if(this.value != '' &amp;&amp; !checknum(this.value)){this.value = ''; alert('Please enter numbers only!')}"  value=""/> Dont forget to add jquery.js file in this page

How to add 301 redirecting in url add www before the url?

Url rewriting in htaccess 310 for redirecting the url from website.com to www.website.com and you can use this code to add 301 redirect to your webiste to redirect the url from without www to www like http://website.com to http://www.website.com simple copy and paste this code in your htaccess file and replace the website word to your website name RewriteCond %{HTTP_HOST} ^website\.com$ [NC] RewriteRule ^(.*)$ http://www.website.com/$1 [R=301,L]

How to create a CSV file from MySQL with PHP?

Create a CSV file from MySQL with PHP simple copy and paste this code to create the csv file from mysql with php and change the query according to your need. <?php mysql_connect('host','username','password'); mysql_select_db('database_name'); function remove_char($var) { $set = preg_replace('/[^a-zA-Z0-9-+@() \.\_\']/','padh',trim($var)); return $set; } function csv_create() { header("Content-type: application/csv"); header("Content-Disposition: attachment; filename=".date('Y-m-d-h:i:s').".csv"); header("Pragma: no-cache"); header("Expires: 0"); $res = mysql_query("SELECT fname,lname,fullname,email FROM cs_users order by id"); echo "First Name,Last Name,Full Name,Email\n"; // fetch a row and write the column names out to the file while($val = mysql_fetch_array($res)) { $fname = remove_char($val['fname']); $lna

How to use linkedin login api in my php website?

If you want linkedin login api for your php website and use registration with linkedin then you came on right post. here is some code for your linkedin login follow the instruction as in this post and then You can easily apply this linkedin login in your website add this code in your header Make a linkedin image the name of that image should be linkedin.jpg and place this in your images folder this image will show on linekedin button <script language="javascript" type="text/javascript" src="/js/confirmed_custom.js" ></script> <script type="text/javascript" src="http://platform.linkedin.com/in.js">   api_key: your website likedin api        // HGYbaYgas6Hfa&   onLoad: onLinkedInLoad   authorize: false </script> <script type="text/javascript"> function onLinkedInLoad() { $('a[id*=li_ui_li_gen_]') .css({marginBottom:'20px'}) .html('<img src="images/lin

How to Send Mail using SMTP and PHP?

how to use  SMTP send mail script This article is all about " send Mail using SMTP and PHP ". so now you  can send your email SMTP authentication smtp and php script. each mail needed server authentication, So you have to buy mail server. First you have to make a php file and add this code in this file and file name should be  SMTPClass.php <?php class SMTPClient { function SMTPClient ($SmtpServer, $SmtpPort, $SmtpUser, $SmtpPass, $from, $to, $subject, $body) { $this->SmtpServer = $SmtpServer; $this->SmtpUser = base64_encode ($SmtpUser); $this->SmtpPass = base64_encode ($SmtpPass); $this->from = $from; $this->to = $to; $this->subject = $subject; $this->body = $body; $this->newLine = "\r\n"; if ($SmtpPort == "") { $this->PortSMTP = 25; } else { $this->PortSMTP = $SmtpPort; } } function SendMail (){ if ($SMTPIN = fsockopen ($this->SmtpServer, $this->PortSMTP)) { fputs ($SMTPIN, &qu