I am working with the PayPal API and I am trying to add multiple items to my itemList. My problem is that to make the itemList work, the array needs multiples variables: I am using a loop before, to set-up the items, which I am trying to gather into one variable: It doesn’t work and I think that the pro…
Tag: php
How to get terminal size in Windows 10 (with PHP)
I know that it’s possible to get the terminal size on Linux using the following : $cols = `tput cols`; $lines = `tput lines`; But on windows, the only solution I found is the following: using the …
PHP – Can’t log out and show alert message at the same time
I have a PHP login system where you can delete your account/profile if you’d like to. When the user clicks on the button I want them to be logged out, their account to be deleted and an alert message (JavaScript) saying that their account has been deleted. The problem is that the alert message doesnR…
How do I pass these variables to another php file
I’m currently making a shopping website and I need to be able to pass two variables to the next page, the code may be badly written because I’m new to this, but I’m trying to pass the number from the drop-down menu and the “row[‘pid’]” to another page. As shown below …
WordPress taxonomy last child separated by “en” instead of comma
I’m trying to create a shortcode that outputs my custom taxonomies, separated by a comma, but i want the last comma to be “en” instead of a comma. So like this: taxonomy, taxonomy, taxonomy en taxonomy So far i have this: Answer As I dont have an example of the $terms or $entry_terms variabl…
How do I redirect the user to the last active page when they login due to session time out using php? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I have built a little software using Vanilla PHP, I have implemented autom…
Split VAT into segments based on Country code
What is the best wat to split any VAT number into segments? First part is the country code, is always 2 alphanumeric. Second is the remaining number. For example: NL820471616B01 should be split to NL and 820471616B01 BE0824148721 should be split to BE and 0824148721 ATU12345678 should be split to AT and U1234…
How to redirect PHP page on MySQL database connection failure
Using MySQLi connection method I am trying to redirect page instead of printing out the error message trying to test this out I change the localhost to localhostszzz but I am getting error message of Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /..…
Link inside form referring to the action of the form instead of the link
I am trying to make the link inside the form go to signup2.php. Instead it is going to loginprocess.php. Is there any way to do this by keeping the signup link inside the form? <form action = &…
How do I insert meta data to my customers in woocommerce using an object array?
Hi I am trying to use the woocommerce API and do post requests of customer data and adding an internal customer ID. Here is my data I have tried to pass this data through a post request Below is the response when I commented out the meta data. But as you can see there is a meta data array. But