SlideShare a Scribd company logo
1 of 1
<?php

functionprintTitle()
{
        return "Archived Weather Records";
}

function run($dbname, $link)
{

  /* Run the query on the database through the connection */
  $query = "select * from weatherdata_archive";
  $result_array = mysql_db_query($dbname, $query, $link);

print "<h2>Old weather data table</h2>";
  ?>
<form action="list_weather_data_old.php" method="post">
        <p>SearchBy ID: <input type="text" name="searchid" size="15" maxlength="20"
value="" />
        <input type="submit" name="submit" value="Search" /></p><br/>       <br/>
</form>
<?php



print "<table border=0>
<tr>
<th align=left>Data ID</th>
<th align=left>Data/time</th>
<th align=left>Node ID</th>
<th align=left>Outdoor Temp</th>
<th align=left>Indoor Temp</th>
<th align=left>Humidity</th>
<th align=left>Wind Speed</th>
        <th align=left>Airpressure</th>
        <th align=left>Wind direction</th>
        <th align=left>Rainfall</th>
        <th align=left>Wind Chill</th>
</tr>n";

  /* While there are still rows in the result set,
assign the current row to the array $row */
while ($row = mysql_fetch_assoc($result_array))
  {
print "t<tr>n";
    /* Print out each element in row, that is,
print the values of the attributes */
foreach ($row as $col_value)
    {
print "tt<td>$col_value</td>n";
    } // end for
print "t</tr>n";
  } // end while

print "</table>n";
mysql_free_result($result_array);
}

?>

More Related Content

What's hot

HeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP ClientHeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP ClientDimitar Ivanov
 
Web client security
Web client securityWeb client security
Web client securityZiv Birer
 
次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介純生 野田
 
Integration with Camel
Integration with CamelIntegration with Camel
Integration with CamelJosué Neis
 

What's hot (12)

HeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP ClientHeadCouch - CouchDB PHP Client
HeadCouch - CouchDB PHP Client
 
Web client security
Web client securityWeb client security
Web client security
 
ZH爱丽丝梦游仙境
ZH爱丽丝梦游仙境ZH爱丽丝梦游仙境
ZH爱丽丝梦游仙境
 
PowerCMS X
PowerCMS XPowerCMS X
PowerCMS X
 
次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介
 
Update statement in PHP
Update statement in PHPUpdate statement in PHP
Update statement in PHP
 
Intro to sencha touch
Intro to sencha touchIntro to sencha touch
Intro to sencha touch
 
Mongo db for C# Developers
Mongo db for C# DevelopersMongo db for C# Developers
Mongo db for C# Developers
 
MongoDB and RDBMS
MongoDB and RDBMSMongoDB and RDBMS
MongoDB and RDBMS
 
Into The Box 2018 cf fractal
Into The Box 2018  cf fractal Into The Box 2018  cf fractal
Into The Box 2018 cf fractal
 
Mongo db for c# developers
Mongo db for c# developersMongo db for c# developers
Mongo db for c# developers
 
Integration with Camel
Integration with CamelIntegration with Camel
Integration with Camel
 

Viewers also liked

Vaga para programadores: Desenvolvimento de games
Vaga para programadores: Desenvolvimento de gamesVaga para programadores: Desenvolvimento de games
Vaga para programadores: Desenvolvimento de gamesPaulo Mattos
 
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...SmithAlbert87
 
Periclesdruck 70anos
Periclesdruck 70anosPericlesdruck 70anos
Periclesdruck 70anoshabcomunic
 

Viewers also liked (8)

Xxxxxxxx
XxxxxxxxXxxxxxxx
Xxxxxxxx
 
Organización p lm 2012
Organización p lm 2012Organización p lm 2012
Organización p lm 2012
 
P 74-75
P 74-75P 74-75
P 74-75
 
Vaga para programadores: Desenvolvimento de games
Vaga para programadores: Desenvolvimento de gamesVaga para programadores: Desenvolvimento de games
Vaga para programadores: Desenvolvimento de games
 
Carrera de submarinos
Carrera de submarinosCarrera de submarinos
Carrera de submarinos
 
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
España 1960 2010 determinantes de crecimiento a lp, fluctuaciones ciclicas y ...
 
P 46-47
P 46-47P 46-47
P 46-47
 
Periclesdruck 70anos
Periclesdruck 70anosPericlesdruck 70anos
Periclesdruck 70anos
 

Similar to Phpfunction (20)

Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
Php
PhpPhp
Php
 
Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
 
The HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup languageThe HyperText Markup Language or HTML is the standard markup language
The HyperText Markup Language or HTML is the standard markup language
 
Php (1)
Php (1)Php (1)
Php (1)
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
Practica n° 7
Practica n° 7Practica n° 7
Practica n° 7
 
JS-05-Handlebars.ppt
JS-05-Handlebars.pptJS-05-Handlebars.ppt
JS-05-Handlebars.ppt
 
Zero to SOLID
Zero to SOLIDZero to SOLID
Zero to SOLID
 
Karan chanan
Karan chananKaran chanan
Karan chanan
 
Karan - form search
Karan - form searchKaran - form search
Karan - form search
 
SULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programsSULTHAN's - PHP MySQL programs
SULTHAN's - PHP MySQL programs
 
Soa lab 3
Soa lab 3Soa lab 3
Soa lab 3
 
Django quickstart
Django quickstartDjango quickstart
Django quickstart
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Ip lab
Ip labIp lab
Ip lab
 
Md5 decrypter
Md5 decrypterMd5 decrypter
Md5 decrypter
 
Php summary
Php summaryPhp summary
Php summary
 
Analysis
AnalysisAnalysis
Analysis
 

More from shailendra vishwakarma (6)

Adv html
Adv htmlAdv html
Adv html
 
Essell infracon pvt ltd
Essell infracon pvt ltdEssell infracon pvt ltd
Essell infracon pvt ltd
 
Content management system overview
Content management system overviewContent management system overview
Content management system overview
 
Adv html
Adv htmlAdv html
Adv html
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Using class suffixes
Using class suffixesUsing class suffixes
Using class suffixes
 

Recently uploaded

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Phpfunction

  • 1. <?php functionprintTitle() { return "Archived Weather Records"; } function run($dbname, $link) { /* Run the query on the database through the connection */ $query = "select * from weatherdata_archive"; $result_array = mysql_db_query($dbname, $query, $link); print "<h2>Old weather data table</h2>"; ?> <form action="list_weather_data_old.php" method="post"> <p>SearchBy ID: <input type="text" name="searchid" size="15" maxlength="20" value="" /> <input type="submit" name="submit" value="Search" /></p><br/> <br/> </form> <?php print "<table border=0> <tr> <th align=left>Data ID</th> <th align=left>Data/time</th> <th align=left>Node ID</th> <th align=left>Outdoor Temp</th> <th align=left>Indoor Temp</th> <th align=left>Humidity</th> <th align=left>Wind Speed</th> <th align=left>Airpressure</th> <th align=left>Wind direction</th> <th align=left>Rainfall</th> <th align=left>Wind Chill</th> </tr>n"; /* While there are still rows in the result set, assign the current row to the array $row */ while ($row = mysql_fetch_assoc($result_array)) { print "t<tr>n"; /* Print out each element in row, that is, print the values of the attributes */ foreach ($row as $col_value) { print "tt<td>$col_value</td>n"; } // end for print "t</tr>n"; } // end while print "</table>n"; mysql_free_result($result_array); } ?>