473,785 Members | 2,298 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

18 New Member
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 3298
zorgi
431 Recognized Expert Contributor
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
abhishek1234321
18 New Member
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 New Member
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
12220
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 database name? PLEASE I NEED IT ASAP!!!
6
4141
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 machine. I've been working on another program (an applet) to send and receive data over the internet. I got the applet to connect with the database and receive data. All the while I was developing the applet, I would tell it to find the database at...
2
4068
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 practical and what does it take to do it? My project is not time sensitive but I'd like to see what methods I can use to do remote queries with my database running on a *nix/Linux server. Thanks
0
1187
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
7462
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
1099
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 hostid,hostna,disks,cpu etc get stored to respective tables of MySql database....
3
2173
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 MS Excell / CSV files into MySQL? Your kind quick reply is highly appreciated.
5
6444
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
4005
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 number is 0001, 0010, 0101 (four figures). Now i got problem while sorting them as it is a string value and its giving error when im trying to convert it into integer using (int)$appnum its trimming the leading zeros. I want this field as the string field...
1
4162
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
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10341
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9954
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.