<?php

set_time_limit(0);
$link = peb_pconnect("bryndlir@127.0.0.1 ", "abc");
if ($link) {
    echo "linked!:" . $link . "<br>\r\n";
} else {
    echo "error:" . peb_errorno() . "<br>\r\nerror:" . peb_error() . "<br>\r\n";
}
echo "<br>\r\n";
echo "<br>\r\n";
peb_status();
echo "<br>\r\n";
echo "<br>\r\n";
$x = peb_vencode("[~a,~a]", array(array("hello", "friend")));
echo "msg resource :" . $x . "\r\n";
echo "<br>\r\n";
echo "<br>\r\n";
peb_send_byname("pong", $x, $link);
echo "<br>\r\n";
echo "<br>\r\n";
//peb_close($link);  You don't need to close pconnect :)
?>
 '" onFocus="if
                    (this.value=='Results for <?php 
echo $_GET['hashtag'];
?>
 ')this.value='' "> 
                    
            <input class="btn btn-default" type="submit" value="Search Again!"/>
         </form>
        </div> <br>
        
<?php 
set_time_limit(0);
$link = peb_connect('Something@bryndlir-pinecone-2194177', 'abc');
if (!$link) {
    die('Could not connect' . peb_error());
}
$msg = peb_vencode('[~p,~a]', array(array($link, $_GET['hashtag'])));
peb_send_byname('pong', $msg, $link);
$message = peb_receive($link);
$rs = peb_vdecode($message);
$glans = call_user_func_array('array_merge', $rs);
$uses = $glans[1];
$twitter_id = $_SESSION["twitter_id"];
$theHashtag = $_GET['hashtag'];
//print_r($uses);
$query = "SELECT twitter_id FROM myhistory WHERE (twitter_id = '{$twitter_id}' AND hashtag = '{$theHashtag}')";
$doesExist = false;
$result = mysqli_query($db, $query);
if (mysqli_num_rows($result) > 0) {
    $doesExist = true;