Posts

Jquery for getting values of h2 tags

HTML Code < div id = "pageSpecificBanners" >< h2 class = "page-Title" > about us < /h2></ div > //banner + page title for the Practices page.. < div id = "pageSpecificBanners" >< h2 class = "page-Title" > practices < /h2></ div > Jquery var value = $ ( "#pageSpecificBanners h2" ). html (); if ( value == "about me" ) $ ( 'div#PageSpecificBanners' ) . append ( '<h2 class="printOnlyPage-Title">about us</h2>' ); else if ( h2 == "practices" ) $ ( 'div#PageSpecificBanners' ) . append ( '<h2 class="printOnlyPage-Title2">practices' );

How to set MYSQL root password ?

The command is MySQL 5.7.6 and later: ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'MyNewPass' ; MySQL 5.7.5 and earlier: SET PASSWORD FOR 'root' @ 'localhost' = PASSWORD ( 'MyNewPass' ) ;

Populating dropdown - PHP Ajax MySQL

Image
The  output Step 1  Make City  table. CREATE TABLE `City` (   `ID` int(11) NOT NULL auto_increment,   `Name` char(35) NOT NULL default '',   `CountryCode` char(3) NOT NULL default '',   `District` char(20) NOT NULL default '',   `Population` int(11) NOT NULL default '0',   PRIMARY KEY  (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Step 2 : Write HTML Code                                 <select id="city " name="city" placeholder="Select City" class="form-control" > </select>                              Step 3: Write php Code save as cityapi.php <?php $link = mysql_connect ( "localhost" , "root" , "" ); if (! $link ) { die ( 'Could not connect: ' . mysql_error ()); } if ( mysql_sel...

How to make Web crawler in php ? display url

Step 1. Create index.php <!DOCTYPE html> <html>  <head>   <title>email PHP</title>  </head>  <body>   <div id="content" style="margin-top:10px;height:100%;">    <center><h1>Extrac Email PHP</h1></center>    <form action="index.php" method="POST">     URL : <input name="url" size="35" placeholder="http://www.subinsb.com"/>     <input type="submit" name="submit" value="Start Crawling"/>    </form>    <br/>    <?    include("simple_html_dom.php");    $crawled_urls=array();    $found_urls=array();    function rel2abs($rel, $base){     if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;     if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;     extract(parse_url($base));     $path = pr...