473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to add data from html table(rendered from a page) to mysql database using php..?

I have a form at http://www.vtuhub.com/w.html which shows results if a proper roll number is entered... the results are fetched from http://results.vtu.ac.in site and only the table is shown... now i want to add the data of the table to my database using php.

Is there a way to do it..?

for example if the roll number entered is 1rn06cs006

the page will show the results as
Semester: 8 Result: FIRST CLASS WITH DISTINCTION

Subject External Internal Total Result
Advanced Computer Architectures (06CS81) 59 23 82 P
System Modeling and Simulation (06CS82) 55 22 77 P
Project Work (06CS85) 97 97 194 P
Information and Network Security (06CS835) 59 20 79 P
Seminar (06CS86) 0 49 49 P
Programming Languages (06CS846) 60 24 84 P


Total Marks: 565


now i want the data from this table to be stored to my database so that if the same roll number is searched again... the result should be shown from my database and not from http://results.vtu.ac.in... help me out pls..:)
Jul 30 '10 #1
3 3280
zorgi
431 Expert 256MB
The easiest way would probably be just to store HTML for your table into the database referencing it with the roll number.
Jul 31 '10 #2
can u give me some link.. where this type of thing has been shown...:)
i'm storing the table's name as the roll number... but how should i extract the data from html..? :)
Jul 31 '10 #3
nishmu
1
The results website uses POST method, but currently as I can see... you are trying to get results using GET method.

You can use CURL to send the roll number to the form. You can google to find more about CURL, in particular curl_setopt function.

As for storing the data... since you only need to display the result of a particular roll number, and not work on/manipulate the data, saving the plain vanilla HTML to the database would be easiest.

"but how should i extract the data from html..?"
There are many options.. using Regular expressions, PHP DOM to get particular elements.
Aug 1 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: aseaman | last post by:
I am a big novice with MySQL and PHP. I need a script that enters information from a html form into a MySQL database. Can anyone tell me where I can find one that I can just replace the table and...
6
by: Jeff Sandler | last post by:
I have a database I created in mySQL. I've been entering data every day into the database using a Java application that I wrote. The database and the Java program are on the same Win 98 SE...
2
by: David Dawson | last post by:
I have no experience using MS Access to interface with MySQL. I have a tiny MySQL database that might need to have Access connect with it over the internet and grab data/update etc. Is this...
0
by: swatijogdand | last post by:
Hi..... Again, it's really very urgent. does nebody have the code for connecting a SQL Server table to an access database using ADOX ??? Thanx in adavance, Regards, Swati
7
by: kiranrredy | last post by:
Hi, I need to get the data from XML file , to store it in MySql database. How can i do it. Regards, KiranRredy
0
by: shubhendu pyne | last post by:
how to upload system information(unix box) to MySql database's(running in another unix box) respective tables using a script only..i.e once script runs all the informations like...
3
by: ahmurad | last post by:
Dear brothers, I have some importnat files in MS Excell / CSV format. I know php. I want to insert these files into MYSQL database to generate reports. What are the techniques to insert the ...
5
by: neovantage | last post by:
Hey all, I want to import data into mysql Database without using Com object using php technique from a Microsoft Excel File?
2
by: mfaisalwarraich | last post by:
Hi Everybody, I am using the following function to get the data from mysql database. i have entered appnum field as text filed in the database which has leading zeroes to this field like if...
1
by: twinkle2010 | last post by:
Hi I am a new web programmer.I got an issue that reads the excel sheet data and store it to MYSQL database using php. I dont have any idea on that. can you help me?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.