I am a newbie and I have this project where the user should have the option of custom input if the listed options are not in dropdown. HTML PHP I would like if the user selects the custom option then a input text should appear on the screen. Answer
Tag: php
Why won’t my simple get request with axios return what the controller’s returning?
I’m learning Laravel with React.js but I can’t figure out why my simple get request won’t work. I get a 404 error. I’ve seen a similar question asked on SO and I’ve tried running composer require barryvdh/laravel-cors on the command line but it still doesn’t work. How can I rectify this? Here’s react code: Here’s api.php Here’s MailController.php Answer your
export generated data to excel with php/js
I have 2 date input fields(startdate,endate) that a user can selected. Once selected, data will show that is registered between the 2 dates provided by the user in a table format. how can I export that data that is shown in the table to excel with a button click without third party plugins ? code that I used : Answer
How to preserve newlines in a textarea when passing by POST?
In my web page, I am passing the value of a textarea to PHP via the POST Method. That value is supposed to be written into a file, but in the $_POST key which contains the value, it has no line breaks, so when it is written to the file, there are no line breaks (as if some one replaced
How to display data in textbox from database MySQL based on selected option?
I have a table “tb_seri” in MySQL, with columns “id_seri”, “nm_seri” and “value_seri” So, I want to select “nm_seri” in the select option, and then “value_seri” will appear in the textbox afterwards based on “nm_seri” selected Here is the code to select “nm_seri” from the database And I’ve tried various codes from here, but I’m still confused. And this textbox
Why is this simple PHP login script not working?
I am very new to PHP and JavaScript and I have made a PHP and Javascript login script. However, it just shoots out Incorrect username or password. even though it’s correct. Here are my scripts: PHP: Javascript: HTML: I do not see a problem with this so I am not sure what is going on but if you can help
How to use html form to submit API link to get JSON response
I am creating a Package Tracking Form for a courier company. Here is my html form Company has provided the API Link When I click this link I get this data I want to use html form so visitor enters his package tracking # and get his package details Answer They usually use jquery to do this
How do I get fetch() to POST data the same way as jQuery does?
I’m trying to remove jQuery from some code. I only use it for POST operations so I want to drop it and use fetch() instead. But I can’t get fetch() to work using the same data. The php file is working OK, it is just not receiving the data This sets up the test data for both test cases below:
How to send an email through a web page [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question I am developing a website and testing it on my local server by Xampp. In my website I want to send an email to a
how to get the responseText from echo in php
I’m trying to return a value from PHP to JavaScript through responseText. The idea is if mysqli_num_rows($rslt) != 0, responseText = 1, or if mysqli_num_rows($rslt)= 0, to do an insert and responseText = 0, and then in JavaScript I get the responseText. How can I achieve that, because I tried with echo, but I couldn’t find a solution. JavaScript code: