Currently, I am working on a Wordpress project where I want to showcase a dynamic path to the current page. For example, something along the lines of: Home / Blog / Post - Name. Since this is within a blog page, static HTML won't work as the path is consta ...
My array contains states with key-value pairs representing companies. I need to sort the array for each state in descending order based on the company's value, with the highest value company listed first and the lowest value company listed last. arr ...
I've set a header image for my woocommerce email settings, but I only want it to display in some emails and not others. Does anyone know how I can achieve this, specifically for the 'new order' notification? ...
I am trying to make an Ajax request for a URL like this: $.ajax({url: "http://techparty.ir/e.php", success: function(result){ $("#div1").html(result); }}); However, I encountered the following error: XMLHttpRequest cannot load http://techpar ...
Recently, I have been using a code snippet to scrape valuable keywords from Google: $data=file_get_contents('http://clients1.google.com/complete/search?hl=en&gl=us&q='.$keyword); However, my script has started experiencing some errors. It's sho ...
I currently have PayPal Payments Advanced set up with hosted checkout pages. On the initial page of the paylinkpro.paypal.com site, users are presented with two options: Everything functions properly when a user chooses "Checkout w/ PayPal." However, I am ...
When processing orders, different text strings are returned based on the shipping method selected. Examples of these text strings include: productmatrix_Pick-up_at_Store productmatrix_Standard productmatrix_3-Day_Delivery productmatrix_Pick-up_at_Store_-_ ...
I encountered a quirky issue while working with Laravel 5.2. I have a chunk of text that I'm attempting to display using some explode functions. The strange part is, Laravel is rendering it oddly by adding incorrect ':' before the end of the ...
Embarking on my first website development project from scratch, I took on the task of handling front-end, back-end, and database integration. Utilizing the ZURB Foundation Framework (ZURB Template), I structured my project to be modular with Webpack4, Babe ...
After successfully developing an application with Laravel and implementing Laravel Auth for authentication, everything worked perfectly on my local server. However, when I decided to host the application online, I encountered a major issue. Despite input ...
I am facing an issue where I am unable to display the full image stored in the Image field of the database. Currently, only a partial image of 63KB is being displayed. Here is the code I am using: $sql='SELECT Photo FROM Personel WHERE ID_USER = '.$id; ...
Currently, I am working on building a forum application that involves users, posts, and comments using Laravel. However, the next step in my project requires integrating Angular, which is new territory for me and I'm not sure where to start. I have a ...
<div id="invite_popup"> </div> $(".invite_button2").click(function(){ var file_id = $(this).data("id"); //alert(file_id); var popup2 ='<div i ...
Here is a snippet of HTML code to work with: <ul id="tree"> <li> <a href="">first</a> <ul> <li><a href="">subfirst</a></li> <li><a href=""> ...
Recently, I encountered an issue with the code below that takes information from a form and sends it to MySQL. Previously, everything was working fine for category, contents, date, and user ID fields. However, after adding a new column called 'seclevel' in ...
I have a JavaScript code that retrieves information and displays it in a div. It's functioning properly, but I want to dynamically change the div id based on the returned data. For example: function autoSubmit3() { $.post( 'updatetype.php', ...
When working in the Yii MVC framework, I decided to add a new column to my database model using the following code: $success = Yii::app()->ft_website_prod->createCommand()->addColumn('ft_website.users', 'columnname', 'varchar(64)'); Now, I am f ...
I'm trying to send data from one PHP site to another. On the first site, everything looks good. The string appears as --show="author,book,text/n However, when I check the string after receiving it on the second site, it shows --show="author,b ...
I am facing an issue with Joomla search results appearing on the home page instead of a new page. I have tried to modify the mod_search.php file by setting the item id to 0 as suggested in online posts, but unfortunately, the changes are not reflected in t ...
I'm facing an issue that I need help resolving. My challenge is to transfer data from a form ROW to a php file. Below is the initial PHP code (embedded within an echo statement where values are fetched from a MySQLi query): <form id="comedivid" met ...
I am new to the development field and have a question about jQuery. I want a single button to perform two different actions. For example, let's say we have a button labeled Pause/Resume. When I click on the button, it should first display "Pause", and th ...
I have successfully tested my application module and another module separately. However, I would like to run all tests (both for the application module and the other module) together in order to generate a clover report for Jenkins. What steps should I tak ...
Utilizing Jquery Form for an Ajax image upload. This is the relevant HTML code: <div class="input_con imageupload_con"> <form action="processupload.php" method="post" enctype="multipart/form-data" id="MyUploadForm"> < ...
After implementing Laravel to handle an AJAX post request, I encountered an issue with displaying the route data. public function infoRoute(Request $request) { // Extracting required information $ship_id = $request->ship_id; ...
What is the difference between using a hidden field and a header in web development, and why would you choose one over the other? When do we use X-XSRF_TOKEN? And when do we use X-CSRF TOKEN? ...
I am experimenting with using the __call function for pre-action instructions. The issue I am facing is that the __call function only works once, but I need it to be triggered every time the run() method is called. When I call $second_child->run() ins ...
I'm currently utilizing cURL to send requests to the Plesk API. Whenever I attempt a request that involves extensive processing by Plesk (like creating or deleting a subscription), I encounter a "connection was reset" error in my browser after approx ...
$query = mysqli_query($con,"SELECT position FROM employees WHERE id ='$empId' AND password = '$empPassword'"); echo ($query); This snippet of code searches for the employee's position in the database and then echoes it out. ...
Utilizing AJAX to send a request to another php page and retrieve the result of a query, I originally used xmlhttprequest to pass the php logic along with the query information. However, I wanted to separate the presentation logic from the actual code logi ...
Managing soft deletion of departments when a company is soft deleted can be tricky. The current implementation involves iterating through each department associated with the company and soft deleting them. However, it seems that only the first department i ...
Can anyone help me figure out how to send multiple data with a POST request? Here's what works: $data = array( 'post_params'=>[ 'Name'=>'Foo', 'LastName'=>'Bar' ] ); But when I try this, it doesn't work. Any suggestions? $data = array( 'pos ...
Currently, I am diving into the world of WordPress theme development by adapting my existing Bootstrap and JavaScript website. My requirements are as follows: 1) Implement a section on the homepage of my WordPress site to display the latest three blog ar ...
I am experiencing an issue with my Laravel 5.2 and PHP7 setup on my hosting server. Everything seems to be working fine, except for the links that are supposed to generate and download xlsx files using Laravel Excel. Whenever I click on these links, I enco ...
Even though I know PHP is a server-side script and JavaScript is client-side, I encountered an issue. I struggled to bypass browser security when making an AJAX request to another domain. Feeling lost, I decided to turn to PHP for help. The challenge I f ...
The code retrieves user input and searches a database field called tags. Within the tags field, there is data such as hello, hey, how, happy, hell stored in a single cell or string. I attempted the query below, but it only seems to work for "hello" and n ...
Passing a variable value from one page to another is proving to be a bit tricky for me. I am using a link to navigate to the next page and trying to retrieve the value using Session, The link variable seems to be working fine but the price variable is cau ...
Here is the structure of my database: 'Article' title text user_id language_id 'User' id language_id 'language' id language name Is it best practice to store a list of languages in a MySQL database? I am a desig ...
I encountered an issue while working with the Facebook authentication module. I was attempting to log in using Facebook, but it appears that it's not functioning correctly. After clicking the login button, it prompts for permissions on the Facebook site an ...
I have a result table displayed on the left side https://i.stack.imgur.com/otaV4.png https://i.stack.imgur.com/pp9m0.png My goal is to transform it into the format shown on the right side of the table In a previous inquiry found here, @Clayton provided ...
While browsing through a website on Chrome, I noticed that one of the items loaded in the network tab of ChromeDev Tools is a JSON file. I tried using file_get_contents to retrieve this JSON file but all it returned was the HTML content of the webpage. I ...
My PHP update page allows me to modify a website's database that contains YouTube embed codes. However, when I try to edit the embed code on the update page, only "<iframe width=" displays instead of the complete original code. <html> <? ...
Trying to remove an entry or offer from the database and then return to the page with all entries/offers. Attempted using Javascript, but it successfully deletes the item without redirecting to the overview page. Is this the correct approach with Javascri ...
I am just starting with ajax concepts... When I post data using ajax, only the first array from the foreach loop gets posted. Here is the code snippet: <tbody id="presentor"> <?php if(!empty($data)):?> <?php $counter = '0'; foreach ($dat ...
There are two tables I'm working with: one called "meeting" and the other called "attendance". The "attendance" table is a many-to-many relational database structured as follows: Attendance: user_id | meeting_id | invited --------+----------- ...
I want to retrieve rows by their id and display the information. My table is called text and here's its structure: BookID Type init Title Author PublisherName CopyrightYear This is how I plan to access them: text id 10 With this command, I can fetch ...
Struggling with inherited PHP MVC code for a website, I encounter an issue on a specific page where unwanted code is echoed out. To prevent this, I aim to skip the echoing when a specific templateID (which I set as default) is selected. However, I'm unsure ...
I have a great tool on my website that displays different pages based on user input. Here is the code for it: if(isset($HTTP_GET_VARS['mod'])) { $page = $HTTP_GET_VARS['mod']; } else { $page = 'home'; } switch($page) { case 'home': ...
I am currently testing a URL http://localhost:8000/2.php?site=https://google.com<script></script> Next, I proceed to sanitize the "site" parameter: $site = filter_input(INPUT_GET, 'site', FILTER_SANITIZE_URL); var_dump($site); // str ...
example.html (contains an extensive table with hundreds of files making it impossible to list all as arrays):- <table> <tbody> <tr> <td class="book"><a class="booklink" href="../file1.pdf" >Book1</a></td ...
Currently, I have a script that utilizes JSONP for conducting cross domain ajax calls. While it is functioning effectively, I am pondering if there is a method to hinder other websites from accessing and retrieving data from these particular URLs. My goal ...
Could this be done? $d=date("D"); ... else if ($d=='(Thu|Fri|Sat)') { I have managed to make it work for one day of the week. if ($d=='Wed') { Thank you ...
I'm facing a problem with conflicting jQuery and Bootstrap files in my header.php code. Whenever I include the jQuery file before the bootstrap.js file, it causes issues with the tabs on my website where clicking on them does not navigate me to the correct ...
After successfully implementing the code snippet below to retrieve blog posts based on a query, I encountered an issue when attempting to fetch documents that match specific categories. $params = [ 'index' => 'blog', 'type' => 'p ...
Encountered an issue with the following line of code while running on a server with PHP7.4: public function expiresAfter(int|DateInterval|null $time); Received a ParseError indicating that PHP was expecting a variable. Unable to find information about th ...
I'm trying to integrate a PHP variable into my PayPal single payout call code where the price is defined at 'value':".$planPrice." When I manually input a number like "1000", it works fine and I receive the notification. However, when I use the PHP variabl ...
I have a table with headers that include the id and name of individuals. Additionally, there are multiple tables containing specific details about each individual, such as phone number, address, gender, birthplace, etc. How can I construct a SELECT comman ...
Whenever I attempt to insert a single post into the database using wp_insert_post(), two posts end up getting added: Ajax request: /wp-admin/admin-ajax.php?action=getchats&chat_type=all-chat&last_msg=110&add_msg=true&chat_message=hellow ...
function CustomQuery() { $arguments = func_get_args (); if (sizeof ($arguments) > 0) { $query_string = $arguments[0]; for ($index = 1; $index < sizeof ($arguments); $index++) $query_string = preg_replac ...
I am facing a challenge where I need to dynamically load a PHP file into a DIV element upon clicking a button, all without the page having to reload. If you refer to the 'Jsfiddle' document linked below, you will find further details and explanations: ht ...
Having an issue with my PHP script that is fetching results from the localhost WAMP server. When I print out the query, each record is being displayed twice! Check out the screenshot below for a visual representation: This is the PHP MySQL script: <? ...
$result = mysql_query("SELECT * FROM $tableName WHERE id=1"); $array = mysql_fetch_array($result); $help_name = $array['name']; $req = $array['req']; //fetch result echo json_encode($help_name); Issue arises when the result is ...
Hey there, I have a PHP daemon set up to manage requests from RabbitMQ. However, after running for a day, it stops functioning due to encountering the error "MySQL has gone away." PHP Warning: PDOStatement::execute(): MySQL server has gone away in /var/ ...
Recently, there has been quite a bit of discussion surrounding this topic and I have immersed myself in research over the past few days. When running the PHP script that executes the Python script from the command line, everything functions properly (show ...
How can I create a dynamic table in PHP that can handle any generic array with different keys and values, including nested arrays? I want to use the same table structure for various arrays regardless of their content. Any advice on achieving this flexibili ...
I recently completed coding a text adventure using functions like fgets(STDIN) that works in the command line. Now, I want to convert it to run on HTML (internet browser) but I'm facing a challenge. I am unsure how to transition from this: $choose=0; whi ...
My website is experiencing an unexpected redirect issue where it keeps directing from www.mydomain.com to mydomain.com. Despite being a Wordpress Multi User installation, there is nothing in the .htaccess file that would trigger such redirection. I have t ...
I am facing an issue with fetching records from my 20 tables which each contain over 5000 records. The data fetching process is extremely slow and instead of displaying the data, I am getting the following error: Fatal error: Maximum execution time of 3 ...
I am in the process of implementing a login panel on my index page. The login data will be sent via an ajax call. Upon successful verification of the username and password, I am storing the user data in a session and then reloading the index page upon ajax ...
While testing a shopping site I created, I encountered an issue with changing the banners at the top of the page based on the category the user is viewing. This site is hosted on a server on my localhost, not using wordpress by the way. <div class=" ...
I am looking for assistance with a signature capture form. I came across a standard template on Github that works perfectly, but I wanted to customize it further. However, my Javascript skills are still in the early stages. The current code allows you to c ...
I am currently working on creating a gallery of images using php and css. The images are placed in an unordered list as shown below: <ul style="list-style-type:none;"> <? while($data=mysql_fetch_row($result)) { $pic=$data[2]; if ($pic) { $ ...
This is an example of an xml file structure: <participants> <participant> <number>1</number> <name>toto</name> </participant> <participant> <number>2</number> <name>ti ...
Have you heard about the handy tool in php that allows you to archive php files in "phar" format for easy distribution and installation? This tool can create a single "phar" file of an entire php folder. http://www.php.net/manual/en/intro.phar.php Additio ...
In my PHP page, I have a list displayed using the following script: <div id='demo' style="padding-left:20px"> <select name='lists[]' multiple='multiple' class='multiselect' > <?php $sql="select list_id,list_name from tbl_list"; $result=my ...
I am struggling to run a PHPWord script. When attempting to execute the sample example Text.php, it does not display anything. I have verified that the class is loading successfully. You can find more information in the documentation. If anyone has encou ...