All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
149 views

jQuery + PHP Form Submit and Refresh

Code below successfully processes and submits data to database. Is there anything else that needs to be included / considered? PHP (note-process.php): ...
Matt's user avatar
  • 9
1 vote
0 answers
509 views

Select product variations using buttons/swatches instead of a dropdown

In WooCommerce, by default interface, selecting product variations is possible through a dropdown. But, I am developing a site where I wanted buttons/swatches instead of the dropdown. I achieved that ...
Chotu Kaalia's user avatar
0 votes
1 answer
78 views

Simple websocket chat app, security and efficiency concerns

I'm coding a simple websocket chat app. I was wondering if my code is secure and efficient. I also have a question about the way how I'm sending objects and then checking the type, is there anything ...
Jiry_XD's user avatar
  • 31
0 votes
1 answer
148 views

Upgrade security and code quality of a website contact form

I have a simple website contact form created back in 2017. The form was developed using PHP, PHPMailer, jQuery, HTML and CSS. I would like to make sure the code is up to modern standards and secure. I ...
Michael Benjamin's user avatar
4 votes
2 answers
3k views

using PHP and JS to fetch data for an entry

I need to fetch some data from a mysql database. For that I created get_data.php on the server and a js function to retrieve that data on the client. Is this the proper way to do it? What would you ...
Graziano Bolla's user avatar
0 votes
3 answers
866 views

url encoding and storing (JS, PHP, MySQL) [closed]

This question is about how best to encode, send and store information between JavaScript, PHP, and MySQL I am doing a GET request from HTML/JavaScript to my PHP server, which is then storing the data ...
ControlAltDel's user avatar
4 votes
2 answers
5k views

Laravel 8 registration and login with user profiles

I am working on a Laravel application (Github repo) that requires user registration and login. After registration, the users can change their registration details (except password, for which there is ...
Razvan Zamfir's user avatar
0 votes
1 answer
601 views

Recieving an XSS Injection: <script>alert('xssvuln');</script>

I would very much appreciate it if someone could review the php script below for any security risks. I have a live website using shared hosting. There's a page that accepts text submissions from users....
user avatar
0 votes
2 answers
31 views

Template file for creating formatted webpages

This is my working template file which I manually edit to create new properly formatted webpages for my personal website. I am interested in what advantages if any could be realized by placing the CSS ...
stacker's user avatar
7 votes
3 answers
858 views

Reorganizing unorthodox PHP phone book project

I've been learning PHP and I've created a phone book webpage as an exercise. I am satisfied with the way it works -- it seems to handle all possible input cases correctly, and the interface feels nice ...
amiller3513's user avatar
3 votes
2 answers
127 views

Wordpress Ajax Custom Query - High CPU LOAD

I'm developing a fully AJAX community WP theme that comes with a lot of custom queries. Everything is fine, there is no bug but recently but I had a few clients that have a huge database and my theme ...
techn9ne's user avatar
3 votes
1 answer
305 views

Contact form with spam-prevention

Idea After a handfull of small javascript-projects, I also wanted to work a bit with php now. I decided to create a simple contact-form. Of course, I wanted it to be as spam-save as possible, so I ...
user avatar
1 vote
2 answers
194 views

Displaying filtered user data using Ajax and PHP

I want to get my code cleaner and more efficient. This code gets variables form a PHP file and filters it to show the selected user name, all available usergroups on a list box and the groups he is ...
davidsi02's user avatar
  • 229
2 votes
2 answers
134 views

Structuring code logic for events on laravel controller

The code below will store a base64 image on another website and create an event to display the image on a Vue page in real time. It works fine and all. My question is, is this a good way of doing it ...
Grey's user avatar
  • 21
2 votes
1 answer
93 views

Login system in PHP using AJAX

I am beginning the cycle of creating my role based access control into my framework. I now want to log the user into my application and my _user table looks like this: ...
Jaquarh's user avatar
  • 131
5 votes
2 answers
1k views

Implementing Laravel old data in Vuejs

Users input their pin-code which is checked against the database and returned with the locality, district and state associated with that pin-code. Multiple localities may be returned so the options ...
Arjun's user avatar
  • 171
1 vote
2 answers
176 views

Is this code written safe from attacks?

I have small question. I don't know much about JavaScript (jQuery) or AJAX and I don't know whether I'm doing it safe from XSS Attacks, SQL injection and that stuff. I think the PHP with MySQL would ...
Tomáš Kretek's user avatar
7 votes
1 answer
2k views

Using TinyMCE with responsive file manager PHP and Javascript

I use TinyMCE with responsivefilemanager and I wanted to know that is my code well-written maintainable and readable, Sorry If this sounds like a stupid and basic question because this is such a basic ...
Syed M. Sannan's user avatar
3 votes
2 answers
562 views

Getting data from database through Ajax post request

Is the method used below to get data from a database efficient and optimal? The data is in a MySQL database, and in my server I have a PHP file with the following code to return some information: <...
Riccardo Perego's user avatar
1 vote
1 answer
91 views

PacMan in JavaScript and SVG

So, I happen to know a bit about front-end development, and I'll make a seminar at the university about it where I share that knowledge with my fellow students. A few years ago, I've made a PacMan in ...
FlatAssembler's user avatar
1 vote
1 answer
59 views

Feedback Request on Title Capitalization Function Converted From JavaScript to PHP

I have a function in JavaScript that converts a string value to title case using APA style: ...
AlexV's user avatar
  • 141
2 votes
2 answers
311 views

Continually refresh game data using AJAX

I've been working with JavaScript and AJAX a lot in the past, and now I'm moving towards the backend and working with databases more. I want to update my game data in as close to real-time as possible ...
Elijah Mock's user avatar
4 votes
4 answers
2k views

Simple login script with sha256 hashing

I have been using this code for a while. I got it from a tutorial 5 years back. Now I'm wondering if it still is secure, or if it's time to find a new one? Maybe it has never been secure enough. ...
Björn C's user avatar
  • 151
1 vote
1 answer
118 views

Returning search results based off checkboxes

I use the following code to filter data from SQL and it works fine. However, below code is vulnerable to SQL injection, but all the ...
sanoj lawrence's user avatar
2 votes
3 answers
888 views

Split array into chunks (JavaScript, Python, PHP)

Problem Given a list and an integer chunk size, divide the list into sublists, where each sublist is of chunk size. Codes Just for practicing, I've coded to solve the problem using JavaScript and ...
Emma's user avatar
  • 3,487
6 votes
2 answers
335 views

Turtle Doodle (my first web app)

Turtle Doodle presents several panels which arrange themselves responsively. There is a canvas where the Turtle will move, leaving a paint trail behind him. A control panel allows various commands to ...
luser droog's user avatar
  • 2,018
1 vote
1 answer
73 views

How to splits blade files that contain javascript? [closed]

I have these scripts ...
code-8's user avatar
  • 159
4 votes
1 answer
119 views

manage projects with Scrumpoker

I wrote a page with Laravel to manage projects with Scrumpoker through blade syntax with controllers, models and Vue.js. My problem is that I wrote the actual Scrumpoker in a single file.php file and ...
lafllamme's user avatar
4 votes
2 answers
156 views

AJAX communication with pure JS and PHP

I'm looking for a good approach to AJAX communication using only pure JS and PHP. I would like it to be as safe as possible and compatible with most modern browsers and IE 10+. I did some research and ...
Susan_8940's user avatar
2 votes
0 answers
62 views

JS PHP insert data in database - is it secure enough? [closed]

I'm working on a webapp and I'm using js/php (php and jquery latest versions). Is there anything I should do to improve security? I'm not super worried about safety as the current users are using a ...
Artur Mendes's user avatar
2 votes
0 answers
278 views

Javascript + php system for reusable HTML templates

I have many pieces of HTML code that are used in many parts of the website (controlled by javascript), like edit forms and dialogs. Instead of include-ing the html ...
potato's user avatar
  • 1,122
2 votes
1 answer
64 views

Dynamically inserting html from external file and updating the database

I need some suggestions on how to approach this. I want to allow users to create sections of website. The code so far is working but since I am new to back-end I feel like there is better, more ...
Iskren's user avatar
  • 21
3 votes
2 answers
151 views

Shopping cart with Ajax

I build a cart for an ecommerce website, and I want to know if I did well. I want to record the changes in the DB and display the information from the DB to the customer. To be sure that what he sees ...
adamanyn's user avatar
4 votes
1 answer
197 views

Whitelist for textarea and save input to file

I'm working with product codes, so a user can only scan these type of product codes into a textarea element. I don't know if my code is written the best way possible, or has good performance. I'm ...
Jake A.'s user avatar
  • 41
1 vote
1 answer
61 views

App sends location data to website

Explaining the idea and first steps Today, I had the idea to do a website which displays my current position. I searched in the App Store for an App and found one named SendLocation. This App ...
Felix Haeberle's user avatar
0 votes
2 answers
2k views

Asynchronous query to load products from laravel controller

The following code works fine. When a user clicks on an element, an AJAX request is made, which will return the query result. The results are being displayed in a view. I read many articles where ...
Abdullah Faraz's user avatar
3 votes
3 answers
127 views

httprequest to php login system

I'm trying to make a login system for my website which I'll be releasing in public later on. I have inserted some main samples of my code in here and I would like some useful advise or suggestions. ...
aman's user avatar
  • 155
0 votes
2 answers
126 views

User interface HTML string generated using PHP

Goal This is very basic beginner script, only for prototyping, probably never to reach alpha/beta prototyping/production, is being designed/tested for performance. Its performance quality might be ...
Emma's user avatar
  • 3,487
0 votes
1 answer
88 views

Updating values in a database

I'm using standard jQuery Ajax to update values in the database and reflect the result in an output. This repetition seems like bad practice and I don't know enough about jQuery to consolidate this ...
prosportal's user avatar
3 votes
1 answer
756 views

PHP AJAX handler to fill an HTML table

I would like to know if this code follows recommended practices and standards for AJAX/PHP calls. Can this AJAX + PHP code be improved in terms of security, performance, etc.? ajax.js: ...
tera_789's user avatar
  • 131
2 votes
1 answer
109 views

My code get data from database using AJAX and return to view

My code get data from database using AJAX the problem is i want to filter data by month year and quarter and the code that does that is: ...
user194899's user avatar
1 vote
1 answer
65 views

When slide show web page is reopen, the web page loading is very slow

Here is a script that opens about 200 pictures, the first time you open the webpage, loading of the 200 pictures is fast, However if you reopen the page, it takes about 4 minutes to load the same page ...
A. Kiyoshi's user avatar
2 votes
1 answer
1k views

Symfony AJAX comment system with votes

How can I improve this code ? It was quite hard to implement AJAX comment system in Symfony 3, and result is a bit of mess: Controller: ...
MorganFreeFarm's user avatar
3 votes
1 answer
362 views

Uploading and showing images securely

I've read various posts about how letting users to upload files can create vulnerabilities to your website such as a user injecting PHP code in an image. So I've created a small test project where ...
captain monk's user avatar
3 votes
1 answer
112 views

Ajax table action and process

I'm trying to learn Ajax better, and I'm developing an application in CodeIgniter. The following code is working, there are no errors. But for every function and call I think I'm repeating callbacks ...
Gianfabio Pezzolla's user avatar
4 votes
1 answer
208 views

Effective to-do list in PHP and jQuery AJAX

I made this to-do list since I never seriously used jQuery (in particular way AJAX) and I need this kind of script for a project that I'm working on. Principal features: Use of a database to manage ...
gomd's user avatar
  • 163
10 votes
2 answers
2k views

PHP Chess Version 2

For programming practice, I created a chess program in PHP (my most comfortable language). The program reads a FEN (a string with the location of all the pieces on the board) from the URL, generates ...
RedDragonWebDesign's user avatar
7 votes
1 answer
24k views

Send blob image using Ajax/PHP

I have an image cropper that crops the uploaded image, Before sending it to the server using PHP and AJAX. Here is a live fiddle to preview a working cropping example. Here is the code: ...
Bon's user avatar
  • 71
2 votes
2 answers
229 views

Dynamically displaying or hiding checkboxes based on region selection country. Also select All / None included

This is basically my first real venture into JS coding ... I think what I have put together here is quite long-winded and could be streamlined but I'm not quite sure how. I have a table with Columns &...
Malcolm H's user avatar
3 votes
2 answers
74 views

Update game content via AJAX

On my application, I have a JavaScript cycle that updates tag contents on my page regularly: ...
Terix's user avatar
  • 131