SlideShare une entreprise Scribd logo
1  sur  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);
}

?>

Contenu connexe

Tendances (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
 

En vedette (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
 

Similaire à Phpfunction

Ôn tập KTTMDT
Ôn tập KTTMDTÔn tập KTTMDT
Ôn tập KTTMDT
mrcoffee282
 

Similaire à 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
 

Plus de 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
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

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); } ?>