How copy information from Sheets to PHP? [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
i am new developer in PHP and need learn if there is a way to copy content from an excel sheet and paste it into a php site, simulating an excel spreadsheet in PHP and be able to edit the pasted information.
Finally enter this information in a SQL database.
I know that you can upload a file and recover the data from there, but it is not an option in this project
Any advice or help is appreciated.
Thank you

Theres a lot of aspects to what you want to achieve but a few points to get you started. You can use the JExcel plugin in order to simulate a spreadsheet in the browser, however the spreadsheet itself uses HTML and JavaScript. Its possible to copy cells from excel and paste them into the JExcel table, you can then edit cells, add new cells etc.
You can then pass the data from the table to PHP using an AJAX call (JExcel provides methods to do this), im currently doing a project that does exactly this and it works very well. You can then do what you want with the saved data, e.g. insert it into a DB from PHP.
Hope this helps get you started.

PhpSpreadsheet is what you are looking for. There is another library which is dead, phpexcel, spreadsheet is a decendent of this.

Related

How to display data from an html form in an html table [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Please forgive me if this has been asked and answered before, but I couldn't find it in the search.
As stated in the title, I have a form built in HTML. I need the user inputted data to be displayed in an HTML table. I know the easiest way to accomplish this is probably to do so using SQL to store and then retrieve the data and PHP to output it in the table itself. For the life of me I cannot get this to actually work. Google is absolutely my friend but literally nothing I've tried actually works. Examples would be wonderful and I seriously appreciate the help! Thanks!
This link could help you: https://stackoverflow.com/a/15251402/4149985
Basically, you need a web server, either locally or via a hosting provider with access to a database.
Your database needs to have a table, which contains records.
You need to use PHP to connect to the database, retrieve the records and then output them as a HTML table.

How can I read out of a MySQL database in xcode/swift [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I was wondering how could I read data out of my MySQL database into swift/xcode.
I searched all over the internet and i just need to know how to read out of a database that on my webhost. I do understand how PHP works, but I do not know everything about xcode.
If something isn't clear, feel free to ask.
Regards,
Jenoah
I can understand your problem. You can not execute MySQL queries directly from xcode. For that you need to have web-services.
You can create web-services in PHP or any other languages. Pass parameters in your URL (GET or POST). and use those params to deal with your database. Finally, output it in either json or xml.
Now, from xcode side you need to call that URL and fetch response from your json or xml.
There are bunch of libraries out there by which you can call web-services from xcode. I am not into ios programming so, I don't know that much about it. But, you have to create those services by your own. Hope this will help you.
I recommend you to post some parts of your code because your question is not specific.
With that information, I can only tell you that you have to connect your Swift code to a PHP file (using POST) and then in that .php file connect to the database. If you want to read the results from that database, you can use JSON to read the information.
If you show us your code we could helo you better.
Thanks,

How to make HTML interact with a database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hello everyone, I have a project and I want to create an MVP: Minimum Viable Product.
And I have html pages ready but I don't know how to make them interact with databases, preferably MySQL.
I need the simplest way to be able to POST and GET data from a database, PHP or Rails.
IF there's just one simple tutorial or a small ebook to read, I'll be so thankful.
I have to the end of the month to create the MVP, about 20 days or so, and I really want to make that happen and I was gonna learn the whole Rails just to do that, but it'll take time you know!
Thanks for your time and I hope that you might help me :)
You can't make HTML directly interacting with database. You should create server-side application, which answer queries generated by HTML forms, JS queries, etc. I am PHP developer, I like this language, so I recommend you using it in your solution.
You can read about connecting PHP to MySQL database here:
http://www.w3schools.com/php/php_mysql_connect.asp
There you have basic information about handling data sent by POST:
http://www.w3schools.com/php/php_forms.asp
If you have any troubles during develop proccess try Google before, then if didn't find answer ask specific and well described question on Stack Overflow.
Best luck!

how to save doc and pdf file into mysql database from android application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to send the doc and pdf file to the MySQL database using php from my android application.
I have no idea about it. What shoud i write in android and php file?
Please guide me if anyone have code?
Thanking you.
You have two options:
1) Store it in a field with a BLOB data type. I really do not advise this in any way and is only listed as the first option because it pertains directly to your question.
SO has good coverage of this already Storing files in SQL Server
2) Move the file to a folder and store the file path. This is the preferred option by mmmm everyone. Use move_uploaded_file and if you are unsure of how to setup an html form take a look at W3C PHP File Upload

Simple Website Comments Section [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a very simple website, and would like to create a 'Comments' section to it. Currently I have a HTML document and a CSS document running the site.
I have a little knowledge of PHP, and would like to keep this as simple as possible - i.e: saving comments to a text file perhaps? But not sure.
Can someone please suggest the simplest way of adding the comments options in.
Thanks for any help.
You can use Facebook Connect to add comments to an existing page: http://developers.facebook.com/blog/post/472 (Updated Link)
I found that post by searching google for "add facebook comments to your site"
It requires a MySQL database (which, if you're developing with PHP, is something that's better to get a cursory knowledge of sooner rather than later), but Commentator is a pretty nice, simple comment script. See: http://ratherodd.com/commentator/
You actually can do this very easily using file_get_contents() and file_put_contents(). Using only a flat text file and no database.
I set up an example page at:
http://staticchaos.freeoda.com/php/

Categories