I have a page which displays data from SQL in a table and on that table one cell is hyperlinked and I want a modal (using bootstrap) to open and fetch data using the ID (the hyperlink value) and …
Tag: php
Syntax for multiple “or” statements to set a CSS class
I’m quite new to PHP. The problem statement is, I need to insert a CSS class into the nav on specific pages. Here’s the way I have it now: It works but it feels messy. I’m going to continue to research it (perhaps a switch statement is better?). Is there a cleaner way of doing this? Answer I…
How to convert a grayscale image to pure black and white in php?
I’m trying to convert a grayscale image to pure black and white in PHP using the GD library. The purpose would be to detect the cervical cells within the image. I’ll leave the PHP code and a MatLab one (I wrote this code in MatLab and I’m trying to obtain the same result in PHP). Basically, …
increment value of i is not working properly
I am not able to understand why value of i is not setting to zero and it’s behaving like this st the start of both form value of i is set to zero but not getting the desired out in html form output is showing as result i want should be something like Answer First it should be <?php $i
WordPress Ultimate Member Profile pic Scaled Images
We are using the Ultimate Member plugin and on our members directory page we have the profile images. The default profile image is 190×190 and on upload saves a 80×80 version. On the directory pages it is pulling in the 190×190 image rezising it to 80×80. I want to be able to pull in the 8…
Docusign PHP SDK resending envelope with Demo Account updates the envelope but no email is sent
I am trying to resend an existing envelope that a user may have mislaid or otherwise not received. The API is updating the envelope with the request, but is not resending the email. I am receiving a …
Pass data to javascript but got so many backslash
I’m passing data from my controller to javascript. public function index() { $events = Eventcalendar::get()->pluck(‘event’); return view(‘eventcalendar.index’,compact(‘events’))…
how to add a link that its “href” is editable in word press panel?
Is there a way to create a link in theme file that its href value is editable in wp panel? e.g. <a href="”>view some page // wp_editable_link() is …
Running PHP locally with Ubuntu
I am using Ubuntu 18.04 on Google Cloud Platform and I’m trying to run a test file called login.php. The path is /var/www/login.php. Whenever I try running it, I use sudo php -f /var/www/login.php then check http://localhost/var/www/login.php on my web browser. However, my web browser returns with This …
How to use WooCommerce is_shop conditional tag excluding searchs results
I have a function that uses the conditional tag is_shop. The function is intended to display a widget on the shop page only. However, it also returns the widget when a search is performed. Is there a way to only return it on the shop main page. My code is: I’ve tried using is_page as well with no joy. A…