PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Dec 12, 2017 12:16
Hello. I am using Facebook sdk 5 with php and i have set the parametters to retrieve the country

$response = $fb->get('/me?fields=id,name,email,first_name,last_name,location', $accessToken->getValue());

However when i do
$me = $response->getGraphUser();
echo "Country: ".$me->getProperty('county')."<br>";

Nothing is being displayed.
Sep 20, 2017 16:12
@Gordon Assuming i want colorbox to be linked to every image with the class photos, i have to do something like

$("body").on("click", ".photos", function(event){

$(".photos").colorbox({rel:'photos', transition:"fade"});

});

Now if i want colorbox to be linked to every article with the class other_pictures i will have to copy the same code and replace photos with other_pictures, therefore i will have something like

$("body").on("click", ".other_pictures", function(event){

$(".other_pictures").colorbox({rel:'other_pictures', transition:"fade"});
Sep 20, 2017 11:41
@Gordon Tks. What i want to do is to have in image called like class='photos_1' and another images called like class='photos_2' without copying the entire javascript code and replacing photos with photos_1 and photos_2. Can you help with that ?

@JayIsTooCommon Not interested in your nuts lol. Help me out here
Sep 20, 2017 11:39
Tks @Gord
Sep 20, 2017 11:07
anywhere there is photos it will be a variable ?
Sep 20, 2017 11:07
Hello . I am usiing colorbox to view images that have class named photosx with x being a number
```
$("body").on("click", ".photos", function(event){

$(".photos").colorbox({rel:'photos', transition:"fade"});

});

```

is it possible to call the class with php automatically and generate it in javascript without copying always the same code

something like

```
Sep 8, 2017 14:02
Hello Everybody. Please is there a way of displaying images that have failed to upload during an upload ? Is there a way of showing those images using a local url from php after the upload has failed ?
Jun 10, 2017 19:01
?
Jun 10, 2017 19:01
How to configure easyphp to access a website with virtual host at www.mywebsite.com
Jun 10, 2017 19:01
Hello
Jun 10, 2017 18:17
has somoene been able to do that ?
Jun 10, 2017 18:17
I am trying to use virtual Host with easyphp to access a local website on another pc but i get a configuration error with virtual host
Jun 10, 2017 18:16
Hello Everybody
May 23, 2017 11:47
can someone here help me find out why ?
May 23, 2017 11:47
May 23, 2017 11:47
Here is a link to one of my articles
May 23, 2017 11:47
I Have read every single post on facebook graph but still the image in my facebook graph is not displaying
May 23, 2017 11:47
Hello eVERYBODY
Apr 5, 2017 17:17
@PeeHaa And the Great ape @Leigh Thank you all
Apr 5, 2017 17:16
@PeeHaa U guys here are interesting :D Ok i have fixed my problem. Thank you all but now HOW do i test my website on a slow internet to find out whether it is slow or not and correct it ? Is there a tool ?
Apr 5, 2017 17:13
@PeeHaa Lol Please is there a way i can test the speed of my pages ? Because they look fast where i am but it seems you find it slow ?
Apr 5, 2017 17:09
Can somebody help me solve it please ?
Apr 5, 2017 17:08
Hello Everybody. On my website there is this particular page where when i visit, the cursor is automatically placed on the first input field which is under the text. As a result when you visit the page, the page will automatically scroll down before scrolling up. How to deactivate that ? I have looked for everywhere where there is .focus(); to remove it but i dont now what i am missing. PLease this is the page

https://holyunions.com/how-to-use-this-website-language-en-tab-7
Dec 22, 2015 06:25
Good Morning. Please How to use echo with mysqli_stmt_fetch. For example if i have while( $rs = mysqli_stmt_fetch($stmt))
{

printf("%s %s\n", $col1, $col2);

}

and i would like to show $id with an echo instead of printf with mysqli_fetch_assoc i would have done something like $id=$rs['id']; echo $id.

How to do the same thing with mysqli_stmt_fetch ?
Dec 17, 2015 19:53
@Danack Thanks
Dec 17, 2015 19:41
if i put in limit 1
Dec 17, 2015 19:41
So for the binding of parametter i get an error
Dec 17, 2015 19:41
try {
$sql = 'SELECT * FROM items WHERE id > :last_id ORDER BY id ASC LIMIT 0, :limit';
$query = $pdo->prepare($sql);
$query->bindParam(':last_id', $last_id, PDO::PARAM_INT);
$query->bindParam(':limit', $limit, PDO::PARAM_INT);
$query->execute();
$list = $query->fetchAll();
} catch (PDOException $e) {
echo 'PDOException : '. $e->getMessage();
}
Dec 17, 2015 19:40
this is the original code in pdo which i want to convert into a procedural
Dec 17, 2015 19:40
The fact is that i am trying to bind parametter and I want the bound parametter to each time replace the other one. I am doing a loading on scroll
Dec 17, 2015 19:36
This is what i did to get that error $stmt = mysqli_prepare($connection, "SELECT * FROM items WHERE id > ? last_id ORDER BY id ASC LIMIT 0, ?");

/* bind parameters for markers */
mysqli_stmt_bind_param($stmt, $last_id, $limit);
Dec 17, 2015 19:36
Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given
Dec 17, 2015 19:36
Hello I am trying to bind some parametters to a mysqli request and i get the following error message
Dec 17, 2015 12:32
@Danck Thanks. I think maybe i did not rephrase my question well. I have the same problem and can not scroll up. What i wanted was how to bind a parametter in a procedural way because i read the php.net documentation and what i did is not working
Dec 17, 2015 12:23
So can you help me find out how to get that done please ?
Dec 17, 2015 12:22
@Peehaa And I want to keep only one connection to my db in my script
Dec 17, 2015 12:21
@Gordon My whole script is based on a procedural function . If i am to go with pdo then i will have 2 connection opened, my procedural one and my pdo one
Dec 17, 2015 12:20
But in a procedural way not with PDO because I not much conversant with it and have already developped my whole script with a procedural connection
Dec 17, 2015 12:19
@PeeHaa Yes I need to bind the parametters just as in the code i pasted previously. The parametters from last_id and limit
Dec 17, 2015 12:18
$stmt = mysqli_prepare($link, "SELECT * FROM items WHERE id > ? ORDER BY id ASC LIMIT 0, ?")
Dec 17, 2015 12:18
by following the manual i did this
Dec 17, 2015 12:17
Yes this is what i did so far
Dec 17, 2015 12:17
Yes actually I have already read the manual but I did not understand how to get it done
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Aug 8, 2016 14:40
Can someone help me find out why the text under the div is not being displayed ?
Aug 8, 2016 14:39
This is a jsfiddle of my problem
Aug 8, 2016 14:39
I am unable to display the text under a div and i can't tell why the text is not being displayed immediately under the div
Aug 8, 2016 14:39
Hello
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Jan 8, 2016 10:03
Hello. I am using Jquery lazy load and scroll to load but it creates a conflict without displaying any error . Has somebody experienced the same issue ?