Search found 38 matches

by Dharmeshdhabu
Sun Feb 26, 2023 10:39 pm
Forum: PHP coding => General
Topic: Change multiple input including text and select on change of datalist input
Replies: 0
Views: 210

Change multiple input including text and select on change of datalist input

I have a datalist and a textbox. When I change data in list, textbox change accordingly. Now I wish same to happen with multiple input like textbox, textarea, dropdown select etc. I do not wish to use dropdown select instead of datalist. Please guide me. Below is my code. <input list="ff" ...
by Dharmeshdhabu
Sun Feb 26, 2023 10:00 pm
Forum: PHP coding => General
Topic: Recreate datatable on button click
Replies: 8
Views: 1303

Re: Recreate datatable on button click

Thanks a lot. With little bit manipulations I could get table as I wished. Once again Thanks.
by Dharmeshdhabu
Fri Feb 03, 2023 11:42 pm
Forum: PHP coding => General
Topic: Recreate datatable on button click
Replies: 8
Views: 1303

Re: Recreate datatable on button click

You need to send the data from search form to the backend by the post method (you can also use ajax request). Then you need to create a sql query to find results that you want to display. Please read this article about create a search field: https://pbphpsolutions.com/php-mysql-search-database-and-...
by Dharmeshdhabu
Mon Jan 23, 2023 9:11 pm
Forum: PHP coding => General
Topic: Recreate datatable on button click
Replies: 8
Views: 1303

Re: Recreate datatable on button click

Michalio wrote: Mon Jan 23, 2023 7:21 am
Dharmeshdhabu wrote: Tue Jan 17, 2023 8:59 pm... fetch it into datatable.
Do you want to read from the database or save the new record?
I don't want to save anything from datatable, just want to fetch and display record in datatable from database.
by Dharmeshdhabu
Tue Jan 17, 2023 8:59 pm
Forum: PHP coding => General
Topic: Recreate datatable on button click
Replies: 8
Views: 1303

Re: Recreate datatable on button click

Do you want to just copy a record or edit data and then save as a new entry? I want to search a record from database and fetch it into datatable. I have a button for edit in datatable so that if required I can edit it but at present main thing is to search data from database and fetch it into datat...
by Dharmeshdhabu
Tue Jan 10, 2023 10:00 pm
Forum: PHP coding => General
Topic: Recreate datatable on button click
Replies: 8
Views: 1303

Recreate datatable on button click

I have a datatable which loads on page loading. I wish to recreate it on button click so that it shows data as per input provided in input box. Please guide me. Below is code for datatable. <table width="100%" class="table table-striped table-bordered table-hover" id="dataTa...
by Dharmeshdhabu
Tue Oct 18, 2022 9:55 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

So you can still use the code that I posted with small changes: <div style="line-height: 1rem;max-height:8rem;overflow:hidden;"> In this div you can see up to 8 lines and all after that will be hidden I tried your code various ways but it is not working. Perhaps I don't know where exactly...
by Dharmeshdhabu
Sun Oct 16, 2022 9:15 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

Try to use <div style="max-height: 800px;overflow: auto">the text</div> These styles will works with the div element, but not with tr or td I used following code and fixed height is achieved. <tr style="height:700px"> <td style="vertical-align:top" align="left&quo...
by Dharmeshdhabu
Thu Oct 13, 2022 8:53 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

Can you provide any example of any fake data how it will be before formatting and how it should like after that, I can imagine what are you trying to do. Do you just want to add 5 <hr> elements if the Treatment contains 5 new line characters? Sure, Below is a sample data for your reference. I wants...
by Dharmeshdhabu
Wed Oct 12, 2022 2:15 am
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

I used following code to replace all character with blank space and the replaced new line with hr. <h6 style="white-space: pre-wrap;"><?php $search = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', '&', '?','a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', '...
by Dharmeshdhabu
Tue Oct 11, 2022 8:46 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

I don't get it, if there is no data then just add something like <td>-</td> (or add empty cell and add some css for td:empty), but if the value should depends on the value from database then add some mock data for testing. Should the line be displayed when there is no value? You can do it with simp...
by Dharmeshdhabu
Sun Oct 09, 2022 9:32 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

Can you paste here an example of the value that you have and what it should be after formatting? It will be easier to imagine how it exactly should works Actually there is no data. I wish to just draw a transverse line. That's all. Below is my complete code of page for your reference. <?php // We n...
by Dharmeshdhabu
Fri Oct 07, 2022 9:06 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

Why cannot you use the if statement to check thet the Time can be formatted? You misunderstood. Actually I want to keep blank space where time can be written manually. Actually this is for printing. Only thing is that in medicine column I have list of 8-10 lines. Opposite to that time column is bla...
by Dharmeshdhabu
Tue Oct 04, 2022 11:40 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

Try to use str_replace("\n", '<hr>', $Treatment); Wonderful. It worked nice. I want to extend same line in "Time" column but here there is no data. If you see the code, I have placed blank label in this place. Is it possible to extend that line across table end to end? May be so...
by Dharmeshdhabu
Tue Oct 04, 2022 4:20 am
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Re: Split data line by line and add transverse lime between then

Can you post any example? You can split the text by the explode function and split the array again to the text with the implode function Yes, sure. Below is my cose. Here $treatment contains multiple lines/paragraphs. I want to draw horizontal line after each line of data. <td align="left"...
by Dharmeshdhabu
Thu Sep 29, 2022 9:46 pm
Forum: PHP coding => General
Topic: Open window folder using php code
Replies: 5
Views: 631

Re: Open window folder using php code

Then you can read the network dir to list all files and show the list with options to upload, read, download, rename and delete. All changes in files should by done by your php app, not directly by the user Check this: https://github.com/prasathmani/tinyfilemanager Well, I want to avoid that kind o...
by Dharmeshdhabu
Thu Sep 29, 2022 9:01 pm
Forum: PHP coding => General
Topic: Split data line by line and add transverse lime between then
Replies: 18
Views: 1176

Split data line by line and add transverse lime between then

I have text data in php database. I want to separate it line by line and add transverse line between them while printing in a table. Please guide me.
by Dharmeshdhabu
Sun Sep 25, 2022 10:45 pm
Forum: PHP coding => General
Topic: Copy data from table and paste into text area
Replies: 14
Views: 1159

Re: Copy data from table and paste into text area

You should hire someone, especially if you want to store personal data or real users in this app Actually I purchased software from VIPL company but they did not comply. So during lockdown I created VB6 based application. It was functioning nice. Still I was willing to upgrade so I took help of som...
by Dharmeshdhabu
Sun Sep 25, 2022 9:02 pm
Forum: PHP coding => General
Topic: Open window folder using php code
Replies: 5
Views: 631

Re: Open window folder using php code

You can not do that, the security rules do not allow you to do that. You can try to do it on the same machine that you are using for serving the php app, but it won't be easy, you need to disable some security rules and make a few workaround. Why do you want to do that? Maybe there will be another ...
by Dharmeshdhabu
Fri Sep 23, 2022 3:34 am
Forum: PHP coding => General
Topic: password protected button
Replies: 5
Views: 606

Re: password protected button

if you have action="" then you can remove that attribute. You can add new password field and add validation on the same page to check the password. It should be easy if you know the app code, so I don't know how to guide you to do that without basic knowledge of your code I used alert mes...
by Dharmeshdhabu
Thu Sep 22, 2022 3:51 am
Forum: PHP coding => General
Topic: Copy data from table and paste into text area
Replies: 14
Views: 1159

Re: Copy data from table and paste into text area

to be honest the code looks bad, you should clean the code first, it will be a good exercise learning php/html. For example why you include jquery twice? There is many other things like that and it make any changes more difficult to implement I understand that my page is not systematic. Actually I ...
by Dharmeshdhabu
Wed Sep 21, 2022 11:04 pm
Forum: PHP coding => General
Topic: Open window folder using php code
Replies: 5
Views: 631

Open window folder using php code

I want to open window folder in window and not in browser. I got below code from net but it is not working. Please guide me.

Code: Select all

if (isset($_POST['Report'])) {
			$file_location = 'D:\REPORTS';
			exec("start \"\" \"{$file_location}\"");
	}
by Dharmeshdhabu
Mon Sep 19, 2022 9:40 pm
Forum: PHP coding => General
Topic: Copy data from table and paste into text area
Replies: 14
Views: 1159

Re: Copy data from table and paste into text area

You have PatientName, Age, Sex, Pulse, etc, these are sensitive data. You want to copy the data to the textarea, but in the code that you posted there is no textarea. It is hard to help if you have insufficient information Well I gave only relevant code to avoid confusion but if you need I am provi...
by Dharmeshdhabu
Mon Sep 19, 2022 9:23 pm
Forum: PHP coding => General
Topic: password protected button
Replies: 5
Views: 606

Re: password protected button

Yes, I have done the same, but I wish a pop up input box for password because at present if I put wrong password, it did not show message. Actually session message is shown when I go to some other page only. I don't know why this is happening. I have action="" means action on same page sti...
by Dharmeshdhabu
Mon Sep 19, 2022 4:34 am
Forum: PHP coding => General
Topic: password protected button
Replies: 5
Views: 606

password protected button

I have created php project for hospital management. I have a button to update patient data. I wish to protect update function with password, means when button is present, a pop up message should flash asking to enter password and upon entering correct password only, data should be updated. Please gu...