Skip to content
Advertisement

Tag: php

Using a for loop to display HTML element using JavaScript

I’m currently working on a project where I have a gallery (Gallery.php) containing a carousel of images, if an image is clicked on, the ImageID (I have set) and the Image URL are added to a 2D array in the localStorage. I am attempting to retrieve the array from localStorage in the homepage (index.php) which works as confirmed by logging

Redirect based on the ?id= parameter in the url

I have a login system that I build in PHP and MySQL. if any of my users log in they get directed to the user.php page I have an authenticate.php page that redirects the user based on their ID to a page. This is the code that adds the id to the URL: header(“Location: user.php?id=”.$id); ) Can I write a

Hide or show input on dropdown selection

I am trying to create a sign-up page for my app. All the code works, but when I try to hide input box based on dropdown select, it doesn’t work. I tried this: But it didn’t work. And this is my code for the signup page: Answer It does work, you only need to place the script underneath the form

Dynamic Div Tags in a While Loop

I have a while loop that populates 4 div tabs (in one parent div) with PHP. I also have a copy-to-clipboard script to copy text from a P tag. Unfortunately, this function works only if the tag and button have a unique Id. So my question is this: How do I assign a sequential Id to my looped P tags?

How to select multiple class class with same name in JS

I use PHP to dynamically render these lists that I fetched from the database, and each one has the same class, because I can’t change it, it renders dynamically. I select these classes via JavaScript and create an event on click to open and close them with the hidden class. Now I have a problem, this event works for me

How to pass order ID to Paypal Button?

I create an order by my php sdk. like this and now i have this order id. but … How to pass order ID to Paypal Button? like this Answer Create two routes on your server, one to create an order (and return the resulting JSON), and one that takes an order id as a parameter and captures it (and

I am trying to use AJAX to change the orderby and order arguments in a WP_Query, but I can’t determine why my code won’t work [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 10 months ago. Improve this question

Advertisement