Is there a way to change the class of a li element in a PHP view after it has been clicked? <ul> <li> <a href="<?=base_url()?>home" id="home" onclick="select_class('home');" class="shortcut-dashboard" title="Home">Home</a>& ...
Issue I am looking for a PHP/NodeJS API that can convert editable PDF files to non-editable PDFs online. Our client application requires the user to download PDF files that cannot be modified using software like Foxit Reader or Adobe. We are currently us ...
Experiencing some difficulties with authorizing against Tumblrs API using OAuth. This is the scenario in my callback.php: require_once('../vendor/autoload.php'); // defining essential variables $consumerKey = 'xxx'; $consumerSecret ...
Currently, I am working with Wordpress and a contact form plugin which is based on php. The form provided by the plugin is quite lengthy and my client has requested that the data entered by users should not disappear if they make a mistake and need to co ...
I am currently working on coding where a record needs to be displayed based on the date (Month, Year), for instance: 12-2022. However, with the current code I have, I am unable to achieve this. Can anyone offer some guidance on what steps I should take? ...
I need to send a variable through an AJAX URL to another PHP page and retrieve it using: $id=$_GET['id']; Here's an example where the value is passed, for instance $id=6. <a id="pageid" href="ifsc-bank.php?id=<?=$id?>"><im ...
After a user logs into their account, I want them to be redirected back to the page they were on instead of the members area section. Below is the specific page I want the visitor to see post-login: http://www.localhost.com/folder/this-is-the-restricted- ...
I've been struggling with extracting data from a PHP array for quite some time now. Despite examining multiple examples, my code simply refuses to work and I can't figure out where I am going wrong. A Different Approach in PHP function fetchLatestActivit ...
I have been using this method to automatically fetch user and replies when serializing my object to JSON. However, I am not sure if overriding the toArray method is the correct approach for this. What do you think? <?php class Post extends Eloquent ...
After checking out the latest episode on TechSavy Forums () I was inspired to experiment with CodePen for web development. First, I followed the usual steps for starting a new project: npm init cd project npm install Next, I attempted to access the Code ...
I have implemented a print button for an invoice: </script> <!--Function for printing invoice--> <script> function printpage() { window.print() } </script> <button id="print" name="print" class="btn btn-info" onClick="pri ...
Hey there, I'm facing an issue when trying to update data in my table; instead of updating the existing record, a new one is added. Here is my update method: public function update(CompanyUpdateRequest $request, Company $company) { try{ ...
I have created a custom shopping cart component for my Joomla website. Users are buying codes that we store in our database, which are linked to physical incentive cards. During checkout, I need to retrieve the purchased codes from the database and then up ...
I created a simple form with room equipment options. Here is the code for the form: <form action="javascript:void(0);" method="post"> <fieldset> <legend>ROOM EQUIPMENT</legend> <div class="inline_inputs"> &l ...
I've been struggling to pass UTF-8 text as an argument to a command line program using the exec function in PHP. It seems like there are some issues with character encoding causing trouble. When I run locale charmap from the terminal, it returns: UTF-8 . ...
Recently, I've been utilizing a datetime_picker that I found on the web to create a value for an html text input. However, I encountered a problem in separating the value into distinct date and time components. When using the date_picker, the TEXT inp ...
I am in need of creating a chat module for Contao 2.11. The website contains both standard and custom modules. I am looking to add a global JavaScript file that will load on every frontend URL, as well as an HTML block that can be added to each page. It wo ...
The issue There is a significant delay in the execution of AJAX requests that involve any database queries. This problem has suddenly emerged without any recent updates to the codebase. Interestingly, if the same query is executed on a webpage directly (e ...
I'm currently working on a project that involves extracting data from an SQL database and converting the output of a query (which is a number) into a corresponding color, which is then passed to a JavaScript variable. Essentially, I am using ajax to ...
My website has a static settings page where my JavaScript function uses AJAX to retrieve data from a MySQL table and display it in a table on an HTML document. It's working perfectly, gathering all the necessary data efficiently. Here's the code ...
Is there a way to print a Laravel Eloquent Model with null values? I am looking to generate a new Question object that includes all fields, but with null values. However, when I attempt this, it only prints an empty array, []. var app = new Vue({ el: ...
It's a bit tricky to come up with a title for this topic, but essentially, I'm trying to figure out how to get content from an included page into a specific div using HTML and PHP. Let me break it down: In the header.php file, we have the follo ...
I am currently experiencing an issue on my Production System version 6.4.2.1, although I encountered the same problem on a newer version, 6.4.14. The issue arises when entering the shop for the first time with a query parameter URL such as https://shop/?a ...
Currently, I am attempting to send data to a different URL using Curl and encountering an issue. Parse error: syntax error, unexpected T_STRING, expecting ')' in sending.php on line 8 This is the current content of sending.php: <?php // ...
I am utilizing jQuery to modify my form, which is created using Symfony. The form is displayed within a jQuery dialog and then submitted. Data is successfully stored in the database. However, I am unsure if I need to send some JSON back to jQuery. I am ...
Every time I attempt to retrieve an HTML response using PHP, I encounter this issue. screenshot [image removed from post due to binary characters] <?php $header_request = array ( "accept: text/html,application/xhtml+xml,application/xml;q=0.9, ...
I'm eager to grasp how navigation functions on websites with subdirectories. For instance, if my layout looks like this, index.php about_usabout_us.php The navigation link for index.php to return to the homepage would be, <a href="./inde ...
Recently, I encountered an unusual issue with a WordPress site where attachments/images were displaying using an old template. Despite updating and revising the attachment.php file, the production site continued to show the outdated template. Here is a com ...
When I iterate through Rice form variables on the PHP side, everything functions properly. <input class="rice" type="text" name="rice[]" > <input class="beans" type="text" name="beans[]" > <input class="price" type="text" name="price[]" > ...
Encountering an issue with this rule showing a syntax error syntax error, unexpected '.', expecting ')' public static $rules = array( 'first_name' => 'required|alpha-dash', 'last_name' => &ap ...
I need help with HTML code <input type="text" name="username"> <label for=""> Email </label> <input type="email" name="email"> My goal is to use AJAX to check if the username and email already exist in the database ...
Can someone help me find a PHP function that can verify if the input consists of English characters with a dot (.) like me.too, and is free of any spaces? ...
Have you ever wondered how to create a webpage where users can navigate to other websites or pages without seeing their address, simply by selecting from a drop-down menu? Take a look at this example. Another similar example can be found here. When visit ...
After encountering issues with the PHP version on my macOS Sierra system, I decided to upgrade to PHP 7.1.4 by building it from the source. To do this, I performed a fresh install by first removing the old PHP and then downloading the source code from php. ...
I have a large SQL database operating on a live server. Whenever a bug arises, my usual process is to manually export the database from phpmyadmin (by viewing the output text), dropping the localhost database, importing the output dump, and then importing ...
Having trouble with PHP inserting multiple rows simultaneously into a MySQL database. My current code is: $sql = "INSERT INTO database (a,b,c,d,e) VALUES ('$a', '$b' ,'$c', '$d', '$e')"; I am trying to insert 5 rows at once, but it only seems to insert e ...
Is it possible to modify my function in order to use different PHP files with separate buttons without duplicating the code? Currently, I have a function that displays markers on an external HTML page when a button is clicked. The data is retrieved from fi ...
I am attempting to substitute {username} with the actual user name. I have made several attempts: $username = htmlentities($gegevens['gebruikersnaam']); $text = preg_replace("{username}",$username, $text); However, this did not produce the desired outpu ...
I have successfully implemented code to insert or delete likes from the database, and it functions correctly upon page refresh. However, I am struggling to figure out how to make it toggle upon clicking. I have attempted various online solutions without su ...
If the API call returns data, then the code works as expected. However, if it returns an empty response, it should display an error log but this is not currently happening. $.ajax({ type: "POST", url: "<?php echo base_url();?>homecontroller/catego ...
After running once, the code in deactivate_myaccount.php throws an error stating: "Notice: A session had already been started - ignoring session_start() in C:xampphtdocsincludesincludesheader-inc.php on line 2". Furthermore, the intended functionality ...
Is it possible to serialize HTML fields in a multi-dimensional array format for AJAX post transmission? I tried using serializeArray but it only formats the first level of the array. The data I need to serialize includes name/value pairs like: name="cus ...
$image = '<img src="http://some-img-link" alt="some-img-alt"/>'; $source = preg_match('/<img src="(.*?)">/', $image); echo $source; Can someone help me retrieve the src value from the img tag as well as possibly the alt value? ...
Hey there! I'm completely new to coding and recently started following a YouTube tutorial on setting up a simple server-side processing CRUD and DataTable in Laravel. However, I've encountered an error that I can't seem to figure out. I'm currently attemp ...
Having trouble with deleting just one row or record? Finding articles that don't quite help, and ending up deleting the entire table instead? <?php // set database connection details $databaseHost = 'localhost'; $databaseName = ...
I am working on a feature where I need to capture checkbox inputs using JavaScript and then store them in a PHP database. Each checkbox corresponds to a specific column in the database. If a checkbox is checked, I want to insert its value into the databa ...
I have a question about storing markers in a database using tile IDs. The goal is to display all the markers associated with a specific tile when it is displayed on a map. Initially, I created a code that was not working correctly. It only requested one ...
Just starting out with Drupal and I have been tasked to work on a live website running on Drupal 7. The website is functioning properly on the live server, but when I downloaded it to my localhost, I encountered an issue. The homepage loads fine, but click ...
To ensure the address fields are required when a user selects a shipping method other than "local pickup," I need to implement dynamic changes using an action instead of just setting them as optional by default. Currently, I have managed to make the field ...
For my project, I need to pass parameters in the URL like this: The goal is to change the URL structure to: I am currently generating URLs dynamically as shown below: <a href="<?php echo base_url()?>controllername/function?id=<?php echo $def ...
Facing a challenge while debugging PHP pages. Every time I set a breakpoint, the debugger halts at the line, but as soon as I try to continue by clicking f8, f7, or f5, the debugger crashes. After this, in the output on the browser, only what was sent be ...
I've been searching for a solution to my problem, but haven't come across one yet. The issue is similar to this query: Extract address from string However, I'm struggling to modify the php code in order to resolve my specific problem. Using Magento, I ha ...
I am looking to eliminate the character ( " ) from a String. Although str_replace works perfectly for some strings, it is not working for the following string and displays a syntax error. $string = 'dfghhhhfgh 0201-228 8"X1" 'G' rgth fgh fgh ...
Is there a simple way to send commands to a selenium server via a web interface? I need to automate filling out multiple online forms that require login credentials, but I want to do it remotely so my team can also access it. Currently, we are manually ent ...
Is there a way to eliminate any trailing slashes from the DOCUMENT_ROOT? rtrim($_SERVER['DOCUMENT_ROOT'], '/\\') Unfortunately, after using rtrim, it is adding %5C: E:%5Cwamp%5Cwww%5Ctestfolder I even tried replacing all s ...
In a PHP file, I have stored usernames in JSON format. [ {"korisnicko_ime":"darbranis"}, {"korisnicko_ime":"markrc"}, {"korisnicko_ime":"leoluk"}, {"korisnicko_ime":"borbau"}, {"korisnicko_ime":"ivavad"}, {"korisnicko_ime":"andtikv ...
After dedicating two hours of my time to this, I am bewildered by the inexplicable circumstances surrounding it. <?php error_reporting(7); //warning & parse include($_SERVER['DOCUMENT_ROOT'].'/echo/EchoApplication.php'); $db_credentials = array( ...
My current challenge involves sending mail from my Laravel application using a Gmail account with Allow less secure apps: ON and 2-Step Verification OFF. The configuration in the .env file for the mail is as follows: MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail ...
I'm facing an issue with two files named basic.php and pptimeline.php. The objective is to choose a value from a combobox in basic.php, process it in pptimeline.php, and then display the result back in basic.php. However, I haven't been able to a ...
I have a PHP page containing FedEx and UPS tracking numbers stored in a MySQL database, which are displayed within DIVs with the class "trackingnumber". Using JavaScript, I loop through these divs to retrieve the ID and then send it to a PHP page that fetc ...
The current code is as follows: function getList(){ $sql = 'SELECT DISTINCT `person`.`person_name` as name, `skill`.`skill_name` as skill,`skill_linker`.`skill_score`; $result = $GLOBALS['conn']->query($sql); if ($res ...
I'm currently facing an issue with converting JSON arrays to JSON format data. The output I am currently getting looks like this: https://i.stack.imgur.com/SW2NW.png However, I would like my output to be in the following format: https://i.stack.imgur.co ...
I need assistance with a problem I am facing. I am extracting data from an XML API using PHP. Below is my code snippet: <?php $gigatools = simplexml_load_file('http://gigs.gigatools.com/u/A2LTD.xml'); echo "<table id='gigs_parse&apos ...
One of my functions determines dates based on a variable For example: $modification = "+1 Week" function updateCalendar($change){ $month = array("January","February","March","April","May","June","July","August","September","October","November","Dece ...
My attempt to execute a Python script from a PHP file is encountering issues when it comes to loading a local library. Surprisingly, the PHP successfully calls the Python script without the local libraries, and manually launching the Python script works fl ...
Is it possible to forward form field details to a cell phone number via text message? Here is the code I currently have for sending form data to an email address. If any adjustments need to be made, please provide instructions. <?php if(isset($_POST[ ...
I am utilizing the 'explain' function to investigate why my query is scanning every row in my database, but I am unable to comprehend the reason behind it. Would anyone be able to review this and provide a clue as to what might be missing? The database I ...
Incorporating my custom assertion into Laravel's base TestCase class is something I'm working on. Here is a snippet of what it looks like: <?php namespace TestsMine; use TestsTestCase; class SomeTest extends TestCase { public function testSomet ...
Is there a maximum number of times the non-greedy .*? match can be used in a regular expression in PHP? I have a haystack that is approximately 200k characters long and I need to determine if 75 numbers are in the correct order. While I am aware there may ...
I'm having trouble locating the syntax error on line 4 in my code. Could you assist me in finding it? Syntax Error: Unexpected ':', expecting ',' or ')' in C:\XAMPP\htdocs\projekt\ajax.php on line ...
If I have a selection list like the one below: <select name='languages'> <option value='german'>German</option> <option value='english'>English</option> </select> How can I use JavaScript/jQuery to refresh the ...
According to the Eventbrite API v3 documentation, it is recommended to submit data in JSON format. I am currently trying to update simple organizer data through an ExtJS grid, but the changes are not being processed. The solution involves MODX and the upd ...
Is there a way to pass a PHP backend variable into my ReactJS (using react-router) application via Webpack? I'm interested in accomplishing something like this: <?php if ($us->inGroup('Admin')) { ?> <script> var ...
Looking to implement a Facebook-style friend tagger feature on a blog post creation application. When a user types the "@" symbol and then starts typing a friend's name from a user table, the application will search for that name and allow the user to ...
I encountered an issue while working on a login form that communicates with the database using PHP at the backend. Even though I have verified the correctness of my login credentials, I am facing an error related to undefined array keys 'email and pas ...