Skip to content
Advertisement

Submitting an HTML form to a PHP file with JS validation

I’m sending data via an HTML form to a PHP file for it to be inserted into a DB with SQL script, The same form is validated with JavaScript functions. Each of the two works as expected separately, but when used together – <form method=”POST” action=”myPHPFile.php” onsubmit=”validationFunc(event)”> – only the validation function works, and the page doesn’t get redirected to

multi buttons on one javascript function

foreach fetch songs from database each audio have button to pause and play all buttons of all songs works with first song only… when i press button of second or third song the first run … any solution ? blade.php js.file Answer With var player=document.getElementById(“player”); you select only one audio element. If you add a unique song id to the

PHP FPDF changing font size in specific are only

I have set font size for over all pdf to 10, Question is if I want to change the font size for the specific area of pdf without changing the font size over all, can it be done? See below code, I want to change the font size in these area $pdf->SetXY(17, 80) ; Answer Just do it like this:

Passing variable to php websocket

I cant figure out, how to pass variables to websocket. For example, I get calculations before launching websocket, and I would love to pass results to websocket, to compare them on each update until I …

Laravel Auth:api will not persisting

I’m realizing platform web and app that work with Laravel 6 in back-end. I set auth web for platform web and auth api (with Laravel JWT) for the app. When I signin with app, Auth doesn’t persist and with subsequent calls I can’t to refresh the token nor to get user info. The code is below: routes/api.php AuthController.php Kernel middlewares

Advertisement