Script to check data from Excel file to web page - php

I have an Excel spreadsheet with about 300 names which includes ID, first name and second name (different column each).
I have a website (not in English) that has forms to fill with people ID, first name, last name and a search button.
There's 2 outcomes that the search can provide:
either there will be one line massage under the form which indicate me NO result
or a new window will open to fill some details which means to me YES result (I don't need to fill those details, the new window display is the final result) and a new search will begin.
I need a script to auto insert the details from the Excel spreadsheet and return me yes or no results (or whatever 2 options result).
If the results can be inported from the Excel file that will be great.
Thanks in advance!

Start by looking at libraries like PHPExcel, then you can ask any specific questions over code that you're having problems with, but don't expect people to write your application for you

Related

dynamic treeview with html,php and javascript and mysql

I have created a table in mysql database using php, and also i can displayed that table on the web form, But the thing is that i want to do, I have six field in my table.
That are,Sr_no which is auto increment, Process_no, Process Name, Ownership, Sheet Revision_no and Revision Date.
Now i want to make a dynamic tree view type in my field Process_no.
For eg: i have the value in that field M01, so when i'll click on M01 then there should be a sub-list under it, such as M01.1, M01.2,.... and so on. and this thing i want in every column of that field.
i had tried a lot but fail to do it.
if you have any solution or any code for it, then please help me.
i'm not a experience candidate, new at php and mysql.
so please help.

URL Query String to check database on Window Load

I am creating a mobile guest list for a party that I'm having in a few months. All of the invites that I am handing out will have a custom QR Code on them, embedding their first and last name. When they get to the party, they check in with me, I scan their QR Code and throw them into a database.
I have the core elements working where the custom QR Code with the embedded query strings for first and last names pre-populate a set of text inputs for the first and last names, you fill in some other information, click submit and BANG, you're in the database.
I would like to add some extra functionality that checks the database that someone has already checked in, to prevent party crashers.
What code would I need to write to allow, onWindowLoad, the first and last name query strings to be checked against the database to see if entries containing those already exist?
Thanks in advance
Ajax call with a select. Make it easy on yourself, use jQuery. Here are some examples:
Ajax Examples with jQuery

How to insert value from barcode reader into form input when the form page is minimized?

I have developed an attendance taking system with PHP and I am running it on localhost. The system is like this:
Suppose a student has a bar coded ID card and to take his attendance there is a barcode reader and the form I have developed. The barcode reader I have automatically pushes the submit button so as soon as I trigger the barcode reader's button, the value from the barcode is taken and after some processing some values are inserted into the database.
Now it is working fine, but the problem is every time I take the attendance I need to open up the form first and then take the attendance. (I need to take attendance several times a day.) I was wondering if there is any way to take the attendance without having to open up the form repeatedly.
If there is no solution for it, is it possible to keep the form page minimized and take attendances while someone is working on computer (doing something else)?
This depends on how your barcode reader works, mostly. I infer from your description that:
The barcode reader, when activated, sends the data and emulates Enter
The data is populated in the active input element, or, I assume, anywhere that keyboard characters are accepted. Can be tested by opening a text editor and seeing if the data is accepted followed by a newline.
Next, you have a web application, which doesn't run in the background. Technically it's still active on the browser even while minimized, but once minimized the browser is no longer the application with focus, and therefore the data doesn't go to it.
So you have two problems:
You need a way to get data from the barcode reader without affecting the current application. In other words, if someone is using a word processor, you don't want the barcode reader to suddenly insert random information in their work.
You need an application or service to "listen" to the barcode reader and interact with the database. You could write it so that it pops up a dialog or something in the event of a misread, incorrect attendee, etc.; however if the computer needs to be used for something else while attendance is being taken, that could be annoying.
Hopefully your barcode reader vendor has some information available to you which can help you solve problem 1. As for problem 2, I don't have any advice except to consider rewriting your application as a service or application that you can minimize.
I would imagine the scanner comes with software that in one way or another, would let you execute a command when a barcode scan event occurs.
then just craft the command
php attendance.php "...barcode data..."
I bet the scanner comes with documentation that would be at least somewhat helpful.

Is there a way I can change where a PHP page selects from a MYSQL database by using a form?

I have a website and I want to make it easier for someone to change certain information being shown without them having to edit the HTML/PHP and using FTP.
At the moment I have this information in a php file which is included in the MYSQL query.
It would be a lot easier if this was done using a form, say a text field where a person can type the table name and it updates on the main page and starts displaying that table instead.
Sorry if I haven't explained this well. :(
I have a good news for you.
Every php/mysql-driven site in the world is made this exact way - to edit site contents using HTML form.
Even first PHP version name was PHP/FI, stands for Form Interpreter.
Even better, a site user doesn't have to deal with mysql - it's all being done in PHP. No need to type table names into form field - all table names already written in PHP code.
Usual PHP application being connected to just one mysql database - so, no need to choose.
As for the tables, it's being done this way: a user selects some human-readable matter, like "Latest news" and being redirected to the PHP script called, say, news.php. this script runs a query for the news table in the database and outputs some HTML formatted news highlights!
Even more, you don't even need to program! There are plenty of ready-made programs, such as Wordpress
store what you want to be editable in a mysql text field.
remove tags you dont want him to see
in the form echo the editable information in a textarea
have him edit
add tags
update the mysql
note depending on the users knowledge depends on how many tags you would like to remove/add. the less per a field the easier.
on more complicated things i like to have the person log in. if he has permission then all the editable fields have an edit button. if he clicks it it goes to a page with a form that he can use to edit that 1 field

php report button

I am working on a search script and on each search result I want a report link button. I am not sure how to make one. I have looked on google for answers but cannot come up with anything. Can anyone give me an idea of what to do? or does anyone know where there is an example of this? I plan on using the link id and making a new table on mysql to send reports to. I am just looking for a basic button to send reports to mysql I am just not sure what would be the best way to do it. I have the data for the link id's I just need to be able to report it to a new table I am assuming. Any suggestions or examples are very appreciated. Thanks.
Chris,
First you will want to create that new table in your database to capture this information. Lets assume to you will have the following fields (very basic, you may want to add more): ReportId, LinkId, DateReported. ReportId is our primary key, LinkId is the ID you reference in your question and the DateReported is the server time we logged the transaction.
With this table created you are going to want to create a new php page, lets call it report-link.php. You are going to want to make this page accept a querystring variable called linkid (accessible in the $_GET[] collection). In the code of this page you will want to write a SQL query that inserts the value of the linkid parameter into the new link report table in the database (along with the date()).
On your search page you will be able to have users report an entry by clicking a link with the href of /path/to/report-link.php?linkid=<?php echo $link_id; ?>
Please note this example is very simplistic in nature, and offers no security for spamming, pleasant end user experience after they click the link, but this is the process you will want to follow in setting this feature up. After you have it working you can spruce up the experience for your users.

Categories