Jump to content

shan2batman

Members
  • Posts

    90
  • Joined

  • Last visited

Everything posted by shan2batman

  1. ok then do this $query="select name, plan_id from table_name where condition='condition_name' order by id"; then execute the query with mysqli or pdo and create a loop and type the necessary html code like this <table> foreach($fetched_data as $content) { $result .=" <tr><td>".$content['name']."</td></tr> <tr><td>".$content['plan_id']."</td></tr> "; } echo $result; the above code will print it in table format, you can change it to any format and place it in your php page by either requiring or including the file or just run the loop in the same page. to place the $result in the desired place at any page you have to create a separate php file and loop in it and then call it in the desired place like require 'path to filename/filename.php'; or include 'path to filename/filename.php'; hope this helps forgive my english it isn't my mother tongue.
  2. no need to complicate things, use wildcard in your query like "select * from table_name where condition='codition name' order by id"
  3. no need to complicate things, use wildcard in your query like "select * from table_name where condition='codition name' order by id"
  4. i'm trying to make a notification tab work but do not seem to get it right. The dropdown is working fine but the ajax call to newfriends.php is not working right, when viewed with firebug there are no results to be seen in the dropdown.Quite confusing. (note the dropdown menu is located in header and can only be displayed if the session is initialised) here is the ajax used in jquery: function load_notifications(view=''){ $.ajax({ url: "notification/new_friends.php", method: "POST", data:{view:"view"}, dataType:"json", success: function(data){ $(".dropdown-menu").html(data.notification); if(data.unseen_notification>0){ $(".badge1").html(data.unseen_notification); } } }); //$(".dynamic-notification").load("notification/pm_n.php"); // $(".dynamic-notification-f").load("notification/new_friends.php"); }; load_notifications(); $(document).on("click",".count_friend", function(){ load_notifications('yes'); }); //loads every 2 seconds for chat setInterval(function(){load_notifications();},2000); here is the new_friends.php content: <?php include '../includes/dbconfig.inc.php'; if (isset($_POST['view'])) { if($_POST['view'] !=''){ $update="update friends set count='1' where friend_one=:session and count='0'"; $stmt=$conn->prepare($update); $stmt->bindValue(":session", $_SESSION['uname']); $stmt->execute(); } $sql123="select id from friends where friend_two=:sess_uname and count='0'"; $stmt123=$conn->prepare($sql123); $stmt123->bindValue(":sess_uname", $_SESSION['uname']); $stmt123->execute(); $request_count=$stmt123->fetchColumn(); //$count_friend=$stmt123->rowCount(); /*$sql_f_count="select *from user where user_id=:session_id and activated='1' limit 1"; $stmt_f_count=$conn->prepare($sql_f_count); $stmt_f_count->bindValue(":session_id", $_SESSION['id']); $stmt_f_count->execute(); $user_details=$stmt_f_count->fetchAll(); $friend_badge=$user_details[0]['friend_count_badge'];*/ require "notification/friend_request_notification.php"; // $new_friends="<span class='dropdown'><a href='#' data-placement='bottom' class='btn dropdown-toggle' data-toggle='dropdown' title='Friend Requests' data-html='true'><span class='count_friend' style=' height:33px; width:30px;'><span class='badge1 label label-pill'>".$count."</span><img src='img/logo/group-button-white.png' style='height:25px; width:27px;' alt='new_friends_alert'></span></a><ul class='dropdown-menu'></ul></span>"; //if($request_count[0]>0){ //$new_friends="<a href='#' data-placement='bottom' class='btn' data-trigger='focus' title='Friend Requests' data-toggle='popover' data-html='true' data-content='".$friend_requests."'><span class='count_friend' style=' height:33px; width:30px;'><img src='img/logo/group-button-white.png' style='height:25px; width:27px;' alt='new_friends_alert'></span><span class='badge'>".$friend_badge."</span></a>"; /*}else{ $new_friends="<a href='all_notifications.php'><img src='img/logo/group-button-black.png' style='height:25px; width:27px;' alt='new_friends_alert'></a>"; }*/ //echo $new_friends; //} $data=array( 'notification'=>$friend_requests, 'unseen_notification' =>$request_count[0][0] ); and the code for friend requests output: <?php //error_reporting(0); require_once 'includes/dbconfig.inc.php'; $sql = "select * from friends where friend_two=:session and accepted='0' order by friends_date_made asc"; $stmt = $conn->prepare($sql); $stmt->bindparam(":session", $_SESSION['uname']); $stmt->execute(); $numrows = $stmt->fetchAll(PDO::FETCH_ASSOC); $friend_requests=""; if ($numrows < 1) { $friend_requests = "You do not have any friend requests"; echo "$friend_requests"; exit(); } else { foreach ($numrows as $i=>$row1 ) { $reqid = $row1['friend_id']; $user1 = $row1['friend_one']; $datemade = $row1['friends_date_made']; $datemade1 = strftime("%B %d, %y", strtotime($datemade)); $sql = "SELECT * FROM user WHERE uname=:user1 LIMIT 1"; $stmt = $conn->prepare($sql); $stmt->bindparam(":user1", $user1); $stmt->execute(); $thumbrow = $stmt->fetchAll(PDO::FETCH_ASSOC); $user1avatar = $thumbrow[$i]['avatar']; $user1id=$thumbrow[$i]['user_id']; if ($user1avatar =="") { $user1pic = '<img src="img/avatardefault.png" height="50" style="float:left;" width="50" alt="'.$user1.'" class="user_pic">'; } else { $user1pic = '<img src="../user/user/'.$user1id.'/'.$user1avatar.'" height="50" style="float:left;" width="50" alt="'.$user1.'" class="user_pic">'; } $friend_requests .= '<li><div id="'.$reqid.'" float="right" class="friendrequests"> <a href="home.php?u='.$user1.'">'. $user1pic .'</a> <div class="user_info '.$reqid.'" id="'.$reqid.'"><small>' . $datemade1 . '</small> <a href="home.php?u='.$user1.'">'.$user1.'</a> is requesting your friendship<br /><br /> <button id="'.$reqid.'" name="'.$_SESSION['uname'].'" sess="'.$_SESSION['id'].'" class="accept_btn btn btn-warning">Accept</button><span class="show-spinner"></span> or <button id="'.$reqid.'" name="'.$_SESSION['uname'].'" sess="'.$_SESSION['id'].'" class="reject_btn btn btn-warning">Reject</button> </div> </div><hr></li>'; } }
  5. Hi guys, Recently i developed a new social network called www.myexpresspad.com. Please join and give me feedback on how your experience was with it. please also take a few moments to answer the poll which would do a lot of help for me and if you feel it needs improvement please leave a reply of your remarks on the social network. Plus i would also appreciate anyone who gives me tips on marketing it. Regards, Gowri Shanker.D
  6. My problem is that everytime when a user uploads photos through my app in openshift it gets lost.When i try to update the code through git,I couldn't find a solution on the net.So I came here for experts advice. i would also appreciate if anyone can point me to an article that does it for php app in openshift. The problem is simple my user uploaded files are stored in /user/{$_SESSION['id']} folder that is located in repo folder. through research i found that it should be stored in app-root/data folder. If so how can i store user uploaded photos directly there and access it for the user who wants to view it in browser directly like www.testing-pad4u.rhcloud.com/home.php?u={$_SESSION['name']}. i have no clue on how to do it please help me or point me in the right direction as i'm a total noob to Linux.
  7. @mac_gyver after looking in to the source i found a fatal error from a user function that was not yet written. You saved my time boss.
  8. here is the full code. The problem is that the $data_fetch is able to pull all the desired results when i try to var_dump it. But, the variable $row_d is only pulling the first row from the DB. How may i solve it. Please forgive me for not giving adequately specific. @jacques1 <?php include 'includes/header.php'; if (isset($_SESSION['uname'])){ $tag= htmlentities($_GET['tag']); $sql3="select * from user where uname like '%$tag%' and activated='1'"; $stmt_t=$conn->prepare($sql3); $stmt_t->execute(); $tag_fetch=$stmt_t->fetchAll(PDO::FETCH_ASSOC); $sql1="select * from group_posts"; $stmt_t=$conn->prepare($sql1); $stmt_t->execute(); $data_fetch=$stmt_t->fetchAll(); function hashtags($dat, $tag) { $regex="/#+([a-zA-z0-9._-]+)/"; foreach($dat as $d){ $dat1= preg_match($tag, $d); print_r($dat1); } return $dat1; } ?> <div class="container-fluid"> <br><div class="row"> </div><br> <div class="row"> <div class="col-sm-2"> <?php include_once 'notification/friend_list.php'; ?> <?php include 'groups/group_list.php';?> </div> <div class="col-lg-8"> <table class="main_page"> <td class="div-col-left1"><div class="overflow"><h3>Users</h3> <?php foreach ($tag_fetch as $row_s) { $id_s=$row_s['user_id']; $fname_s=$row_s['fname']; $lname_s=$row_s['lname']; $uname_s=$row_s['uname']; $email_s=$row_s['email']; $phone_s=$row_s['phone']; $photo_s=$row_s['avatar']; $city_s=$row_s['city']; if($photo_s !=""){ echo '<div class="" align="left">'; echo '<a href="home.php?u='.$uname_s.'" target="_blank"><img width="130" height="130" src="user/'.$id_s.'/'.$photo_s.'">'.$fname_s.' '.$lname_s.'('.$uname_s.')</a><br>City:- '.$city_s.'<hr>'; echo '</div>'; } else { echo '<div class="" align="left">'; echo '<a href="home.php?u='.$uname_s.'" target="_blank"><img width="130" height="130" src="img/avatardefault.png">'.$fname_s.' '.$lname_s.'('.$uname_s.')</a><br><hr>'; echo '</div><br>'; } } echo "</div></td><td class='div-col-right1 '><div class='overflow'><h3>Groups</h3>"; foreach ($data_fetch as $row_d) { $postid=$row_d['gp_id']; $post_auth=$row_d['author_gp']; $post_type=$row_d['type']; $post_title= html_entity_decode($row_d['title']); $post_data= html_entity_decode($row_d['data']); $data1= array($post_data); // $data1= taggingsys($data0); $post_date=$row_d['pdate']; $post_avatar=$row_d['avatar']; $post_uid=$row_d['user_id']; if ($post_avatar != ""){ $g_pic='user/'.$post_uid.'/'.$post_avatar; } else { $g_pic='img/avatardefault.png'; } $user_image="<img src='{$g_pic}' alt='{$post_auth}' title='{$post_auth}' width='30' height='30'>"; $vote_up_count=$project->voteGroupCheck($postid, $_SESSION['id']); /*foreach ($data1 as $d) { $d1= explode(" ", $d); if(strpos("$d1", "#$tag") !=FALSE){ echo "hurray"; } } */ if($vote_up_count[0][0]>0){ $vote_like=TRUE; } else { $vote_like=FALSE; } if($vote_up_count[0][1]>0){ $vote_dislike=TRUE; } else { $vote_dislike=FALSE; } include 'ratings/vote_count_g.php'; if ( $vote_like==TRUE && $vote_dislike==FALSE) { $like='<a type="liked" class="btn liked status_like_'.$postid.' liked" attr="'.$postid.'">Liked</a>('.$num_likes[0].')'; $unlike='<a type="unlike" class="btn status_unlike_'.$postid.' unlike" attr="'.$postid.'">Dislike</a>('.$num_unlikes[0].')'; } elseif ($vote_dislike==TRUE && $vote_like==FALSE) { $like='<a type="like" class="btn status_like_'.$postid.' like" attr="'.$postid.'">Like</a>('.$num_likes[0].')'; $unlike='<a type="disliked" class="btn disliked status_unlike_'.$postid.'" attr="'.$postid.'">Disliked</a>('.$num_unlikes[0].')'; } else { $like='<a type="like" class="btn status_like_'.$postid.' like" attr="'.$postid.'">Like</a>('.$num_likes[0].')'; $unlike='<a type="unlike" class="btn status_unlike_'.$postid.' unlike" attr="'.$postid.'">Dislike</a>('.$num_unlikes[0].')'; } #build threads. echo $edit."<div id='PB_".$postid."' value='".$postid."' class='jumbotron'><span id='spinner".$postid."'></span>" . "<legend>{$post_title}" . "<span class='pull-right'>" . "<div class='dropdown'>" . "<button type='button' class='btn btn-danger dropdown-toggle' data-toggle='dropdown' >" . "<span class='glyphicon glyphicon-edit'></span></button>" . "<ul class='dropdown-menu'>" .$edit_btn ." ". $statusdeletebutton ."</ul></div></span><br></legend>" . "<legend>{$post_data}<br><span class='spinner_g_u{$postid}'></span>{$like} | {$unlike} <br>Posted by:{$user_image} {$post_auth}-- {$post_date}<hr><br></legend> <h4><a id='{$postid}' class='btn collap-btn'>Comments</a></h4><div class='collapse scroll-comments' id='toggle{$postid}'>"; #get replies and user image using inner loop $num_rows1=$project->groupcount_replies($postid); $fetch1=$project->group_replies($postid); if ($num_rows1>0) { foreach ($fetch1 as $row1) { $reply_id=$row1['gp_id']; $reply_pid=$row1['pid']; $reply_auth=$row1['author_gp']; $reply_data=$row1['data']; $data11= hashtags($reply_data); $data12= taggingsys($data11); $reply_date=$row1['pdate']; $reply_avatar=$row1['avatar']; $reply_uid=$row1['user_id']; if ($reply_avatar != ""){ $r_pic='user/'.$reply_uid.'/'.$reply_avatar; } else { $r_pic='img/avatardefault.png'; } /* include 'ratings/vote_count_g4comments.php'; $like_r='<a type="like" class="btn status_liker_'.$reply_id.' like_r" attr="'.$reply_id.'">Like</a>('.$num_likes_r[0].')'; $unlike_r='<a type="unlike" class="btn status_unliker_'.$reply_id.' unlike_r" attr="'.$reply_id.'">Dislike</a>('.$num_unlikes_r[0].')'; */ $vote_up_count=$project->voteGroupReplyCheck($_SESSION['id'],$reply_id); if($vote_up_count[0][0]>0){ $vote_like=TRUE; } else { $vote_like=FALSE; } if($vote_up_count[0][1]>0){ $vote_dislike=TRUE; } else { $vote_dislike=FALSE; } include 'ratings/vote_count_g4comments.php'; if ( $vote_like==TRUE && $vote_dislike==FALSE) { $like_r='<a type="liked" class="btn status_liker_'.$reply_id.' liked_r" attr="'.$reply_id.'">Liked</a>('.$num_likes_r[0].')'; $unlike_r='<a type="unlike" class="btn status_unliker_'.$reply_id.' unlike_r" attr="'.$reply_id.'">Dislike</a>('.$num_unlikes_r[0].')'; } elseif ($vote_dislike==TRUE && $vote_like==FALSE) { $like_r='<a type="like" class="btn status_liker_'.$reply_id.' like_r" attr="'.$reply_id.'">Like</a>('.$num_likes_r[0].')'; $unlike_r='<a type="unliked" class="btn disliked_r status_unliker_'.$reply_id.'" attr="'.$reply_id.'">Disliked</a>('.$num_unlikes_r[0].')'; } else { $like_r='<a type="like" class="btn status_liker_'.$reply_id.' like_r" attr="'.$reply_id.'">Like</a>('.$num_likes_r[0].')'; $unlike_r='<a type="unlike" class="btn status_unliker_'.$reply_id.' unlike_r" attr="'.$reply_id.'">Dislike</a>('.$num_unlikes_r[0].')'; } $reply_img="<img src='{$r_pic}' alt='{$reply_auth}' title='{$reply_auth}' width='15' height='15'>"; #build replies echo "<div id='reply_body'>" . "<small>Posted by:{$reply_img} {$reply_auth}-- {$reply_date}</small><br>" . "<legend>{$data12}<br><span class='spinner_g_r{$reply_id}'></span>{$like_r} | {$unlike_r} </legend></div>"; } } echo '<br>' . '<textarea id="reply_textarea_'.$postid.'" class="group_reply1 input-custom2" placeholder="comment\'s"></textarea>' . '<br><span class="group_reply"></span><button action="post_reply" id="'.$postid.'" attr="'.$postid.'" type="b" class="btn btn-warning pull-right btn-sm reply_btn reply">Reply</button><br></div></div>'; } } echo '</div></td>'; ?> </div> <div class="col-sm-2" style="float: right;"> <?php include 'notification/friend_suggestion.php';?> </div> </div> </div>
  9. no, for simplicity's sake i kept the code small. the problem is it isn't fetching the results from $row_d, but i was able to print the $data_fetch results finely.@jacques1
  10. Hi, guys i'm trying to fetch all results from DB through a foreach loop. But it is not working as intended, as it brings only the first record and not the others. here is my code:- $sql1="select * from group_posts"; $stmt_t=$conn->prepare($sql1); $stmt_t->execute(); $data_fetch=$stmt_t->fetchAll(); foreach ($data_fetch as $row_d) { $postid=$row_d['gp_id']; $post_auth=$row_d['author_gp']; $post_type=$row_d['type']; $post_title= html_entity_decode($row_d['title']); $post_data= html_entity_decode($row_d['data']); $data1= array($post_data); // $data1= taggingsys($data0); $post_date=$row_d['pdate']; $post_avatar=$row_d['avatar']; $post_uid=$row_d['user_id']; if ($post_avatar != ""){ $g_pic='user/'.$post_uid.'/'.$post_avatar; } else { $g_pic='img/avatardefault.png'; } $user_image="<img src='{$g_pic}' alt='{$post_auth}' title='{$post_auth}' width='30' height='30'>"; $vote_up_count=$project->voteGroupCheck($postid, $_SESSION['id']); }
  11. hi, i'm trying to verify whether someone has like a post or not here and it is not giving the expected output but a empty array.Any help would be great. Thanks in advance. //fetch user_id from update table in db and inject it to the feed query. $totalUpdates=$project->totalUpdates1($id,$load); $total_sess_count=$project->totalupdatescount($id); foreach ($totalUpdates as $j=>$row1) { $updateid=$row1['update_id']; $account_name=$row1['account_name']; $u_id=$row1['user_id_u']; $author=$row1['author']; $post_date=$row1['time']; $title= stripslashes($row1['title']); $data= stripslashes($row1['update_body']); $data1= hashtags($data); //$data1= taggingsys($data0); $pic=$project->viewByUname($author); $uid=$pic['user_id']; $datemade = strftime("%B %d", strtotime($post_date)); $avatar=$pic['avatar']; if ($avatar!=""){ $feed_pic='user/'.$uid.'/'.$avatar; } else { $feed_pic='img/avatardefault.png'; } //logic to check if someone has liked or not. $liked_check="select voted_id from voted_u where user_id_v=:sess_id and vote_4_update_id=:updateid "; $stmt_liked=$conn->prepare($liked_check); $stmt_liked->bindValue(":sess_id", $_SESSION['id']); $stmt_liked->bindValue(":updateid",$updateid); $like_check=$stmt_liked->fetchAll(); if ($like_check>0) { $uname_liked=TRUE; }
  12. up votedown votefavorite I've been scraching my head for hours over this problem. I'm basically trying to fetch values from a loop inside a function to pass it to another foreach loop to get the desired results. And it is not working as I intend to. please, point me in the right direction. Here is the code: function ff($s) { $project=""; foreach ($s as $i=> $r ){ $r["friend_one"] == $_SESSION['uname'] ? $friends[]= $r["friend_two"] : $friends[] = $r["friend_one"]; $friend=$friends[$i]; $totalids=$project->totalids($_SESSION['uname'],$friend); } return $totalids; } $totalid= ff($f); print_r($totalid); foreach ($totalid as $v){ $id=$v['user_id']; //other logic to get desired result }
  13. Guys recently i finished a infinite scroll to one of my projects using jquery, php and mysql. After creating that i face the problem of tinymce editor not binding to the dynamically generated textarea. What should i do? here is the code for tinymce editor: tinymce.init({ menubar:false, forced_root_block : "", selector: "textarea#wall_edit_1", entities : '160,nbsp,162,cent,8364,euro,163,pound', theme: "modern", resize: false, height: 200, plugins: [ " autolink link image preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking", "save table contextmenu directionality emoticons paste textcolor" ], content_css: "css/content.css", toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l ink image | print preview media fullpage | emoticons", style_formats: [ {title: 'Bold text', inline: 'b'}, // {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}}, {title: 'Header', block: 'h1'}, {title: 'Example 1', inline: 'span', classes: 'example1'}, {title: 'Example 2', inline: 'span', classes: 'example2'}, {title: 'Table styles'}, {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} ] }); here is the php code that dynamically generates the textarea while using the infinite scroll feature in jquery: if ($author==$_SESSION['uname'] || $account_name==$_SESSION['uname']) { $statusdeletebutton='<li>' . '<a type="'.$updateid.'" class="btn delete_4_session hidden_text_delete_'.$updateid.' glyphicon glyphicon-trash delete_status_btn" title="Delete this status and its replies">Remove</a></li>'; $edit_btn='<li>' . '<a attr="'.$updateid.'" type="'.$updateid.'" class="btn edit_4_session hidden_text_edit glyphicon glyphicon-pencil" title="Edit this status" >Edit</a></li>'; $statusui_edit="<div type='".$updateid."' class='hidden_edit_4_session session_editor".$updateid." jumbotron'>" . "<a type='".$updateid."' class='btn pull-right close_edit' title='Close without editing'>Close X</a>" . "<input type='text' class='form-control title_s_edit title_s_".$updateid."' name='status_title' value='".html_entity_decode($title)."' placeholder='Title' >" . "<span> </span>" . "<textarea id='wall_edit_1' type='".$updateid."' rows='5' cols='50' class='session_edit text_value_".$updateid."' wrap='hard' placeholder='whats up ".$session_uname."'> ".html_entity_decode($data1)."</textarea><br>" . "<button style='float:right;' value='".$updateid."' type='a' class='btn btn-warning btn btn-large btn-lg post-s-edit'>Update</button></div>" ; }else{ $statusdeletebutton=""; $edit_btn="<li class='posted'>You are not the owner of this Post</li>"; $statusui_edit=""; } echo $statusui_edit.''. $hidden_text.'<div attr="'.$updateid.'" type="'.$updateid.'" class="statusboxes status_'.$updateid.' jumbotron">' . '<h3 class="pull-left title">' . '<div id="'.$updateid.'" class="title_s_2copy posted" value="'.html_entity_decode($title).'">'.html_entity_decode($title).'</div></h3>' . '<span class="pull-right">' . '<div class="dropdown">' . '<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" >' . '<span class="glyphicon glyphicon-edit"></span></button>' . '<ul class="dropdown-menu">' .$edit_btn .' '. $statusdeletebutton .'</ul></div></span><br><hr>' . '<legend><span style="font-size: 13.5px;" class=" data_s_2copy" type="'.$updateid.'" >' . html_entity_decode($data1).'</span></legend><b class="posted"><small>Posted by:- <a href="home.php?u='.$author.'"><img src="'.$feed_pic.'" height="20px" width="20px"> '.$author. '</a> '.$datemade.'</small></b>' . '<br><legend>'.$like.' | '.$unlike. ' | '.$share_button.'<h4><a id="'.$updateid.'" class="btn collap-btn">Comments</a></h4></legend>';
  14. ok, but how do i hide a item that should be hidden when it loads in to the document?? here is the jquery code that should hide the dynamically loaded elements $(".hidden_textarea").hide(); $(".hidden_edit_4_session").hide(); $(".hidden_edit_4_friend").hide(); can you say it in layman terms as i'm learning jquery now.
  15. hi, guys i managed to load contents from database dynamically using ajax (JQUERY) but the problem is i'm not able to make them work properly, as i have jquery events to hide classes that are not hiding and links that wont do their normal behaviour when clicked. dont know where i'm going wrong. Any help would be appreciated. here is the jquery code that loads data dynamically: //logic for infinite scroll var load=0; var sess_uname="<?php echo $session_uname;?>"; var f_uname="<?php echo $f_uname;?>"; var sess_count="<?php echo $total_sess_count;?>"; var f_count="<?php echo $total_friend_count;?>"; if(sess_uname==f_uname){ $(window).scroll(function(){ if($(window).scrollTop()==$(document).height()-$(window).height()){ load++; if(load *2 >sess_count){ $(".message").text("no more posts to show"); }else{ $.post("st&com.php", {load:load},function(data){ $("#status_area").append(data); }); } } }); } here is the code for dynamically loaded elements in php: <?php include "includes/dbconfig.inc.php"; $status_replies=""; $status_list=""; $statusui_edit=""; $isowner=""; $is_friend=""; $statusdeletebutton=''; $reply_delete_button=""; $load= (int)($_POST['load'])*2; function hashtags($dat) { $regex="/#+([a-zA-z0-9._-]+)/"; $dat1= preg_replace($regex, '<a href="hash_sys.php?tag=$1">$0</a>', $dat); return $dat1; } function taggingsys($dat) { $regex="/@+([a-zA-z0-9!._-]+)/"; $dat1= preg_replace($regex, '<a href="home.php?u=$1">$0</a>', $dat); return $dat1; } $sess_id=(int)$_SESSION['id']; $friends = array(); $stmt= $conn->prepare("select friend_one, friend_two from friends where (friend_one=:session OR friend_two=:session) and accepted='1'"); $stmt->bindparam(":session",$_SESSION['uname']); $stmt->execute(); $fetch=$stmt->fetchAll(); $count=count($fetch); if($count==0){ $totalids=$project->totalUpdates1($sess_id,$load); /* foreach ($totalids as $v) { print_r($v); $id=$v['user_id']; //fetch update_id from update table in db and inject it to the feed query. //$totalUpdates=$project->totalUpdates1($id); */ foreach ($totalids as $row1){ $updateid=$row1['update_id']; $account_name=$row1['account_name']; $u_id=$row1['user_id_u']; $author=$row1['author']; $post_date=$row1['time']; $title= stripslashes($row1['title']); $data= stripslashes($row1['update_body']); $data1= hashtags($data); // $data1= taggingsys($data0); $pic=$project->viewByUname($author); $uid=$pic['user_id']; $datemade = strftime("%B %d", strtotime($post_date)); $avatar=$pic['avatar']; if ($avatar!=""){ $feed_pic='user/'.$uid.'/'.$avatar; } else { $feed_pic='img/avatardefault.png'; } include 'ratings/vote_count.php'; $like='<a type="like" class="btn status_like_'.$updateid.' like" attr="'.$updateid.'">Like</a>('.$num_likes[0].')'; $unlike='<a type="unlike" class="btn status_unlike_'.$updateid.' unlike" attr="'.$updateid.'">Dislike</a>('.$num_unlikes[0].')'; $share_button=""; $hidden_text= '<textarea class="hidden_textarea hidden_value'.$updateid.'" type="hidden" disabled>'.$data1.'</textarea>'; $share_button="<a class='btn share_btn share_".$updateid."' title='".$title."' type='share' id='".$updateid."'>Share</a>"; if ($author==$_SESSION['uname'] || $account_name==$_SESSION['uname']) { $statusdeletebutton='<li>' . '<a type="'.$updateid.'" class="btn delete_4_session hidden_text_delete_'.$updateid.' glyphicon glyphicon-trash delete_status_btn" title="Delete this status and its replies">Remove</a></li>'; $edit_btn='<li>' . '<a attr="'.$updateid.'" type="'.$updateid.'" class="btn edit_4_session hidden_text_edit glyphicon glyphicon-pencil" title="Edit this status" >Edit</a></li>'; $statusui_edit="<div type='".$updateid."' class='hidden_edit_4_session session_editor".$updateid." jumbotron'>" . "<a type='".$updateid."' class='btn pull-right close_edit' title='Close without editing'>Close X</a>" . "<input type='text' class='form-control title_s_edit title_s_".$updateid."' name='status_title' value='".html_entity_decode($title)."' placeholder='Title' >" . "<span> </span>" . "<textarea id='wall_edit_1' type='".$updateid."' rows='5' cols='50' class='session_edit text_value_".$updateid."' wrap='hard' placeholder='whats up ".$session_uname."'> ".html_entity_decode($data1)."</textarea><br>" . "<button style='float:right;' value='".$updateid."' type='a' class='btn btn-warning btn btn-large btn-lg post-s-edit'>Update</button></div>" ; }else{ $statusdeletebutton=""; $edit_btn="<li class='posted'>You are not the owner of this Post</li>"; $statusui_edit=""; } echo $statusui_edit.''. $hidden_text.'<div attr="'.$updateid.'" type="'.$updateid.'" class="statusboxes status_'.$updateid.' jumbotron">' . '<h3 class="pull-left title">' . '<div id="'.$updateid.'" class="title_s_2copy posted" value="'.html_entity_decode($title).'">'.html_entity_decode($title).'</div></h3>' . '<span class="pull-right">' . '<div class="dropdown">' . '<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" >' . '<span class="glyphicon glyphicon-edit"></span></button>' . '<ul class="dropdown-menu">' .$edit_btn .' '. $statusdeletebutton .'</ul></div></span><br><hr>' . '<legend><span style="font-size: 13.5px;" class=" data_s_2copy" type="'.$updateid.'" >' . html_entity_decode($data1).'</span></legend><b class="posted"><small>Posted by:- <a href="home.php?u='.$author.'"><img src="'.$feed_pic.'" height="20px" width="20px"> '.$author. '</a> '.$datemade.'</small></b>' . '<br><legend>'.$like.' | '.$unlike. ' | '.$share_button.'<h4><a id="'.$updateid.'" class="btn collap-btn">Comments</a></h4></legend>'; ?> <!-- Collapsible Element HTML --> <?php // Fetch Comments of update echo '<div id="toggle'.$updateid.'" class="collapse">'; $totalComments=$project->totalComments($_SESSION['uname'],$friend,$updateid); foreach($totalComments as $row1){ $status_reply_id=$row1['comment_id']; $reply_d=htmlentities($row1['comment_body']); $reply_data= stripslashes($reply_d); $reply_osid=$row1['os_id']; $reply_date=$row1['time_c']; $reply_author=$row1['author_c']; $reply_data1= hashtags($reply_data); // $reply_data1= taggingsys($reply_data0); $datemade_r = strftime("%B %d", strtotime($reply_date)); include 'ratings/vote_count4comments.php'; $like_r='<a type="like" class="btn status_liker_'.$status_reply_id.' like_r" attr="'.$status_reply_id.'">Like</a>('.$num_likes_r.')'; $unlike_r='<a type="unlike" class="btn status_unliker_'.$status_reply_id.' unlike_r" attr="'.$status_reply_id.'">Dislike</a>('.$num_unlikes_r.')'; $pic=$project->viewByUname($reply_author); $uid=$pic['user_id']; $avatar=$pic['avatar']; if ($avatar!=""){ $feed_r_pic='user/'.$uid.'/'.$avatar; } else { $feed_r_pic='img/avatardefault.png'; } if ($reply_author==$_SESSION['uname'] ) { $reply_delete_button='<li><a type="'.$status_reply_id.'" class="btn delete_reply_btn glyphicon glyphicon-trash delete_reply_"'.$status_reply_id.'" title="Delete this comment"> Remove</a></span></li>'; } else{ $reply_delete_button=""; } echo ' <div class="replyboxes pull-left reply_' .$status_reply_id.'">' . 'Reply by:- ' . '<a href="home.php?u='.$reply_author. '"><img src="'.$feed_r_pic.'" height="20px" width="20px">'.$reply_author.'</a>' . '<span class="pull-right">'.$datemade_r . '<b class="dropdown"> <small><span class="btn btn-xs btn-danger dropdown-toggle pull-right" data-toggle="dropdown" > <span class="glyphicon glyphicon-edit"></span></span> <ul class="dropdown-menu">'.$reply_delete_button . '</ul></span>' . '</small></b><br><legend>'. html_entity_decode($reply_data1).'<br>'.$like_r.'|'.$unlike_r.'</legend></div>'; } echo '<textarea id="reply_textarea_'.$updateid.'" class="status_reply_'.$updateid.' input-custom2" placeholder="comment\'s"></textarea>' . '<button id="reply_butn_'.$updateid.'" attr="'.$updateid.'" type="b" class="btn btn-warning pull-right btn-sm reply_butn reply_'.$updateid.'">Reply</button></div></div>'; } } //} else{ $friends = array(); $stmt= $conn->prepare("select friend_one, friend_two from friends where (friend_one=:session OR friend_two=:session) and accepted='1'"); $stmt->bindparam(":session",$_SESSION['uname']); $stmt->execute(); foreach ($stmt->fetchAll() as $i=> $r ) { $r["friend_one"] == $_SESSION['uname'] ? $friends[]= $r["friend_two"] : $friends[] = $r["friend_one"]; $friend=$friends[$i]; $friend_count=count($friends); $totalids=$project->totalids($_SESSION['uname'],$friend); foreach ($totalids as $v) { $id=$v['user_id']; //fetch user_id from update table in db and inject it to the feed query. $totalUpdates=$project->totalUpdates1($id,$load); $total_sess_count=$project->totalupdatescount($id); foreach ($totalUpdates as $j=>$row1){ $updateid=$row1['update_id']; $account_name=$row1['account_name']; $u_id=$row1['user_id_u']; $author=$row1['author']; $post_date=$row1['time']; $title= stripslashes($row1['title']); $data= stripslashes($row1['update_body']); $data1= hashtags($data); //$data1= taggingsys($data0); $pic=$project->viewByUname($author); $uid=$pic['user_id']; $datemade = strftime("%B %d", strtotime($post_date)); $avatar=$pic['avatar']; if ($avatar!=""){ $feed_pic='user/'.$uid.'/'.$avatar; } else { $feed_pic='img/avatardefault.png'; } include 'ratings/vote_count.php'; $like='<a type="like" class="btn status_like_'.$updateid.' like" attr="'.$updateid.'">Like</a>('.$num_likes[0].')'; $unlike='<a type="unlike" class="btn status_unlike_'.$updateid.' unlike" attr="'.$updateid.'">Dislike</a>('.$num_unlikes[0].')'; $share_button=""; $hidden_text= '<textarea class="hidden_textarea hidden_value'.$updateid.'" disabled>'.$data.'</textarea>'; $share_button="<a class='btn share_btn share_".$updateid."' title='".$title."' type='share' id='".$updateid."'>Share</a>"; if ($author==$_SESSION['uname'] || $account_name==$_SESSION['uname']) { $statusdeletebutton='<li>' . '<a type="'.$updateid.'" class="btn delete_4_session hidden_text_delete_'.$updateid.' glyphicon glyphicon-trash delete_status_btn" title="Delete this status and its replies">Remove</a></li>'; $edit_btn='<li>' . '<a attr="'.$updateid.'" type="'.$updateid.'" class="btn edit_4_session hidden_text_edit glyphicon glyphicon-pencil" title="Edit this status" >Edit</a></li>'; $statusui_edit="<div type='".$updateid."' class='hidden_edit_4_session session_editor".$updateid." jumbotron'>" . "<a type='".$updateid."' class='btn pull-right close_edit' title='Close without editing'>Close X</a>" . "<input type='text' class='form-control title_s_edit title_s_".$updateid."' name='status_title' value='".html_entity_decode($title)."' placeholder='Title' >" . "<span> </span>" . "<textarea id='wall_edit_1' type='".$updateid."' rows='5' cols='50' class='session_edit text_value_".$updateid."' wrap='hard' placeholder='whats up ".$_SESSION['uname']."'> ".html_entity_decode($data1)."</textarea><br>" . "<button style='float:right;' value='".$updateid."' type='a' class='btn btn-warning btn btn-large btn-lg post-s-edit'>Update</button></div>" ; }else{ $statusdeletebutton=""; $edit_btn="<li class='posted'>You are not the owner of this Post</li>"; $statusui_edit=""; } echo $statusui_edit.''. $hidden_text.'<div attr="'.$updateid.'" type="'.$updateid.'" class="statusboxes status_'.$updateid.' jumbotron">' . '<h3 class="pull-left title">' . '<div id="'.$updateid.'" class="title_s_2copy posted" value="'.html_entity_decode($title).'">'.html_entity_decode($title).'</div></h3>' . '<span class="pull-right">' . '<div class="dropdown">' . '<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" >' . '<span class="glyphicon glyphicon-edit"></span></button>' . '<ul class="dropdown-menu">' .$edit_btn .' '. $statusdeletebutton .'</ul></div></span><br><hr>' . '<legend><span style="font-size: 13.5px;" class=" data_s_2copy" type="'.$updateid.'" >' . html_entity_decode($data1).'</span></legend><b class="posted"><small>Posted by:- <a href="home.php?u='.$author.'"><img src="'.$feed_pic.'" height="20px" width="20px"> '.$author. '</a> on '.$datemade.'</b>' . '<br><legend>'.$like.' | '.$unlike. ' | '.$share_button.'</legend></small>'; ?> <h4><a id="<?php echo $updateid;?>" class="btn collap-btn">Comments</a></h4> <!-- Collapsible Element HTML --> <div id="toggle<?php echo $updateid;?>" class="collapse scroll-comments"> <?php // Fetch Comments of update $totalComments=$project->totalComments($_SESSION['uname'],$friend,$updateid); foreach($totalComments as $row1){ $status_reply_id=$row1['comment_id']; $reply_d=htmlentities($row1['comment_body']); $reply_data= stripslashes($reply_d); $reply_osid=$row1['os_id']; $reply_date=$row1['time_c']; $reply_author=$row1['author_c']; $reply_data1= hashtags($reply_data); //$reply_data1= taggingsys($reply_data0); $datemade_r = strftime("%B %d", strtotime($reply_date)); include 'ratings/vote_count4comments.php'; $like_r='<a type="like" class="btn status_liker_'.$status_reply_id.' like_r" attr="'.$status_reply_id.'">Like</a>('.$num_likes_r[0].')'; $unlike_r='<a type="unlike" class="btn status_unliker_'.$status_reply_id.' unlike_r" attr="'.$status_reply_id.'">Dislike</a>('.$num_unlikes_r[0].')'; $pic=$project->viewByUname($reply_author); $uid=$pic['user_id']; $avatar=$pic['avatar']; if ($avatar!=""){ $feed_r_pic='user/'.$uid.'/'.$avatar; } else { $feed_r_pic='img/avatardefault.png'; } if ($reply_author==$_SESSION['uname'] ) { $reply_delete_button='<li><a type="'.$status_reply_id.'" class="btn delete_reply_btn glyphicon glyphicon-trash delete_reply_"'.$status_reply_id.'" title="Delete this comment"> Remove</a></span></li>'; } else{ $reply_delete_button=""; } echo ' <div class="replyboxes pull-left reply_' .$status_reply_id.'">' . 'Reply by:- ' . '<a href="home.php?u='.$reply_author. '"><img src="'.$feed_r_pic.'" height="20px" width="20px"> '.$reply_author.'</a>' . '<span class="pull-right">'.$datemade_r . '<b class="dropdown"> <small><span class="btn btn-xs btn-danger dropdown-toggle pull-right" data-toggle="dropdown" > <span class="glyphicon glyphicon-edit"></span></span> <ul class="dropdown-menu">'.$reply_delete_button . '<li><a class="glyphicon glyphicon-warning-sign" href="report.php?u='.$reply_author.'"> Report</a><li></ul></span>' . '</small></b><br><legend>'. html_entity_decode($reply_data1).'<br>'.$like_r.'|'.$unlike_r.'</legend></div>'; } echo '<textarea id="reply_textarea_'.$updateid.'" class="status_reply_'.$updateid.' input-custom2" placeholder="comment\'s"></textarea>' . '<button id="reply_butn_'.$updateid.'" attr="'.$updateid.'" type="b" class="btn btn-warning pull-right btn-sm reply_butn reply_'.$updateid.'">Reply</button></div></div>'; } }} }?> Thanks in advance.
  16. Guys i'm trying to create a infinite scroll feature for a project of mine and i couldn't make it work in the infinite scroll fashion any inputs would be appreciated. Jquery code: $(document).ready(function(){ var load=0; var sess_uname="<?php echo $session_uname;?>"; var f_uname="<?php echo $f_uname;?>"; var sess_count="<?php echo $total_sess_count;?>"; var f_count="<?php echo $total_friend_count;?>"; if(sess_uname==f_uname){ $(window).scroll(function(){ if($(window).scrollTop()==$(document).height()-$(window).height()){ load++; alert('hai1'); if(load *5 >sess_count){ $(".message").text("no more posts to show"); }else{ $.post("st&com.php", {load:load},function(data){ // $(".status_area").append(data); alert('hai'); }); } } }); } }); here is the php code: $load= (int)($_POST['load'])*2; $sess_id=(int)$_SESSION['id']; $friends = array(); $stmt= $conn->prepare("select friend_one, friend_two from friends where (friend_one=:session OR friend_two=:session) and accepted='1'"); $stmt->bindparam(":session",$_SESSION['uname']); $stmt->execute(); $fetch=$stmt->fetchAll(); $count=count($fetch); if($count==0){ $totalids=$project->totalUpdates1($sess_id,$load); here is the class: public function totalUpdates1($id, $load) { $sql2="SELECT * FROM updates WHERE user_id_u=:id order by time desc limit $load,5"; $stmth= $this->_db->prepare($sql2);//Check here syntax of $db $stmth->bindValue(":id",$id); //$stmth->bindValue(":load",$load); $stmth->execute(); return $stmth->fetchAll(); }
  17. @requinix @mac_gyver was right i found the bug in classes file which is required in dbconfig.inc.php, thanks bro
  18. @requinix sorry bro no luck. it isn't showing any error message.
  19. the dbconfig.inc.php seems to be harmless so far??? @requinix here is the page source.
  20. yes mac_gyver i'm including it in home.php and groups.php can it be from them ???
  21. hi, guys im trying to debug this issue for 3 days straight and still i have no starting point in the web for this so came here. the problem is everytime when i try to open my home page it displays a 'g' at the top of the document before the header. i dont know where that bug is coming from in my code. the chrome developer tools shows that it loads in the body tag and the page source showed it at the top of the page. Hence double checked the header file where the problem lies but still no solution. please help me out guys. <?php include 'dbconfig.inc.php'; error_reporting(0); $thispage= basename($_SERVER['PHP_SELF']); $thisgroup=""; $aglist=""; $mglist=""; if ($thispage=="group.php") { if (isset($_GET['g'])) { $thisgroup=htmlentities($_GET['g']); $_SESSION['group']=$thisgroup; } } //if (isset($_SESSION['group'])) {} $query="select * from groups"; $stmt11=$conn->prepare($query); $stmt11->execute(); $g_check=$stmt11->rowCount(); $fetch=$stmt11->fetchAll(); if ($g_check>0) { foreach ($fetch as $row) { $aglist.="<span float='right'><td border='solid 2px #'><a href='group.php?g=".$row['name']."'><img src='group/".$row['g_id']."/".$row['logo']."' alt='".$row['name']."' title='".$row['name']."' width='50' height='50'>{$row['name']}</a></td></span>"; } } $sql1="select gm.*, g.* from gmembers as gm left join groups as g on g.creator=gm.mname where gm.mname=:session "; $stmt1=$conn->prepare($sql1); $stmt1->bindValue(":session",$_SESSION['uname']); $stmt1->execute(); //$g_check1=$stmt1->rowCount(); $g_fetch=$stmt1->fetchAll(); $sql="select gm.*,g.* from groups as g left join gmembers as gm on g.name=gm.gname where gm.mname=:session_uname "; $stmt=$conn->prepare($sql); //$stmt->bindValue(":session",$_SESSION['group']); $stmt->bindValue(":session_uname",$_SESSION['uname']); $stmt->execute(); $fetch1=$stmt->fetchAll(); $g_check1=$stmt->rowCount(); if($g_check1>0){ foreach ($fetch1 as $row) { $mglist .="<td border='solid 2px #'><a href='group.php?g=".$row['gname']."&v=".$_SESSION['uname']."'><img src='group/".$row['g_id']."/".$row['logo']."' alt='".$row['gname']."' title='".$row['gname']."' width='50' height='50'>".$row['gname']."</a></td><br><hr>"; } } if(isset($_SESSION['app'])){ $_sql="select count(pm_id) from private_message where (receiver=:sess_uname and has_replies='1' and sread='0') limit 1"; $stmt=$conn->prepare($_sql); $stmt->bindValue(":sess_uname", $_SESSION['uname']); $stmt->execute(); $numrows_n=$stmt->fetch(); if ($numrows_n[0]>0) { $pm_n="<a href='private_message.php?u=".$_SESSION['uname']."'><span style='background: white; height:30px; width:30px;'><img src='img/email153.png' alt='private_message'></span></a>"; } else { $pm_n="<a href='private_message.php?u=".$_SESSION['uname']."'><img src='img/email153.png' alt='private_message_alert'></a>"; } $sql="select count(friend_id) from friends where friend_two=:sess_uname and accepted='0'"; $stmt1=$conn->prepare($sql); $stmt1->bindValue(":sess_uname", $_SESSION['uname']); $stmt1->execute(); $request_count=$stmt1->fetch(); $count_friend=$stmt1->rowCount(); if($request_count[0]>0){ $new_friends="<a href='all_notifications.php'><span style='background: white; height:33px; border-radius:10px; width:30px;'><img src='img/users.png' style='height:25px; width:27px;' alt='new_friends_alert'></span></a>"; }else{ $new_friends="<a href='all_notifications.php'><img src='img/users.png' style='height:25px; width:27px;' alt='new_friends_alert'></a>"; } echo ' <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Protected Area.</title> <link href="http://localhost/project/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> <link href="http://localhost/project/css/custom.css" rel="stylesheet" type="text/css"/> <link href="http://localhost/project/css/jquery.fancybox.css" rel="stylesheet" type="text/css"/> <script src="http://localhost/project/js/jquery-1.11.3.js" type="text/javascript"></script> <script src="http://localhost/project/js/bootstrap.min.js" type="text/javascript"></script> <script src="http://localhost/project/js/custom.js" type="text/javascript"></script> <script src="http://localhost/project/js/respond.js" type="text/javascript"></script> <script src="http://localhost/project/tinymce/js/tinymce/tinymce.min.js" type="text/javascript"></script> <script src="http://localhost/project/js/tinymce.init.js" type="text/javascript"></script> <script src="http://localhost/project/js/jquery.fancybox.js" type="text/javascript"></script> <link type="text/css" rel="stylesheet" href="css/jquery-ui.css"/> <link type="text/css" rel="stylesheet" href="css/jquery-ui.structure.css"/> <link type="text/css" rel="stylesheet" href="css/jquery-ui.theme.css"/> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js" type="text/javascript"></script> <script src="js/store.min.js" type="text/javascript"></script> <script src="js/jquery-idleTimeout.js" type="text/javascript"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div class="row"> <header class="header-custom visible-phone visible-tablet visible-desktop"> <div class="head-col-left-custom ">LOGO!</div> <div class="head-col-middle-custom"> <table> <td > <tr class="pull-left"> <input type="text" name="search" class="pull-left input-custom1 search" width="50%" height="30" placeholder="Search by First , Last or username or group name"> </tr> <br> <tr> <div mysearch="mysearch" id="result"> </div> </tr> </td> <td> </td><td class="pull-right"><a href="home.php?u='.$_SESSION["uname"].'">'. $_SESSION["uname"].'</a> | '.$pm_n.' | '.$new_friends.'</td> <td ><div class="dropdown"> <button type="button" class="btn btn-danger dropdown-toggle pull-right" data-toggle="dropdown" aria-expanded="true" >Settings<span class="caret"></span></button> <ul class="dropdown-menu"> <li><a href="http://localhost/project/all_notifications.php" >All Notifications</a></li> <li><a href="http://localhost/project/create_group.php" >Create a group</a></li> <li role="separator"class="divider" ></li> <li><a href="http://localhost/project/options/logout.php" >Logout</a></li> </ul> </div> </td> </table> </div><br> </header> </div> <br> '; } else { error_reporting(0); echo ' <doctype html!> <html> <head> <meta charset="UTF-8"> <title>Activation Area.</title> <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"/> <link href="css/custom.css" rel="stylesheet" type="text/css"/> <script src="js/jquery-1.11.3.min.js" type="text/javascript"></script> <script src="js/jquery-ui.min.js" type="text/javascript"></script> <script src="js/bootstrap.min.js" type="text/javascript"></script> <script src="js/custom.js" type="text/javascript"></script> <script src="js/respond.js" type="text/javascript"></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div class="row"><header class="header-custom1 visible-phone visible-tablet visible-desktop"> <div class="head-col-left-custom hidden-xs ">LOGO!</div> <div class="head-col-middle-custom1"> <form action="includes/login.inc.php" method="post"> <tr><td>Username: <input type="text" required placeholder="Username" class="input-custom input-group-sm input-sm" name="unamel"> </td></tr> <tr><td>Password:<input class="input-custom input-group-sm input-sm" type="password" name="passl" required placeholder="Password"> <input type="submit" name="submit-login" value="login" class="btn btn-warning btn-danger-custom"> | <a href="forgotpass.php">?Forgot Password</a></p></td></tr> </form> </div> </header> </div> '; }
  22. @requinix yes, it is defined. turned error_reporting to E_ALL as suggested in header. and got a few mysql query errors.So, troubleshooted them. thanks@mac_gyver. still there are some bugs in the code even though yours is the best answer im going to keep the thread open till i troubleshoot them all@mac_gyver.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.