Jump to content

Ex1t

Members
  • Posts

    28
  • Joined

  • Last visited

Ex1t's Achievements

Member

Member (2/5)

0

Reputation

  1. Im using this query for login in standard PHP. $sql = 'SELECT * FROM admin WHERE username = "$username" AND password = "$password"'; $run_query = mysqli_query($con, $sql); $check_query = mysqli_num_rows($run_query); if(!$check_query) { echo 'Failed'; } else { echo 'Success'; } How should look that query in OOP? Im just started with OOP, I successfully created a connection with database in PDO, so now I have problem with this login query Im just missed category, sorry moderators, please move..
  2. Bump.
  3. Because im using fancybox for zoom When someone click on image, image zooms and title attribute is description or in my way like and share buttons
  4. <?php .... $sql="SELECT * FROM `images` ORDER BY `id` DESC LIMIT $start,$end"; $rdata=mysqli_query($conn, $sql); while($res=mysqli_fetch_array($rdata)) { $imgname=$res['image']; $path = 'img/'.$imgname; ?> <img src='<?php echo $path; ?>' height="500" width='500' alt='<?php echo $imgname; ?>' title='<div class="fb-like" data-href="http://site.com/<?php echo $path; ?>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>'> <?php } ?>
  5. This is my code for facebook like and share <img src='<?php echo $path; ?>' height="500" width='500' alt='<?php echo $imgname; ?>' title='<div class="fb-like" data-href="http://mysite.com/<?php echo $path; ?>" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>'"></iframe> Now $path is location to image, $imgname is name of image When I look image for first time I can see like and share button, but when i do it again, i cant see like and share button.. Why?
  6. I need progress bar in javascript for php cURL This is my code $url = 'www.site.com'; $list = array("ext.pdf", "ext_1.pdf", "ext_2.pdf", "ext_3.pdf", "ext_4.pdf"); foreach($list as $lists) { $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_URL, $url.$lists); $result = curl_exec($ch); curl_close($ch); if (preg_match("/200 OK/", $result)){ echo "<p>$url$lists</p>"; } else if (preg_match("/401 Unauthorized/", $result)) { echo "<p>$url$lists</p>"; } } Can someone help?
×
×
  • 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.