Having just started with CI, I am currently working on developing an e-commerce website. However, I am facing challenges when it comes to adding products to the cart. Below, you can find the code for both the Jscript and controller that I have been using. ...
I am currently working on building a binary tree using PHP, MySQL, and a jQuery plugin developed by Frank-Mich. Here is the progress I have made so far... DATABASE STRUCTURE CREATE TABLE IF NOT EXISTS `members` ( `id` int(11) NOT NULL AUTO_INCREMENT, ...
I am working on a PHP code with MYSQL. It involves selecting data from the database using a dropdown list with AJAX and displaying the results on the screen. I have three dropdown lists that are dependent on each other and each dropdown has its own table t ...
I'm working on accessing a database located on a server that I only have Remote Desktop access to. What steps do I need to take in order to query this database using my php web application? ...
Running phpDocumentor version 1.4.4 on Fedora 24. Executing command line: phpdoc -d ./docsrc -t ./output Initially, I successfully generated documentation for my project, but subsequent updates do not reflect in the output. Even after adding docblocks to ...
I'm having some trouble with my code and I keep encountering this error message. Any ideas on what might be causing this issue? I believe I've properly escaped all the quotations. {"errors":[{"message":"json body could ...
Whenever I attempt to send a post request with json data: { "img":"base64code..." } I encounter two different errors: 2018/04/14 00:43:21 [crit] 2737#0: *1770 open() "/opt/bitnami/nginx/tmp/client_body/8/01/0000000018" failed (13: Permission ...
After a long break from working with PHP, I recently encountered an issue with an older website I built using PHP and the include function. The site was functioning perfectly until the web host updated PHP to version 5.5, causing a strange bug where it see ...
Currently, I am working on an online campaign management system that utilizes Twilio. Each campaign in the system will have a unique Twilio number and target number. When a call is made to a specific Twilio number assigned to a campaign, it will be forward ...
How can I display an HTML tag as text on screen, rather than in code format? I want readers to be able to easily read the tag itself. What is considered the best practice for achieving this? print htmlspecialchars('<meta name="copyright" content="© ...
HTML Code <div id="subnavigation"> <?php $verbindung = mysql_connect("host", "user" , "pw") or die("Verbindung zur Datenbank konnte nicht hergestellt werden"); mysql_select_db("db") or die ("Datenbank konnte nicht ausgewählt w ...
UPDATE: I just wanted to express my gratitude for all of your support, everyone. The issue was on the server side, but it has been successfully resolved and my website is now back up and running smoothly. Please take a moment to visit www.bestlappyforme.t ...
I am in the process of setting up a file server that currently serves downloadable files such as .doc and .zip perfectly using X-Send. Is it also possible to use X-Send for serving text-based (css/javascript) or image files? I believe this method is quite ...
I am currently developing a straightforward mobile application that utilizes a database to store various types of content, including images. I have implemented ajax requests to retrieve this information and display it within the app. However, I am encounte ...
Is there a way to retrieve all the SKUs for a Product in Stripe through a query? Additionally, I would like to filter that set based on a specific value of a metadata field. Is it feasible to achieve this? Scenario I am managing voucher codes (differen ...
I am facing multiple challenges and working towards finding solutions. I have developed a webpage and now I want to redirect the link to the CSS file based on the user agent. `<script type="text/css" src="style.css"> </script>` However, inst ...
When attempting to assign a JavaScript variable to a PHP variable and output the value in an alert, I am encountering an error. The output is shown as "; alert(simple); var p1sds = "My Custom String"; <?php $dsfd = "<script>document.writeln(p ...
Looking to grasp JSONP. Based on my online research, I've gathered that it involves invoking a function with a callback. Other than that, is the way data is handled and the data format similar to JSON? I'm experimenting with JSONP as shown below, but I'm ...
As a newcomer to programming, I can only describe my script as live, although I know that might not be the correct term. Initially, I developed a bot in php and ran it on xampp locally on my mac, where I could easily print arrays and other content using ec ...
I've used PHP to dynamically create a table with varying numbers of rows based on user input. Each row is supposed to have its values calculated and displayed in the last column when focused. <select name="number" id="number" onchange="document.form2. ...
Looking for PHP help: <?php $website_url = 'domain.com/sitemap.xml'; $xml=simplexml_load_file(''. $website_url.'') or die("Error: Cannot create object"); foreach($xml->url as $val) { echo $val->loc. '<br>'; } My code successfully ext ...
Looking to showcase a custom field meta_key value from WordPress. The information is stored as a custom field meta_key value in WordPress $data = get_post_meta( get_the_ID(), 'data', false); print_r($data); Array ( [0] => [ { "title":&quo ...
Having trouble with getting the Var Dump to display properly and all I see is a white screen. Any advice or suggestions on how to fix this? <?php require('includes/config.inc.php'); require(MYSQL); $aid = FALSE; if (isset($_GET['aid&apos ...
I recently posted a question on Stack Overflow where I received a satisfactory response that is working perfectly. However, I seem to be facing an issue where all AJAX requests stop functioning when the script runs for more than 4 to 5 seconds until the en ...
Having recently started using the Zend framework, I am encountering an issue when trying to update data in the database and grid. Instead of updating a specific row, all rows are being updated. Can someone please assist me with this? Below is my controlle ...
Currently, I am in the process of developing an application that requires the importation of Microsoft Access files. This application is built using PHP, and I followed a specific tutorial to configure the environment (https://gist.github.com/amirkdv/96728 ...
I'm working on creating a split screen view with one grid displaying products from a remote repository, and another grid showing products from a local repository. To simplify things, all I really need help with is incorporating the remote source into ...
Encountering an issue where I am unable to retrieve the XML response. The response seems correct when stored in the PHP variable $lists, but attempting to extract the XML version of the response using _getLastResponse does not display any XML. Below is th ...
Is there a way to save the session value in the search box of appTables by using jQuery? <?php $session = \Config\Services::session(); ?> <script type="text/javascript"> $(document).ready(function () { var searc ...
I have a link containing some data. For example: <li><a href="" onclick="getcategory(this);"><?php echo $result22['category']; ?></a></li> I need this link to pass the value of $result22['category']; to ...
I created a delete form where the user can input the pnum to be deleted and then the corresponding record will be deleted. However, I want the user to be able to preview what will be deleted before confirming. I attempted the following code, but it did not ...
I manage a photo-sharing website and am looking to optimize loading speed by creating image thumbnails. <?php function generate_thumbnail($image, $thumbPath){ $img = imagecreatefromjpeg($image); $width = imagesx($img); $ ...
This is the PHP code I am using: $query=mysql_query("SELECT * FROM product"); $bla = array(); $numOfRows= mysql_num_rows($query); if ($numOfRows >0) { while ($rows=mysql_fetch_array($query,MYSQL_ASSOC)) { //$pro ...
After receiving a response from an ajax call, I am trying to display a Joomla notice. Here is the code: $app = JFactory::getApplication(); $app->enqueueMessage('Joomla notice', 'info'); When rendered on the front end, it appears as follows (please not ...
As a beginner in programming, I am currently working on a small application running on an Android device that requires user-based information from my PHP web server. My strategy involves using JSON for communication between the phone and the server. The p ...
My main goal is... If the expiration date has passed, the script will grant the user an extra day. If the user is not subscribed, their data will be removed. Is there a better way to achieve this? I attempted using INTERVAL 1 DAY, but I am uncertain if i ...
Currently, I am working with php and mysql within my stack. My current project involves designing a page that will showcase details of a mutual fund. The challenge lies in the fact that data for a single fund is spread across 15-20 different tables. To add ...
Currently, I am in the process of developing an application that requires checking for the existence of a product. To achieve this functionality, I opted to utilize jQuery due to its user-friendly nature. However, I have encountered some challenges in veri ...
I currently have a JSON object stored in the database: { "ui": {}, "title": "Hola mundo 2", "values": {}, "properties": {}, "description": "descripcion" } Within the Laravel controller, ...
My resizable div contains text/sentences. As I adjust the size of the div, the text wraps itself to perfectly fit within the available space in the container div. Now, I am faced with the task of converting this dynamic text into an image using php and th ...
Could a specific server configuration be causing the need to force serialize and unserialize blocks? Or is it simply due to a poorly installed PHP on the server? Has anyone encountered a similar situation before? ...
I'm trying to set up an email sending feature via a contact form. I want it to send the email and display a Bootstrap alert confirming that the email has been sent. Below is the HTML code: https://jsfiddle.net/6rfeas35/. Additionally, here is my PHP c ...
I've been struggling to correctly display my partial based on the variable inside my index function. I've experimented with various approaches such as {{ $test }}, "test", and $test in the if statement without success. How can I resolve this issu ...
I have a variety of datetimes stored in my MySQL database, listed as follows: 2016-11-15 10:00:00 2016-11-16 10:00:00 2016-11-17 10:00:00 2016-11-17 12:00:00 2016-11-17 19:30:00 2016-11-20 10:00:00 2016-12-15 10:00:00 2017-11-15 10:22:00 I need to displa ...
I have developed a form that sends me multiple values using the post function. The $_POST[groups] contains values 1, 2, 4, and 8 based on 4 different checkboxes. Similarly, $_POST[retailgroup] includes only the values 1, 2, and 4. I want to combine these v ...
I've implemented the cascading dropdown jQuery plugin available at https://github.com/dnasir/jquery-cascading-dropdown. In my setup, I have two dropdowns named 'Client' and 'Site'. The goal is to dynamically reduce the list of sites based on the client s ...
When working with PHP, I often come across times in the following format: $time = '2015-06-29T16:00:00Z'; My goal is to convert this time into a more readable format like this: Tuesday, December 16, 2015 3:00 PM I attempted to achieve this using the fol ...
My Sample Page features a slider that displays over 200 posts, each containing 5 images. However, the slider loads all the images at once, causing my page speed to be very slow. I am looking for an optimized way to display the slider without compromising l ...
Currently, I am experimenting with cross-site scripting using Jquery and PHP/Symfony (HttpFoundation Component), but I'm facing difficulties in obtaining the necessary data from the server. My objective is to have Jquery fetch JSON from the local dom ...
How can I use AJAX to return two parameters? I have a section in my HTML page with two textareas. <textarea name="input" id="input" onkeyup="handleInput(this.value);}"></textarea> <textarea name="response1" id="response1"></textarea& ...
Imagine a scenario where our website has important counters on every page, making it heavily loaded. These counters are stored in Redis keys that automatically expire in an hour. Within our code, we have a check to see if a key containing a counter exists ...
I am struggling to understand why some of my PHP code is not rendering correctly in an HTML email that I am working on. The following is an excerpt from the code (with most of the HTML elements removed): $messaget = " <html> <head> <title&g ...
Is there a way to rebuild jstree after adding ul/li elements through ajax? Currently, I am initializing the js tree using the html structure of ul li. For example, let's say I want to add an li element with the text "clickme" to the first node. Initially, ...
Let's say I have a table A with a column named json. The json column contains data like this: record 1 : {"dept_code": "012", "unit_code": "22"} record 2 : {"dept_code": "013", "unit_code": "23"} and so on I am looking to retrieve the records from the j ...
Before, my Vue.js app worked flawlessly until I tried putting it into a Vue component. It started throwing the following error: [Vue warn]: Error compiling template. Here's the code for the component (components.php): <script> Vue.component(&ap ...
Encountered a 403 error when making an Ajax request in a Cakephp project. Despite having all permissions granted for the project directory in localhost (XAMPP). Error message: "Failed to load resource: the server responded with a status of 403 (Forbidde ...
$this->loadModel('Menu'); $this->loadModel('SubMenu'); $this->loadModel('SubSubMenu'); $options['joins'] = array( array('table' => 'sub_menus', ...
I am working with the following HTML code: <input type="checkbox" id="perlengkapans" data-stok="[1]" onchange="ambil($(this))"> name item 1 <input type="checkbox" id="perlengkapans" data-stok="[4]" onchange="ambil($(this))"> name item 2 &l ...
Currently, I'm facing a challenge with my local server on Mac 10.8. I am trying to serve files such as videos and images from an external hard drive. The path for the external hard drive is HD: /Volumes/ while the web server's path is /Library/Server/Web/D ...
I have been searching through multiple forums and cannot seem to figure out the issue. The problem I am encountering is related to a website where there are three images with a hover effect. When the page first loads, there is a delay in loading the backgr ...
Hey there, I'm facing an issue with my script that is supposed to save data into the database when a link is clicked. However, I keep getting the following error message: ReferenceError: ajax_object is not defined Below is the script I have on my single- ...
When writing code to download a file and return the status (downloaded bytes), I utilize the file_put_contents method which works effectively. function downloadLink($link,$destination) { $ctx = stream_context_create(); stream_context_set_params($c ...
Currently, I am working on a PHP project that involves creating a table with Bootstrap styling. To achieve this, I referred to a tutorial which guided me through the process. After linking the necessary Bootstrap CSS file using the provided code snippet, ...
Encountering an issue while returning an array object and displaying it to the user in a demo code snippet. The basic snippet resembles the actual long code that cannot be posted here. Class foobar{ public function foo() { return array( 'bar' = ...
Trying to figure out how to dynamically insert a row into an HTML table and then update the corresponding database entry. There's a SQL prepare and execute statement in a separate PHP file, but I need to find a way to include variables inside the execute s ...
Looking to create a WordPress plugin that allows for custom URLs (besides wp-admin.php and wp-login.php). Interested in finding out the necessary hook to achieve this. Thanks! ...
As I work on developing a basic plugin, I encountered the following line of code: echo "<p style="color:red;">Please enter a valid email address!</p>"; I aim to make this plugin easy to localize and internationalize, so I ...
Currently, I am sending a PHP request to a login handler using the following URL: https://example.com/test.php?username=test123&password=hiuhsda3#24 However, I need to retain the hashtag in either the password or username along with anything that come ...
Is there a way to quickly verify in PHP if two arrays contain the same items, even if their order is different? If you are working with integer arrays, you can refer to this solution: How to check if two indexed arrays have same values even if the order i ...
I have been using LessPHP (v0.3.4-2) and I have read the documentation and searched for answers to this basic question, but I am still unable to find the correct and straightforward solution. Below is my .less file: @bgcolor :#ccc; .color(@color:#222) { ...
When I insert text into my SQL INSERT statements and it is stored in the database, the displayed text does not match what was expected. For example: This is the actual text in the database: lažljivo. However, the expected text should be lažljivo (in ...
I am currently using Laravel version "5.8" After installing composer require simplesoftwareio/simple-qrcode for generating QR codes To display a QR code in a view, I am utilizing the following code: {!! QrCode::size(80)->generate('test data'); !!} Ho ...
Is it possible to create a dynamic dropdown menu that displays the available quantity of products in stock? For example, if there are 45 products in stock, the dropdown should show numbers from 1 to 45. However, if 5 products have already been sold out, th ...
I utilized the interact.js library to create this code snippet, which functions perfectly on Chrome, Firefox, and w3schools "Try it Yourself" platform (unfortunately not compatible with Edge and IE for unknown reasons). However, when I include this code wi ...
Hey guys, I'm really stuck on this problem and I can't seem to find a helpful tutorial anywhere. I've got a form with two drop-down menus, each with a "value" attribute. What I want is for users to be able to select an item from both drop-downs, and then s ...